Canvas PUI mapping: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Stub}} | {{Stub}} | ||
will become a table with the most essential PUI directives (non-widgets), such as layout/styling and common PUI widget functionality (think live properties, bindings, conditions), so that we can keep track of what's missing/needed and finished already. | this will become a table with the most essential PUI directives (non-widgets), such as layout/styling and common PUI widget functionality (think live properties, bindings, conditions), so that we can keep track of what's missing/needed and finished already. | ||
The basic idea can be seen below: | The basic idea can be seen below: | ||
{| class="wikitable" | |||
! tag/directive !! description !! priority !! progress !! remarks | |||
|- | |||
| {{tag|property}}, {{tag|format}} || formats properties || high || {{Progressbar|60}} || working proof-of-concept | |||
|- | |||
|- | |||
| {{tag|enable}}, {{tag|visible}} || enables/disables and hides/shows widgets dynamically || high || n/a || still to be done | |||
|- | |||
|- | |||
| {{tag|font}} || toggles default font for labels/buttons etc || low || n/a || not very difficult to do (see canvas font mapping example) | |||
|- | |||
|- | |||
| {{tag|color}} || allows widget-specific colors to be overridden per widget || low || can be done via DefaultStyle.nas || not difficult, but also not very important either | |||
|- | |||
|} | |||
<!-- this is abusing the template unnecessarily | <!-- this is abusing the template unnecessarily | ||
Line 14: | Line 36: | ||
* https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/GUI/FGPUIDialog.cxx#l1070 | * https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/GUI/FGPUIDialog.cxx#l1070 | ||
We will need to come up with some kind of "adapter" class that maps common PUI functionality to arbitrary Canvas widgets | We will need to come up with some kind of "adapter" class that maps common PUI functionality to arbitrary Canvas widgets, specifically: | ||
* {{tag|height}} and {{tag|width}} | |||
* {{tag|legend}} {{tag|label}} | |||
* {{tag|property}} and {{tag|format}} | |||
* {{tag|binding}} | |||
* {{tag|default}} | |||
* {{tag|enable}} | |||
* {{tag|visible}} (easy) | |||
* {{tag|keynum}} and {{tag|key}} | |||
* {{tag|font}} | |||
* {{tag|color}} | |||
Currently, this is accomplished in non-generic, fairly roundabout, fashion in the <code>applyPUIAttributes()</code> helper function in the pui2canvas parser | |||
https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/GUI/FGPUIDialog.cxx#l194 | |||
<syntaxhighlight lang="nasal"> | |||
# ... | |||
</syntaxhighlight> | |||
[[Category:Canvas GUI]] |
Revision as of 10:46, 31 July 2016
This article is a stub. You can help the wiki by expanding it. |
this will become a table with the most essential PUI directives (non-widgets), such as layout/styling and common PUI widget functionality (think live properties, bindings, conditions), so that we can keep track of what's missing/needed and finished already.
The basic idea can be seen below:
- https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/README.gui#l111
- https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/GUI/FGPUIDialog.cxx#l1070
We will need to come up with some kind of "adapter" class that maps common PUI functionality to arbitrary Canvas widgets, specifically:
<height>
and<width>
<legend>
<label>
<property>
and<format>
<binding>
<default>
<enable>
<visible>
(easy)<keynum>
and<key>
<font>
<color>
Currently, this is accomplished in non-generic, fairly roundabout, fashion in the applyPUIAttributes()
helper function in the pui2canvas parser
https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/GUI/FGPUIDialog.cxx#l194
# ...