Thank you guys for your help and advice. After checking out Albrecht's link I think I'm gonna drop the MDI system idea and go for a TDI (Tabbed Document Interface) system instead. An MDI system is indeed too complex and tricky to set up. Conversely, a TDI system seems easier to achieve (through Fl_Tabs) and rules out the complexity of draggable and dockable widgets.
On Monday, 11 August 2025 at 14:21:36 UTC+1 Albrecht-S wrote:
There is no "simple code example" for what you want. You can easily use
Fl_Tabs to create a simple MDI system (each tab can contain one
document), but dragging windows around and "docking" is not a simple
task. That's why I wrote that there is no "simple" example.
However, there have been at least two discussions (or issues) on GitHub
[1] recently (say: in the last two or three months) about
implementations of draggable and dockable windows. You may take a look
at that to get an impression how complicated all this is, particularly
Wayland support because Wayland hides window coordinates...
FWIW, a long time ago (think it was back in the 1.1 era, might even have been 1.0 I suppose...) I had a stab at this - though that project fell out of favour and I can not now find the code.
FWIW, my MDI "windows" were actually groups, IIRC, not real "windows" at all, so the Wayland aspect might not be a problem if you go that way. At the time I _think_ this was due to some issues with nesting windows (possibly on older versions of OSX?) Don't really recall.
Anyway, this meant the the per-window co-ordinates were a real pain to figure out (they couldn't just be window-relative) and I also had to draw my own window decorations, so they never really looked quite like the "native" widgets anyway.
Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.