.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.floatcanvas.NavCanvas
.. highlight:: python
.. _wx.lib.floatcanvas.NavCanvas.NavCanvas:
==========================================================================================================================================
|phoenix_title| **wx.lib.floatcanvas.NavCanvas.NavCanvas**
==========================================================================================================================================
:class:`~lib.floatcanvas.NavCanvas.NavCanvas` encloses a
:class:`~lib.floatcanvas.FloatCanvas.FloatCanvas` in a :class:`Panel` and
adds a Navigation toolbar.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
NavCanvas:
|
|super_classes| Known Superclasses
==================================
:class:`wx.Panel`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.floatcanvas.NavCanvas.NavCanvas.__init__` Default class constructor.
:meth:`~wx.lib.floatcanvas.NavCanvas.NavCanvas.AddToolbarModeButtons` Add the mode buttons to the tool bar.
:meth:`~wx.lib.floatcanvas.NavCanvas.NavCanvas.AddToolbarZoomButton` Add the zoom button to the tool bar.
:meth:`~wx.lib.floatcanvas.NavCanvas.NavCanvas.BuildToolbar` Build the default tool bar, can be over-ridden in a subclass to add
:meth:`~wx.lib.floatcanvas.NavCanvas.NavCanvas.HideShowHack` Hack to hide and show button on toolbar to get around OS-X bug on
:meth:`~wx.lib.floatcanvas.NavCanvas.NavCanvas.SetMode` Event handler to set the mode.
:meth:`~wx.lib.floatcanvas.NavCanvas.NavCanvas.ZoomToFit` Event handler to zoom to fit.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: NavCanvas(wx.Panel)
:class:`~lib.floatcanvas.NavCanvas.NavCanvas` encloses a
:class:`~lib.floatcanvas.FloatCanvas.FloatCanvas` in a :class:`Panel` and
adds a Navigation toolbar.
.. method:: __init__(self, parent, id = wx.ID_ANY, size = wx.DefaultSize, \*\*kwargs)
Default class constructor.
:param wx.Window `parent`: parent window. Must not be ``None``;
:param integer `id`: window identifier. A value of -1 indicates a default value;
:param `size`: a tuple or :class:`wx.Size`
:param `**kwargs`: will be passed on to :class:`~lib.floatcanvas.FloatCanvas.FloatCanvas`
.. method:: AddToolbarModeButtons(self, tb, Modes)
Add the mode buttons to the tool bar.
:param ToolBar `tb`: the toolbar instance
:param list `Modes`: a list of modes to add, out of the box valid modes
are subclassed from :class:`~lib.floatcanvas.GUIMode.GUIBase` or modes
can also be user defined.
.. method:: AddToolbarZoomButton(self, tb)
Add the zoom button to the tool bar.
:param ToolBar `tb`: the toolbar instance
.. method:: BuildToolbar(self)
Build the default tool bar, can be over-ridden in a subclass to add
extra tools etc.
.. method:: HideShowHack(self)
Hack to hide and show button on toolbar to get around OS-X bug on
wxPython2.8 on OS-X
.. method:: SetMode(self, event)
Event handler to set the mode.
.. method:: ZoomToFit(self, event)
Event handler to zoom to fit.