New FLTK Demo
This commit is contained in:
parent
c838a3659f
commit
d2b33b41d6
1
fltk/compile.txt
Normal file
1
fltk/compile.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
fltk-config --libs --cxxflags --use-images --use-gl --ldstaticflags --compile fltkdemo.cpp
|
9
fltk/fltk.inc
Normal file
9
fltk/fltk.inc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
#include <FL/Fl.H>
|
||||||
|
#include <FL/Fl_Window.H>
|
||||||
|
#include <FL/Fl_Input.H>
|
||||||
|
#include <FL/Fl_Button.H>
|
||||||
|
|
||||||
|
typedef Fl_Window WINDOW;
|
||||||
|
typedef Fl_Input INPUT;
|
||||||
|
typedef Fl_Button BUTTON;
|
24
fltk/fltkdemo.cpp
Normal file
24
fltk/fltkdemo.cpp
Normal file
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user