Canvas GUI: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(https://gitorious.org/fg/flightgear/commit/ce9afecdbd0be5d58b5fb502effc64f42090c992#comment_96177)
 
No edit summary
Line 1: Line 1:
{{Canvas Navigation}}
{{Canvas Navigation}}


== Background ==
In order to eventually phase out PUI completely, we need to stop adding PUI dependencies to the source tree. We now have the Canvas system, and there’s a formal decision to modernize the GUI using the Canvas, and completely replace PUI sooner rather than later.
In order to eventually phase out PUI completely, we need to stop adding PUI dependencies to the source tree. We now have the Canvas system, and there’s a formal decision to modernize the GUI using the Canvas, and completely replace PUI sooner rather than later.


Line 14: Line 15:


We really need to keep the total picture in mind, or we are growing our todo lists with stuff that wasn’t really necessary in the first place.
We really need to keep the total picture in mind, or we are growing our todo lists with stuff that wasn’t really necessary in the first place.
== PUI Widgets ==
Here's a list of custom, hardcoded, PUI widgets which we will need to re-implement using the Canvas, based on [https://gitorious.org/fg/flightgear/trees/next/src/GUI $FG_SRC/GUI]:
* [https://gitorious.org/fg/flightgear/blobs/next/src/GUI/FGPUIDialog.cxx#line169 loglist]
* [https://gitorious.org/fg/flightgear/blobs/next/src/GUI/AirportList.cxx airport list]
* [https://gitorious.org/fg/flightgear/blobs/next/src/GUI/WaypointList.cxx waypoint list]
* [https://gitorious.org/fg/flightgear/blobs/next/src/GUI/property_list.cxx property list]
* [https://gitorious.org/fg/flightgear/blobs/next/src/GUI/PUIFileDialog.cxx file dialog]
* [https://gitorious.org/fg/flightgear/blobs/next/src/GUI/menubar.cxx menubar]
* [https://gitorious.org/fg/flightgear/blobs/next/src/GUI/MapWidget.cxx map widget] (see [[Canvas Map API]])
In order to re-implement these using the Canvas system, we need to identify Nasal APIs that are currently missing, and which need to be provided via the cppbind framework.

Revision as of 19:19, 24 May 2013


Background

In order to eventually phase out PUI completely, we need to stop adding PUI dependencies to the source tree. We now have the Canvas system, and there’s a formal decision to modernize the GUI using the Canvas, and completely replace PUI sooner rather than later.

The shortcomings of our GUI, and PUI in particular, have been repeatedly brought up on the devel list over the years.

It was a lot of work to get rid of hard-coded PUI dialogs, and we still have a bunch of hard-coded PUI widgets – as long as we have those, getting totally rid of PUI will be increasingly difficult, because each hard-coded widget will either need to be phased out or manually ported.

Which is exactly the reason why adding additional PUI widgets to the source tree is a really bad idea and counter-constructive to accomplish our long-term goal of phasing out PUI completely.

We should really work out a plan to get rid of hard-coded PUI widgets and re-implement them using canvas-driven widgets, and extend the canvas as we go. Once that is accomplished, completely replacing PUI will become much more straightforward, because it will basically boil down to writing a parser in Nasal to turn our existing dialogs into canvas widgets.

Adding more and more hard-coded PUI widgets to the mix will make our work increasingly difficult, especially if they implement important and useful features that we really want.

We really need to keep the total picture in mind, or we are growing our todo lists with stuff that wasn’t really necessary in the first place.

PUI Widgets

Here's a list of custom, hardcoded, PUI widgets which we will need to re-implement using the Canvas, based on $FG_SRC/GUI:

In order to re-implement these using the Canvas system, we need to identify Nasal APIs that are currently missing, and which need to be provided via the cppbind framework.