> I've just started using FLTK but I can't get text to display on any of my
> programs, I've tried several examples from the web and they work apart from
> displaying text. I'm cross compiling fltk to use on a coldfire processor with
> uclinux, nanoX and nxlib. I can get text to display if I write nanoX
> programs, which leads me to believe the problem is in fltk. Below is some
> sample code that displays four different colour boxes and I was hoping for
> some text and labels within the boxes but I get the four different colour
> boxes but no text or labels. If I compile the code under mingw and run it, it
> works fine.
>
> Any ideas what I need to do?
>
> Cheers
> Stuart.
>
>
> /*
> All programs must include the file <FL/Fl.H>. In addition the program
> must include a header file for each FLTK class it uses. Listing 1 shows a
> simple "Hello,
> World!" program that uses FLTK to display the window.
>
>
> Listing 1 - "helloWorld.cpp"
>
> to compile
>
> ~/code/work/sw/lib/fltk/fltk-1.3.x-r8800/fltk-config --compile
> helloWorld.cpp
>
>
> */
>
> #include <FL/Fl.H>
> #include <FL/Fl_Window.H>
> #include <FL/Fl_Box.H>
> #include <FL/Fl_Tree.H>
> #include <FL/Fl_Button.H>
>
>
> int main(int argc, char **argv)
> {
>
> Fl_Window *window = new Fl_Window(480,272);
>
> Fl_Box *box1 = new Fl_Box(0,0,240,136,"Hello");
>
> box1->box(FL_UP_BOX);
> box1->color(FL_WHITE);
> box1->labeltype(FL_NORMAL_LABEL);
> box1->labeltype(FL_SHADOW_LABEL);
> box1->labelcolor(FL_RED);
>
> Fl_Box *box2 = new Fl_Box(240,0,240,136,"World");
>
> box2->box(FL_UP_BOX);
> box2->color(FL_BLUE);
> box2->labelfont(FL_BOLD+FL_ITALIC);
> box2->labeltype(FL_SHADOW_LABEL);
> box2->labelcolor(FL_RED);
>
> Fl_Box *box3 = new Fl_Box(240,136,240,136,"@circle");
>
> box3->box(FL_UP_BOX);
> box3->color(FL_RED);
> box1->labeltype(FL_SYMBOL_LABEL);
> box3->labelsize(36);
> box3->labeltype(FL_SHADOW_LABEL);
> box3->labelcolor(FL_BLACK);
>
> Fl_Box *box4 = new Fl_Box(0,136,240,136,"@UpArrow");
>
> box4->box(FL_UP_BOX);
> box4->color(FL_GREEN);
> box4->labelsize(36);
> box4->labeltype(FL_SHADOW_LABEL);
> box4->labelcolor(FL_RED);
>
> window->end();
>
> window->show(argc, argv);
>
> return Fl::run();
> }
>
>
I should've said I'm using fltk 1.3.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk