int main(int argc, char *argv[])
{
#define WINDOW_BG FL_BLACK
#define WINDOW_WIDTH 640
#define WINDOW_HEIGHT 480
#define BOX_WIDTH 100
#define BOX_HEIGHT 40
#define TEXT_COLOR FL_GREEN
#define TEXT_FONT FL_BOLD
#define TEXT_SIZE 40
// replace by xml ? const char* pszText = "Hello FLTK";
int iW = ;
int iH = ; Fl_Double_Window win(, );
win.color(FL_BLACK); fl_font(TEXT_FONT, TEXT_SIZE);
fl_measure(pszText, iW, iH); Fl_Box* box = new Fl_Box(WINDOW_WIDTH/ - iW/, WINDOW_HEIGHT/ - iH/, iW, iH);
box->box(FL_FLAT_BOX);
box->color(TEXT_COLOR);
box->labelfont(TEXT_FONT);
box->labelsize(TEXT_SIZE);
box->label(pszText); win.show();
win.end(); return Fl::run();
}
05-06 01:34