I got my answer from this tutorial - http://www.c-jump.com/bcc/common/Talk2/Cxx/FltkFluidClass/FltkFluidClass.html#W01_0120_adding_custom_widget
Similar to other widgets, click FLUID menu
to add a custom widget to the window. It appears in the design view
as a square box.
In the properties window for our custom widget,
Enter the name of the class, e.g. Drawing2D in the Class: field.
In the Extra Code: field enter #include "path/Drawing2D.h"
to make sure that the class header is included.
The widget will only appear after you compile and run it. It will not show in the preview window from within FLUID.
Thank you for this feature.
On Thursday, May 6, 2021 at 1:29:14 AM UTC+5:30 anmol....@gmail.com wrote:
From the documentation,
The constructor should have the following arguments:
MyClass(int x, int y, int w, int h, const char *label = 0);
This will allow the class to be used in FLUID without problems.
I have a Double_Window() -> Tabs () -> Group () inside FLUID. When I try to add anything from New -> Code it automatically adds it outside the window.
The only widgets that can be added via FLUID are the pre-defined widgets inside the New -> (NOT Code)
Inside the FLUID example, we use the CubeView class but again, all the widgets added are the pre-defined widgets in FLUID.
Am I missing something that will allow me to add custom widgets ?
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/0c3e1115-5a94-4d0b-b03c-9132f652ac50n%40googlegroups.com.
[ Direct Link to Message ]