wxGUI.toolboxes (1)
wxGUI Toolboxes
DESCRIPTION
The Toolboxes is a way to customize items in wxGUI menu. Toolboxes enable to:
o hide unused menu items in menu (e.g. Imagery, Database) or submenu (e.g. Wildfire modeling)
o change order of menu items and subitems
o add new menu items (e.g. Temporal)
o add addons modules
o add your own modules
Toolboxes are configured through two XML files (main_menu.xml and toolboxes.xml) located in your user home GRASS directory, subdirectory toolboxes ($HOME/.grass7/toolboxes/ on UNIX). Currently, there is no GUI front-end for toolboxes, however only simple editing of text files is needed.
Brief description of file main_menu.xml
This file represents the main menu (File, Settings, Raster, ...). By modifying this file you show and hide menu items which are represented by subtoolbox tag.
Tag user-toolboxes-list is interpreted as a menu containing a list of all user-defined toolboxes. If not needed it can be removed.
Following lines can be copied to .grass7/toolboxes/main_menu.xml and by removing, adding or reordering lines users can change the main menu items. See further examples.
Brief description of file toolboxes.xml
This file contains structure and description of individual toolboxes. Note that both Raster and e.g. Query raster maps are individual toolboxes although one contains the other. Tag toolbox contains subtoolbox tags which are defined later in the file. These nested toolboxes are linked through name attribute.
Apart from subtoolbox tag, tag toolbox can contain individual items (modules) and separators (for visual separation in the menu tree).
...
...
To redefine a toolbox (or use it as a template), copy specific part of file grass7/gui/wxpython/xml/toolboxes.xml from GRASS installation to a new file in user home (.grass7/toolboxes/toolboxes.xml) and edit it. Rename this new toolbox.
EXAMPLES
Hiding menu items
If we are for example working only with raster data, we can hide menu items Vector and Database. The file main_menu.xml then contains the following lines where we omitted the two toolboxes:
Creating custom toolbox
In this example we create a new toolbox Favorites containing existing GRASS module and toolbox, custom module created by the user and addon module. The toolboxes.xml file contains following lines:
Optionally, we can add this toolbox to the main menu items. The main_menu.xml file contains following lines:
If we have user-toolboxes-list tag in the main_menu.xml file, our custom toolbox will be listed in the automatically added Toolboxes main menu item. The screenshot shows the resulting menu:
NOTES
After the first start of wxGUI with custom toolboxes, .grass/toolboxes directory will contain file menudata.xml which is auto-generated and should not be edited.
SEE ALSO
wxGUI
wxGUI components
AUTHORS
Anna Petrasova, OSGeoREL, Faculty of Civil Engineering, Czech Technical University in Prague
Vaclav Petras, OSGeoREL, Faculty of Civil Engineering, Czech Technical University in Prague
$Date: 2016-03-08 09:06:33 +0100 (Tue, 08 Mar 2016) $
SOURCE CODE
Available at: wxGUI Toolboxes source code (history)
Main index | Wxgui index | Topics index | Keywords index | Graphical index | Full index
2003-2017 GRASS Development Team, GRASS GIS 7.2.1 Reference Manual