Canvas widgets: Difference between revisions

Jump to navigation Jump to search
Switch to {{flightgear source}} to fix the broken Gitorious links (and updated the line numbers).
(Switched to {{readme file}} to remove the out of date and broken Gitorious links.)
(Switch to {{flightgear source}} to fix the broken Gitorious links (and updated the line numbers).)
Line 228: Line 228:
{{Feedback}}
{{Feedback}}


* 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_ROOT]]/Nasal/canvas/gui/widgets) and has to be implemented using a hash with several required functions, implementing the abstract interface of a widget: [[Howto:Creating a Canvas GUI Widget]].
* We also need a function which parses existing dialog xml files (reimplementing {{flightgear source|path=src/GUI/FGPUIDialog.cxx|line=854|text=FGPUIDialog.cxx/FGPUIDialog::makeObject}}) and maps them to the new canvas widgets. Each widgets sits in is own Nasal file (eg. inside [[$FG_ROOT]]/Nasal/canvas/gui/widgets) and has to be implemented using a hash with several required functions, implementing the abstract interface of a widget: [[Howto:Creating a Canvas GUI Widget]].


Also, we are currently able to reload the GUI in FlightGear, we will want to retain this feature. But once we start implementing widgets in Nasal, we won't just want to reload the GUI XML files, but also the widget modules from $FG_ROOT/Nasal/widgets, so that widgets can be easily developed and tested, without having to restart FG.
Also, we are currently able to reload the GUI in FlightGear, we will want to retain this feature. But once we start implementing widgets in Nasal, we won't just want to reload the GUI XML files, but also the widget modules from $FG_ROOT/Nasal/widgets, so that widgets can be easily developed and tested, without having to restart FG.
Line 238: Line 238:


* {{readme file|gui}}
* {{readme file|gui}}
* [http://gitorious.org/fg/flightgear/blobs/next/src/GUI/FGPUIDialog.cxx#line710 Supported Widget Types]
* {{flightgear source|path=src/GUI/FGPUIDialog.cxx|line=856|text=Supported Widget Types}}


The '''parsegui''' function parses a dialog xml file and calls the constructor of the corresponding widget.  
The '''parsegui''' function parses a dialog xml file and calls the constructor of the corresponding widget.  

Navigation menu