GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
forms Namespace Reference

Data Structures

class  UpdateThread
 Update dialog widgets in the thread. More...
 
class  UpdateQThread
 Update dialog widgets in the thread. More...
 
class  TaskFrame
 This is the Frame containing the dialog for options input. More...
 
class  CmdPanel
 A panel containing a notebook dividing in tabs the different guisections of the GRASS cmd. More...
 
class  GUI
 
class  GrassGUIApp
 Stand-alone GRASS command GUI. More...
 

Functions

def color_resolve
 
def text_beautify
 
def escape_ampersand
 Escapes ampersands with additional ampersand for GUI. More...
 
def UpdateDialog
 

Variables

tuple gisbase = os.getenv("GISBASE")
 
 wxbase = gisbase
 
dictionary str2rgb
 
dictionary rgb2str = {}
 
dictionary _blackList
 
tuple q = wx.LogNull()
 
tuple cmd = utils.split(sys.argv[1])
 
tuple task = gtask.grassTask(gcmd.GetRealCmd(cmd[0]))
 
tuple app = GrassGUIApp(task)
 

Detailed Description

@package gui_core.forms

@brief Construct simple wxPython GUI from a GRASS command interface
description.

Classes:
 - forms::UpdateThread
 - forms::UpdateQThread
 - forms::TaskFrame
 - forms::CmdPanel
 - forms::GUI
 - forms::GrassGUIApp

This program is just a coarse approach to automatically build a GUI
from a xml-based GRASS user interface description.

You need to have Python 2.4, wxPython 2.8 and python-xml.

The XML stream is read from executing the command given in the
command line, thus you may call it for instance this way:

python <this file.py> r.basins.fill

Or you set an alias or wrap the call up in a nice shell script, GUI
environment ... please contribute your idea.

Updated to wxPython 2.8 syntax and contrib widgets.  Methods added to
make it callable by gui.  Method added to automatically re-run with
pythonw on a Mac.

@todo
 - verify option value types

Copyright(C) 2000-2012 by the GRASS Development Team

This program is free software under the GPL(>=v2) Read the file
COPYING coming with GRASS for details.

@author Jan-Oliver Wagner <jan@intevation.de>
@author Bernhard Reiter <bernhard@intevation.de>
@author Michael Barton, Arizona State University
@author Daniel Calvelo <dca.gis@gmail.com>
@author Martin Landa <landa.martin@gmail.com>
@author Luca Delucchi <lucadeluge@gmail.com>

Function Documentation

def forms.color_resolve (   color)

Definition at line 124 of file forms.py.

def forms.escape_ampersand (   text)

Escapes ampersands with additional ampersand for GUI.

Definition at line 150 of file forms.py.

Referenced by text_beautify().

def forms.text_beautify (   someString,
  width = 70 
)
Make really long texts shorter, clean up whitespace and
remove trailing punctuation.

Definition at line 138 of file forms.py.

References escape_ampersand(), and utils.normalize_whitespace().

def forms.UpdateDialog (   parent,
  event,
  eventId,
  task 
)

Variable Documentation

dictionary forms._blackList
Initial value:
1 = { 'enabled' : False,
2  'items' : { 'd.legend' : { 'flags' : ['m'] } }
3  }

Definition at line 120 of file forms.py.

tuple forms.app = GrassGUIApp(task)

Definition at line 2023 of file forms.py.

tuple forms.cmd = utils.split(sys.argv[1])

Definition at line 2020 of file forms.py.

Referenced by Vect_hist_command().

tuple forms.gisbase = os.getenv("GISBASE")
dictionary forms.rgb2str = {}

Definition at line 115 of file forms.py.

dictionary forms.str2rgb
Initial value:
1 = {'aqua': (100, 128, 255),
2  'black': (0, 0, 0),
3  'blue': (0, 0, 255),
4  'brown': (180, 77, 25),
5  'cyan': (0, 255, 255),
6  'gray': (128, 128, 128),
7  'green': (0, 255, 0),
8  'grey': (128, 128, 128),
9  'indigo': (0, 128, 255),
10  'magenta': (255, 0, 255),
11  'orange': (255, 128, 0),
12  'purple': (128, 0, 128),
13  'red': (255, 0, 0),
14  'violet': (128, 0, 255),
15  'white': (255, 255, 255),
16  'yellow': (255, 255, 0)}

Definition at line 99 of file forms.py.

tuple forms.task = gtask.grassTask(gcmd.GetRealCmd(cmd[0]))

Definition at line 2021 of file forms.py.

tuple forms.wxbase = gisbase

Definition at line 63 of file forms.py.