![]() |
![]()
| ![]() |
![]()
wxGUI ToolboxesKEYWORDSgeneral, GUI DESCRIPTIONThe Toolboxes is a way to customize items in wxGUI menu. Toolboxes enable to:
Toolboxes are configured through two XML files (main_menu.xml and toolboxes.xml) located in your user home GRASS directory, subdirectory toolboxes ($HOME/.grass8/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.xmlThis 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 .grass8/toolboxes/main_menu.xml
and by removing, adding or reordering lines users can change the main menu
items. See further examples.
<?xml version="1.0" encoding="UTF-8"?> <toolbox name="MyMainMenu"> Brief description of file toolboxes.xmlThis 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).
<?xml version="1.0" encoding="UTF-8"?> <toolboxes> 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 (.grass8/toolboxes/toolboxes.xml) and edit it. Rename this new toolbox. EXAMPLESHiding menu itemsIf 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:
<?xml version="1.0" encoding="UTF-8"?> <toolbox name="CustomizedMainMenu"> Creating custom toolboxIn 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:
<?xml version="1.0" encoding="UTF-8"?> <toolboxes> Optionally, we can add this toolbox to the main menu items. The
main_menu.xml file contains following lines:
<?xml version="1.0" encoding="UTF-8"?> <toolbox name="CustomizedMainMenu"> 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:
NOTESAfter 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 ALSOwxGUI, wxGUI components AUTHORSAnna Petrasova, OSGeoREL, Faculty of Civil Engineering, Czech
Technical University in Prague
SOURCE CODEAvailable at: wxGUI Toolboxes source code (history) Accessed: Monday Feb 24 12:19:10 2025 Main index | Wxgui index | Topics index | Keywords index | Graphical index | Full index © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
|