GRASS Programmer's Manual  6.5.svn(2012)-r51648
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
location_wizard/base.py
Go to the documentation of this file.
00001 """!
00002 @package location_wizard.base
00003 
00004 @brief Location wizard - base classes
00005 
00006 Classes:
00007  - base::BaseClass
00008 
00009 (C) 2007-2011 by the GRASS Development Team
00010 
00011 This program is free software under the GNU General Public License
00012 (>=v2). Read the file COPYING that comes with GRASS for details.
00013 
00014 @author Michael Barton
00015 @author Jachym Cepicky
00016 @author Martin Landa <landa.martin gmail.com>   
00017 """
00018 
00019 import wx
00020 
00021 class BaseClass(wx.Object):
00022     """!Base class providing basic methods"""
00023     def __init__(self):
00024         pass
00025 
00026     def MakeLabel(self, text = "", style = wx.ALIGN_LEFT, parent = None):
00027         """!Make aligned label"""
00028         if not parent:
00029             parent = self
00030         return wx.StaticText(parent = parent, id = wx.ID_ANY, label = text,
00031                              style = style)
00032 
00033     def MakeTextCtrl(self, text = '', size = (100,-1), style = 0, parent = None):
00034         """!Generic text control"""
00035         if not parent:
00036             parent = self
00037         return wx.TextCtrl(parent = parent, id = wx.ID_ANY, value = text,
00038                            size = size, style = style)
00039 
00040     def MakeButton(self, text, id = wx.ID_ANY, size = (-1,-1), parent = None):
00041         """!Generic button"""
00042         if not parent:
00043             parent = self
00044         return wx.Button(parent = parent, id = id, label = text,
00045                          size = size)