Beispiel #1
0
void OStream::flush() {
	if (m_buffer == NULL or m_last == NULL) return;

	waitLock();
	//Calculate buffer size
	int size = 0;
	SimpleList<String>* iter = m_buffer;
	for (; iter != 0; iter = iter->next()) {
		size += iter->v().size();
	}
	//Get stuff
	String buff(WChar(" "), size);
	iter = m_buffer;
	for (int i = 0, pos = 0; i < size; i++, pos++) {
		if (pos >= iter->v().size()) {
			iter = iter->next();
			pos = 0;
		}
		buff[i] = iter->v()[pos];
	}
	//Write it
	write(buff);

	delete m_buffer;
	m_buffer = NULL;
	m_last = NULL;

	unlock();
}
Beispiel #2
0
void __fastcall TForm1::WBitmap1MouseDown(TObject *Sender,
      TMouseButton Button, TShiftState Shift, int X, int Y)
{
    if (Button == mbRight) {
        mouse_x=X;
        mouse_y=Y;
        }
    if (Button == mbLeft) {
        WBitmap1->Bitmap.Clear(0x808080);
        WBitmap1->Bitmap.Draw(WChar(font,'»κ',0xff),FONT_ALPHA);
    }
}