Category : fltk

I have a simple little program (nominated hello_fltk.cpp), (I use Ubuntu), that I attach below: #include <FL/Fl.H> <FL/Fl_Window.H> #include <FL/Fl_Box.H> #include <string> int main(int argc, char **argv) { const std::string hw_s = "Hello, World!"; Fl_Window *window = new Fl_Window(340, 180); Fl_Box *box = new Fl_Box(20, 40, 300, 100, hw_s.c_str()); box->box(FL_UP_BOX); box->labelfont(FL_BOLD + FL_ITALIC); box->labelsize(36); box->labeltype(FL_SHADOW_LABEL); ..

Read more

code is like: // #include "..std_lib_facilities.h" #include "Simple_window.h" #include "Graph.h" using namespace Graph_lib; int main() { Point t1 {100, 100}; Simple_window win {t1, 600, 400, "Canvas"}; win.wait_for_button(); } Simple_window.h and Graph.h is headers Stroustrup made himself. download from www.stroustrup.com I installed fltk (mingw64/mingw-w64-x86_64-fltk 1.3.5-1) using msys in Windows10. As I tried, fltk-config doesn’t work in ..

Read more

I’m new to C++ and Fltk. Guys this code is working fine: #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Box.H> #include <FL/Fl_Button.H> int main(int argc, char **argv) { Fl_Window *window = new Fl_Window(800, 400); Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!"); box->box(FL_NO_BOX); box->labeltype(FL_SHADOW_LABEL); Fl_Button *GG = new Fl_Button(150,90,40,30,"GG"); GG->type(FL_NORMAL_BUTTON); window->end(); window->show(argc, argv); return Fl::run(); } but when I ..

Read more

I’m trying to make a simple animation using FLTK(a circle with increasing and decreasing radius). I’ve managed to write a simple program that seems to work, but the animation flickers. The circle disappears for a couple of milliseconds and then gets back. I’ve changed Fl_Window class to Fl_Double_Window, but that didn’t fix this problem. class ..

Read more

My environment is: MinGW, MSYS2, WINDOWS 10 For building FLTK 1.3.5 in my envirmoment, the official instruction(file README.MSWindows.txt) describes the following steps: open mingw64.exe cd ‘to fltk source code directory’ .configure make(In my case make not working, I just typing mingw32-make) On my computer, the build completes successfully, but this script does not generate a ..

Read more

I am compiling code with an interface with FLTK, I need to be able to fork a callback because it’s taking parameters from a form an launch work when hitting ‘run’. I cannot use a fork at the start of the function to have one thread coming back to the UI instantly, it is said ..

Read more

I am new to fltk and have a problem with the callback functions. I have a class(Win) that creates a main window and this class contains elements of a class(Group) which creates a group inside the window. So when i click on the button in the application which is contained in the group Gr, the ..

Read more