Canvas widgets: Difference between revisions

Jump to navigation Jump to search
m
Line 117: Line 117:
* ...
* ...


* The Canvas manager needs to be extended to support using such a window as target for a placeable definition. If a window is resizeable the size property nodes will be updated to allow the canvas and/or its viewport being resized. {{Done}}
* It would be also be good to allow the canvas textures to be resized at runtime, so that we don't have to reserve to large canvases just because the dialogs could be resized. {{Pending}}
* It would be also be good to allow the canvas textures to be resized at runtime, so that we don't have to reserve to large canvases just because the dialogs could be resized. {{Pending}}
* The GUI system should take care of handling and forwarding mouse and keyboard events to the property tree as needed (Some parts of the existing code could probably be reused). Eg. if a canvas is assigned picking should occur on mouse clicks and forwarded to the property tree. {{Pending}}
* The existing dialog-show command needs to be modified to call the according function in Nasal space which will handle the whole creation and updating of the GUI. {{Pending}} (can be done by using the new removecommand/addcommand APIs meanwhile)
* The existing dialog-show command needs to be modified to call the according function in Nasal space which will handle the whole creation and updating of the GUI. {{Pending}} (can be done by using the new removecommand/addcommand APIs meanwhile)


Line 163: Line 161:
{{Feedback}}
{{Feedback}}


* <del>The API needs to be extended to allow the creation of windows and placing canvases onto them.</del> {{Done}}
* We also need a function which parses existing dialog xml files (reimplementing http://gitorious.org/fg/flightgear/blobs/next/src/GUI/FGPUIDialog.cxx#line708 FGPUIDialog.cxx/FGPUIDialog::makeObject]) and maps them to the new canvas widgets. Each widgets sits in is own Nasal file (eg. inside $FG_DATA/gui/widgets) and has to be implemented using a hash with several required functions, implementing the abstract interface of a widget:
* We also need a function which parses existing dialog xml files (reimplementing http://gitorious.org/fg/flightgear/blobs/next/src/GUI/FGPUIDialog.cxx#line708 FGPUIDialog.cxx/FGPUIDialog::makeObject]) and maps them to the new canvas widgets. Each widgets sits in is own Nasal file (eg. inside $FG_DATA/gui/widgets) and has to be implemented using a hash with several required functions, implementing the abstract interface of a widget:


Navigation menu