I think the only thing that might not be supported is dynamically resizing a Canvas without re-allocating the whole thing - I think we did have a discussion about this a while back, i.e. so that Canvas internals (dimensions, resolution, internal format etc) could be also changed at run-time. I don't think anybody ever got around to implement that though (haven't checked yet).
You'll probably want to take a look at $FG_ROOT/Nasal/canvas/gui
and especially these sub-folders there:
/dialogs
/widgets
We're in the process of documenting things - and Necolatis started working on new widgets.
So all the building blocks are there already - it's mainly a matter of adding new widgets and dialogs.
Widgets should ideally be prioritized according to existing PUI widgets (see $FG_ROOT/Docs/README.gui), so that we can sooner or later replace the old GUI.
However, I would suggest not to start coding anything "big" (as in a global/integrated GUI dialog containing a lot of stuff) yet - in fact, I even consider F-JJTH's attempts a bit "premature, given the FG/GUI situation outlined above.
It makes sense to make some experiments first, and document your findings - e.g. by dabbling with different widgets, adapting a few dialogs and helping to extend the wiki accordingly.
For instance, by adding stuff here:
http://wiki.flightgear.org/Canvas_SnippetsThis will help grow a repository of useful snippets, so that we can start adding new widgets and dialogs over time.
All the features you mentioned are straightforward to support using Nasal/Canvas, even in its current state - and shouldn't even require C++ level modifications.
But as can be seen in my other response, the main challenge we're facing currently is a lack of coordination/collaboration among people interested basically in the same thing (=a better FG GUI).
For an integrated solution, Nasal/Canvas are obviously going to be the right approach.
If I were to play with this, I would use the "Canvas Snippets" article and use the "Canvas dialog" snippet there, and adapt it to add a few simple EXISTING widgets (think label/button).
Next, you would want to register listeners/event handlers for supporting/handling drag&drop events:
http://wiki.flightgear.org/Canvas_-_Event_HandlingFor layout management, see:
http://wiki.flightgear.org/Canvas_Layout_SystemAt that point you would end up with a Canvas dialog whose buttons could be freely dragged around, possibly using dynamic layouts.
I would then probably add a sidebar with a handful of buttons for each supported widget (e.g. label, button, checkbox for starters) and turn this into a simple GUI editor where widgets could be added/moved around and maybe resized by clicking the corresponding widget button to add a new widget to the dialog.
I would guess that a simple prototype doing this is between 100-120 lines of OOP Nasal code - and you would end up with a simple way for creating/editing dialogs (e.g. by serializing everything to a JSON-like hash representation).
The main snippets to get you going are these:
http://wiki.flightgear.org/Canvas_Snipp ... GUI_Windowhttp://wiki.flightgear.org/Canvas_Snipp ... Layouts.29These could be adapted according to what I described above, i.e. so that a handful of buttons can be used to dynamically add new widgets to a dialog.
Once you have completed this, you should have all the basic building blocks in place to dynamically change dialogs "on the fly" - even if that may require re-allocating a Canvas to change its size for now.
Even though another workaround might be allocating a larger Canvas and only showing a certain area of it, so that the allocated Canvas would be large enough for things to be edited.
So I don't think that those potentially missing features are really showstoppers. I think this could be prototyped in a few evenings of spare time coding
I am currently not able to run FG, but I wouldn't mind posting a few more pointers every once in a while - but given how these efforts usually turn out (i.e. real life taking over), I would appreciate if you could tackle this by using the wiki and using/adding useful code snippets there - e.g. also by creating a little tutorial to document your whole effort at some point (i.e. creating a dynamically-editable GUI dialog)
A simple built-in GUI editor would seem useful overall, and it would provide a good learning experience for people wanting to create such flexible GUI dialogs - e.g. by allowing elements to be dragged onto a window (think properties, widgets, maps, or a ND/PFD).
The other thing worth keeping in mind is that localization is currently not a first-class concept supported by Canvas, so needs to be explicitly taken into account.
Depending on your motivation to work on this for a few days, you could probably come up with something useful pretty soon - at which point it would make sense to get others involved, especially Necolatis should be interested in this - as he's doing all of this currently manually, and is also increasingly familiar with the Canvas GUI, creating widgets etc.
PS: dialog resizing is supported through some kind of "resizeable" property