From d2b33b41d645ad2618efdaeb2041f3d762e5ba41 Mon Sep 17 00:00:00 2001 From: Armando Rivera Date: Sat, 9 Nov 2013 14:26:22 -0500 Subject: [PATCH] New FLTK Demo --- fltk/compile.txt | 1 + fltk/fltk.inc | 9 +++++++++ fltk/fltkdemo.cpp | 24 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 fltk/compile.txt create mode 100644 fltk/fltk.inc create mode 100644 fltk/fltkdemo.cpp diff --git a/fltk/compile.txt b/fltk/compile.txt new file mode 100644 index 0000000..d7aad5e --- /dev/null +++ b/fltk/compile.txt @@ -0,0 +1 @@ +fltk-config --libs --cxxflags --use-images --use-gl --ldstaticflags --compile fltkdemo.cpp diff --git a/fltk/fltk.inc b/fltk/fltk.inc new file mode 100644 index 0000000..860efa2 --- /dev/null +++ b/fltk/fltk.inc @@ -0,0 +1,9 @@ + +#include +#include +#include +#include + +typedef Fl_Window WINDOW; +typedef Fl_Input INPUT; +typedef Fl_Button BUTTON; diff --git a/fltk/fltkdemo.cpp b/fltk/fltkdemo.cpp new file mode 100644 index 0000000..dac8e94 --- /dev/null +++ b/fltk/fltkdemo.cpp @@ -0,0 +1,24 @@ +#include "../jade.h" + +#include "fltk.inc" + + +MAIN + DIM AS INT top = 40; + DIM AS WINDOW *win; + DIM AS INPUT *txtSource, *txtDest; + DIM AS BUTTON *btnSource, *btnDest; + + win = new WINDOW(690,486,"FLTK Demo"); + win->position((Fl::w() - win->w())/2, (Fl::h() - win->h())/2); + txtSource = new INPUT(20,top,540,26); + btnSource = new BUTTON(580,top,90,26,"Source"); + txtDest = new INPUT(20,top+40,540,26); + + btnDest = new BUTTON(580, top+40,90,26,"Dest"); + win->show(); + RETURN Fl::run(); +ENDMAIN + + +