Custom widgets in FLUID

78 vues
Accéder directement au premier message non lu

anmol....@gmail.com

non lue,
5 mai 2021, 15:59:1405/05/2021
à fltk.general
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 ?

anmol....@gmail.com

non lue,
5 mai 2021, 16:13:3705/05/2021
à fltk.general

>>>
  • Similar to other widgets, click FLUID menu

    New/Other/Box
  • 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.
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message