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); ..
Category : fltk
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 ..
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 ..
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 ..
I’ve got a problem with memory in C++ program with FLTK. In this first case: #include <Fl/Fl.H> #include <Fl/Fl_Window.H> enum { win_w = 640, win_h = 480, btn_w = 80, btn_h = 30 }; int main() { Fl_Window *window = new Fl_Window(win_w, win_h, "Hello, World!"); window->end(); window->show(); return Fl::run(); } valgrind said that: HEAP SUMMARY: ..
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 ..
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 ..

I have two draggable objects inside a window: the one containing the black square is in background while the one containing the red square is in the foreground. This layout is due to the order in which they are drawn. I would like to have in the foreground the one that I am currently dragging: ..
I was wondering how to change the width of the area responsible for showing the current value of a Fl_Hor_Value_Slider. The thing is, I want to be able to select a year (that’s 4 digits) and the space on the side of the slider is not enough to display the year number correctly. enter image ..
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 ..
Recent Comments