Version 2 of a proposal for a new FLTK widget : Fl_Dockable_Group

21 views
Skip to first unread message

Manolo

unread,
Dec 4, 2025, 12:26:06 PM12/4/25
to fltk.coredev
Hi devs,

Please, see the version 2 of my proposal for a new FLTK class
to give FLTK support of docking/undocking operations:

This is an improvement of my previous proposal that accounts  for remarks
made about version 1.

Manolo

Gonzalo Garramuño

unread,
Dec 21, 2025, 6:51:25 PM12/21/25
to Manolo, fltkc...@googlegroups.com

On 12/4/25 14:26, Manolo wrote:
>
> This is an improvement of my previous proposal that accounts for remarks
> made about version 1.
Can you make a summary of the improvements?  I gave it a try and could
not tell the difference.

Manolo

unread,
Dec 23, 2025, 4:41:20 AM12/23/25
to fltk.coredev
Le lundi 22 décembre 2025 à 00:51:25 UTC+1, ggar...@gmail.com a écrit :
> This is an improvement of my previous proposal that accounts for remarks
> made about version 1.
Can you make a summary of the improvements?  I gave it a try and could
not tell the difference.

The main difference is that function Fl_Dockable_Group::target_box() that used to declare
a 'target box' where a dockable group could be docked has disappeared.

In version 2, Fl_Widget's that can become the target of a dockable group are application-defined
and FLTK does not limit them to Fl_Box-derived objects. That's comparable to the target widgets of a 
drag-and-drop operation in FLTK. Any widget can be one, but the application must make this widget 
respond appropriately to FL_DND_ events  to be a valid drop target.
With dockable groups, any widget can dock a dockable group but it must implement a few functions
to be a valid docking target. The application is therefore free to implement docking target widgets
as necessary for it, without FLTK deciding what can or cannot be a docking target.

Version 2 gives also more freedom for an app to decide what is a "drag widget", although
it's expected that an Fl_Box should most often fit to what is needed to undock and drag a dockable group.


Reply all
Reply to author
Forward
0 new messages