wx.lib.floatcanvas.NavCanvas.NavCanvas¶
NavCanvas
encloses a
FloatCanvas
in a Panel
and
adds a Navigation toolbar.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
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. |
Class API¶
- class NavCanvas(wx.Panel)¶
NavCanvas
encloses aFloatCanvas
in aPanel
and adds a Navigation toolbar.
Methods¶
- __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.
- Parameters:
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.
- Parameters:
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.