diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-10-26 09:08:01 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-10-26 09:08:01 +0000 |
| commit | 77484a4e2d9d3e8ab82855b2b3baf0bbe7e81ba5 (patch) | |
| tree | b36b9541b2f71af67625da5378f03c429aaea39c /test/hello.cxx | |
| parent | cf296e05655e1282cbf5a9bc5bfdfd2f4480e662 (diff) | |
FLUID writes RGB and Bitmap image data as an array of decimal numbers instead of a string since "a certain compiler by a large operating system vendor which shall remain unnamed" can not handle long strings and produces heap overflows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4607 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/hello.cxx')
| -rw-r--r-- | test/hello.cxx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/test/hello.cxx b/test/hello.cxx index 178d52934..727e4f003 100644 --- a/test/hello.cxx +++ b/test/hello.cxx @@ -26,20 +26,29 @@ // #include <FL/Fl.H> -#include <FL/Fl_Window.H> -#include <FL/Fl_Box.H> +#include <FL/Fl_Double_Window.H> +#include <FL/Fl_Button.H> + +#include <stdlib.h> + +void WinQuit_CB(Fl_Widget*, void*) { + exit(0); +} int main(int argc, char **argv) { - Fl_Window *window = new Fl_Window(300,180); - Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!"); - box->labelfont(FL_BOLD+FL_ITALIC); - box->labelsize(36); - box->labeltype(FL_SHADOW_LABEL); - window->end(); + Fl_Double_Window *window; + { Fl_Double_Window *o = new Fl_Double_Window(347, 263); + window = o; + { Fl_Button *o = new Fl_Button(25, 25, 64, 20, "button"); + o->callback(WinQuit_CB); + } + o->end(); + } window->show(argc, argv); return Fl::run(); } + // // End of "$Id$". // |
