[GRASS-SVN] r50583 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 31 06:10:33 EST 2012
Author: annakrat
Date: 2012-01-31 03:10:33 -0800 (Tue, 31 Jan 2012)
New Revision: 50583
Modified:
grass/trunk/gui/wxpython/gui_core/toolbars.py
Log:
wxGUI: extend documentation
Modified: grass/trunk/gui/wxpython/gui_core/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/toolbars.py 2012-01-31 10:36:06 UTC (rev 50582)
+++ grass/trunk/gui/wxpython/gui_core/toolbars.py 2012-01-31 11:10:33 UTC (rev 50583)
@@ -78,7 +78,23 @@
}
class BaseToolbar(wx.ToolBar):
- """!Abstract toolbar class"""
+ """!Abstract toolbar class.
+
+ Following code shows how to create new basic toolbar:
+
+ @code
+ class MyToolbar(BaseToolbar):
+ def __init__(self, parent):
+ BaseToolbar.__init__(self, parent)
+ self.InitToolbar(self._toolbarData())
+ self.Realize()
+
+ def _toolbarData(self):
+ return self._getToolbarData((("help", Icons["help"],
+ self.parent.OnHelp),
+ ))
+ @endcode
+ """
def __init__(self, parent):
self.parent = parent
wx.ToolBar.__init__(self, parent = self.parent, id = wx.ID_ANY)
More information about the grass-commit
mailing list