NavCanvas
encloses a
FloatCanvas
in a Panel
and
adds a Navigation toolbar.
Default class constructor. |
|
Add the mode buttons to the tool bar. |
|
Add the zoom button to the tool bar. |
|
Build the default tool bar, can be over-ridden in a subclass to add |
|
Hack to hide and show button on toolbar to get around OS-X bug on |
|
Event handler to set the mode. |
|
Event handler to zoom to fit. |
NavCanvas
(wx.Panel)¶NavCanvas
encloses a
FloatCanvas
in a Panel
and
adds a Navigation toolbar.
__init__
(self, parent, id = wx.ID_ANY, size = wx.DefaultSize, **kwargs)¶Default class constructor.
AddToolbarModeButtons
(self, tb, Modes)¶Add the mode buttons to the tool bar.
tb (ToolBar) – the toolbar instance
Modes (list) – a list of modes to add, out of the box valid modes
are subclassed from GUIBase
or modes
can also be user defined.
AddToolbarZoomButton
(self, tb)¶Add the zoom button to the tool bar.
tb (ToolBar) – the toolbar instance
BuildToolbar
(self)¶Build the default tool bar, can be over-ridden in a subclass to add extra tools etc.
HideShowHack
(self)¶Hack to hide and show button on toolbar to get around OS-X bug on wxPython2.8 on OS-X
SetMode
(self, event)¶Event handler to set the mode.
ZoomToFit
(self, event)¶Event handler to zoom to fit.