Canvas wrappers: Difference between revisions

Jump to navigation Jump to search
Line 15: Line 15:
== GUI Widgets ==
== GUI Widgets ==
The widget module will allow  implementing custom GUI widgets using the Canvas system and Nasal, this will make it possible to re-implement existing PUI widgets as fully interactive "Nasal canvases", so that usage of PUI is increasingly reduced, facilitating phasing out of PUI eventually.
The widget module will allow  implementing custom GUI widgets using the Canvas system and Nasal, this will make it possible to re-implement existing PUI widgets as fully interactive "Nasal canvases", so that usage of PUI is increasingly reduced, facilitating phasing out of PUI eventually.
The Canvas/GUI integration is implemented such that none of the existing code is touched, i.e. the old behavior remains fully supported. In addition, new widgets can be shared and reused by adding them to the $FG_ROOT/Nasal directory.
In order to start using any custom Canvas-widgets, you only need to change the widget type to "canvas" and specify the name of the widget to be instantiated. For example:
<syntaxhighlight lang="cpp">
<type>canvas</type>
<name>button</name>
</syntaxhighlight>
This is fully supported by Nasal code, as well as XML files.


== MFD ==
== MFD ==

Navigation menu