Changes between Version 3 and Version 4 of wxGUIDevelopment/SingleWindow


Ignore:
Timestamp:
04/07/21 09:42:51 (4 years ago)
Author:
lindakladivova
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • wxGUIDevelopment/SingleWindow

    v3 v4  
    1919  * it is critical that new code will work with the old GUI and the `g.gui.*` module in addons (this demonstrates also good code quality)
    2020 * only finished single window GUI which will not cause any code duplication can be committed into trunk
     21
     22
     23== Background ==
     24
     25After significant improvements of the Data Catalog [https://trac.osgeo.org/grass/wiki/GSoC/2020/StartupWindow], which led to the creation of a new startup mechanism and the removal of the startup screen, another topic enhancing the user experience comes into consideration - the Single Window User Interface.
     26All historical versions of GRASS can spread across multiple screens. It can be beneficial for some, but it can be a bit annoying as well, as almost every task generates a new wxGUI window freely floating around on the screen. Another lack with the current solution is that tabs in Layer Manager can cause trouble to new users. This issue was clearly evident from surveys among GRASS users where some of them did not record the Modules tab at all. The new design would therefore assume that all panels would be visible immediately after startup.
     27The fact that the Single Window layout would really be appreciated by users can also be deduced from the surveys conducted in my master thesis [https://github.com/ctu-geoforall- lab-projects/dp-kladivova-2021/blob/master/text/linda-kladivova-dp-2021.pdf].
     28Of course, especially long-term users can prefer the existing multi-layout way, so this original option will be retained. The single-window GUI will therefore be built "next to" the existing multi-layout GUI. As an example, the GIMP software works similarly. It also left the user the option to switch to multi-layout, but by default, it starts in a single-window layout.
     29
     30
     31== State of Art in version 7.9 (Multiple Window Layout) ==
     32
     33First, let's look at the current solution in version 7.9 (Spring 2021).
     34GRASS GIS consists of two windows (frames) after launch - Layer Manager and Map Display. Additional maps are opened as additional separate Map Display windows. Each Map Display window corresponds to the Map Display tab in the Display tab, which defines the visual content of a particular Map Display window.
     35
     36Figure 1: Illustration of several open Map Display windows and their associated Map Display tabs.
     37[[Image()]]
     38
     39GRASS GIS Layer Manager contains the Menu from the top, then three dockable toolbars Workspace, Tools, and Misc (see figure 2).
     40
     41Figure 2: Dockable toolbars in version 7.9
     42[[Image()]]
     43
     44The most spatially extensive widget is a notebook, which in a standard 2D projection contains 5 tabs - Data, Display, Modules, Console, and Python. When switching to 3D projection, this number is increased by the 3D view tab (Figure 3).
     45
     46Figure 3: individual tabs - from left Data, Display, Modules, Console, Python, and 3D view
     47[[Image()]]
     48
     49In addition to the Data Catalog, the Data tab also contains the Data Catalog toolbar and the infobar object. Similarly, the Display tab now has its own group of buttons - Display toolbar. Buttons previously available through the main dockable toolbars at the top of the Layer Manager have been moved to these tabs. Thus, in version 7.9, each tab forms a certain whole which will be further preserved for a single layout.
     50
     51== Proposal for Single Window Layout ==
     52The proposed layout in Figure 4 is visually inspired by the layout in QGIS. Like QGIS or other GIS software, it contains a data catalog and layer catalog on the left, and a catalog of tools (modules) on the right.
     53
     54Figure 4: Designed Single Window Layout
     55[[Image()]]
     56
     57The design is based on the ''wx.Aui.Manager'' class, which is the central class of the AUI class framework. In this class, we create so-called panes i.e. panels with docking and floating behavior (more [https://wxpython.org/Phoenix/docs/html/wx.aui.AuiManager.html]). wx.Aui.Manager is not a new concept in GRASS. As we can see in Figure 2, it is already used for creating dockable toolbars in the upper part of the Layer Manager and in the Map Display. These tabs, as well as the Menu bar at the top of the software, will remain the same as in version 7.9.
     58
     59The designed Single Window Layout consists of 1 window, in the middle of which are Map Displays as notebook tabs. Each Map Display tab, therefore, represents a Map Display window, as we know it from version 7.9. It is not possible to move with a tab containing Map Displays (it is not dockable), but we can divide the space so that more maps can be seen at once (see Figure 5). Depending on which Map Display is active, the correct tab in the Display tab is selected and vice versa.
     60
     61Figure 5: AUI demo - display of Map Displays tabs side by side
     62[[Image()]]
     63
     64Around the central map notebook, there are 5 dockable panes in a standard 2D projection - Data Catalog and Display on the left, Modules, Console, and Python on the right. When switching to 3D projection, this number is increased by the 3D view tab - which is displayed in the left part under the Display panel. Dockable panes can be pulled out and rearranged according to user's own preferences. One example can be seen in Figure 6.
     65
     66Figure 6: AUI demo - another arrangement of dockable panes
     67[[Image()]]
     68
     69Panes can only be maximized and minimized. The situation after minimizing all panes can be seen in Figure 7. Closing panes in the case of GRASS does not bring any special plus in my opinion - after closing it is usually hard to find and reopen the tab (hopefully the reader will tell me the truth :-)) and it would also involve the implementation of a check box mechanism to the menu bar as e.g. in QGIS. GRASS has most functionalities in the form of separate modules, which means that the number of tabs is a maximum of 6 (unlike QGIS having almost 20 tabs).
     70
     71Figure 7: AUI demo - panes minimization
     72[[Image()]]
     73
     74As I have mentioned above, each tab in version 7.9 forms a certain whole. The buttons in the Data Catalog toolbar in the Data tab are used to organize the data in this tab. Similarly, the Display tab has its own toolbar, which is used to add, delete, and further organize the layers displayed in Map Display. However, the disadvantage of this solution is that the Data Catalog toolbar and Display toolbar cannot be part of the respective panel in their original length, as they are too long. Therefore, there would have to be either placed horizontal toolbars on top of each other in the given panel or inserted one vertical toolbar on the left. Personally, I am more inclined to the option of creating two horizontal toolbars.
     75
     76However, the implementation of a Single Window GUI does not only involve a widget reorganization. To reach a truly user-friendly result, it should be possible to switch to the original multi-layout. Then it would be also advantageous to have a button returning GRASS to the original Single Layout settings (useful in the situation when a user would significantly reorganize widgets and would not be able to go back).
     77A similar way of changing the layout using the buttons is implemented, for example, in the software… in Figure 8. Both buttons related to the layout in GRASS GIS could be part of the new dockable Layout tab, which would be located next to the dockable Misc tab.
     78
     79Figure 8:
     80[[Image()]]
     81
     82The third important function is the ability to remember the single-window layout for the next session, or also within the saved workspaces.
     83
     84As part of the new single layout, it would also be good to reopen the question about tab (pane) names. The main GRASS GIS window is named Layer Manager, although in practice only the Display tab can be considered a Layer Manager. Similarly, in the surveys, the proposal was made to rename the Modules tab to Tools.
     85
     86**Single Window Layout Roadmap**