Discussion:
Docking Panels
asif saeed
2013-04-12 04:53:26 UTC
Permalink
Hi,

Can I use FLTK to develop a GUI with panels where I can, for example, drag
& drop different tabs from different dialogs/panels to other dialogs/panels
- in short, move action items to menus, toolbars, panels, create new
panels, etc. That is, can I use FLTK to create a dynamic GUI like that of
MS-Office? I can use the most advanced object-oriented design techniques
but I do want to know if FLTK does have the required functions.

Best regards,

-Asif
MacArthur, Ian (Selex ES, UK)
2013-04-12 08:44:36 UTC
Permalink
Post by asif saeed
Can I use FLTK to develop a GUI with panels where I can, for example, drag
& drop different tabs from different dialogs/panels to other
dialogs/panels
- in short, move action items to menus, toolbars, panels, create new
panels, etc. That is, can I use FLTK to create a dynamic GUI like that of
MS-Office? I can use the most advanced object-oriented design
techniques
but I do want to know if FLTK does have the required functions.
The glib answer is yes, you can do this.

The more detailed answer is that you need to do a fair bit of groundwork first, since the native fltk widgets don't support that behaviour out of the box, so you need to derive your own container (e.g. from Fl_Group) that can handle the drag/drop events associated with moving the widgets form one to the other, and then do the various widget add/remove operations as required.

Also, note that fltk has no "layout manager" per se, other than Fl_Pack (which I don't much like) so your container widgets would have to manage the positioning of their children as widgets are added and removed. Though Fl_Pack might be good enough for your needs?

There are "worked examples" of this "out in the wild".

Indeed, if you have used fluid much to do GUI designs, you will have seen that you can drag and drop widgets from the fluid toolbar onto your GUI, and move them about.

The concepts there are the same, pretty much...



Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
Continue reading on narkive:
Loading...