GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
location_wizard/base.py
Go to the documentation of this file.
1 """!
2 @package location_wizard.base
3 
4 @brief Location wizard - base classes
5 
6 Classes:
7  - base::BaseClass
8 
9 (C) 2007-2011 by the GRASS Development Team
10 
11 This program is free software under the GNU General Public License
12 (>=v2). Read the file COPYING that comes with GRASS for details.
13 
14 @author Michael Barton
15 @author Jachym Cepicky
16 @author Martin Landa <landa.martin gmail.com>
17 """
18 
19 import wx
20 
21 class BaseClass(wx.Object):
22  """!Base class providing basic methods"""
23  def __init__(self):
24  pass
25 
26  def MakeLabel(self, text = "", style = wx.ALIGN_LEFT, parent = None, tooltip = None):
27  """!Make aligned label"""
28  if not parent:
29  parent = self
30  label = wx.StaticText(parent = parent, id = wx.ID_ANY, label = text,
31  style = style)
32  if tooltip:
33  label.SetToolTipString(tooltip)
34  return label
35 
36  def MakeTextCtrl(self, text = '', size = (100,-1), style = 0, parent = None, tooltip = None):
37  """!Generic text control"""
38  if not parent:
39  parent = self
40  textCtrl = wx.TextCtrl(parent = parent, id = wx.ID_ANY, value = text,
41  size = size, style = style)
42  if tooltip:
43  textCtrl.SetToolTipString(tooltip)
44  return textCtrl
45 
46  def MakeButton(self, text, id = wx.ID_ANY, size = (-1,-1), parent = None, tooltip = None):
47  """!Generic button"""
48  if not parent:
49  parent = self
50  button = wx.Button(parent = parent, id = id, label = text,
51  size = size)
52  if tooltip:
53  button.SetToolTipString(tooltip)
54  return button
def MakeButton
Generic button.
def MakeTextCtrl
Generic text control.
def MakeLabel
Make aligned label.
Base class providing basic methods.