Get widget type in drawing Fl::set_boxtype callback

16 views
Skip to first unread message

Dibo

unread,
Jul 24, 2026, 4:11:27 PM (2 days ago) Jul 24
to fltk.general
Hi,
I'm customizing drawing boxes using Fl::set_boxtype callback because I use CFLTK (actually PasFLTK binding) so I can't use any inheritance. Fl_Button and Fl_input use the same FL_DOWN_BOX and I would like to draw it differently depending if current drawing widget is Fl_Button or Fl_input. I can define own box type by FL_FREE_BOXTYPE but disadvantage is:
1. I have to set this box for each widget
2. It will not affect FLTK dialogs for example Fl_File_Chooser etc.

Is there any trick to do this globaly?
Regards

Matthias Melcher

unread,
Jul 25, 2026, 1:17:26 PM (yesterday) Jul 25
to fltk.general
Sorry, no. The box drawing functions have no way of knowing which widget called them. FLTK 1 she not have per-widget-type styles, so , no, you have to set the box type for each and every widget if you don't want the default type.
Reply all
Reply to author
Forward
0 new messages