.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2018 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 <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;"> <img id="toggleBlock-trigger" src="_static/images/closed.png"/> Inheritance diagram for class <strong>NavCanvas</strong>: </div> <div id="toggleBlock-summary" style="display:block;"></div> <div id="toggleBlock-content" style="display:none;"> <p class="graphviz"> <center><img src="_static/images/inheritance/wx.lib.floatcanvas.NavCanvas.NavCanvas_inheritance.png" alt="Inheritance diagram of NavCanvas" usemap="#dummy" class="inheritance"/></center> <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script> <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.floatcanvas.NavCanvas.NavCanvas.html" title="lib.floatcanvas.NavCanvas.NavCanvas encloses a" alt="" coords="5,392,305,421"/> <area shape="rect" id="node2" href="wx.Panel.html" title="A panel is a window on which controls are placed." alt="" coords="115,315,196,344"/> <area shape="rect" id="node3" href="wx.Window.html" title="wx.Window is the base class for all windows and represents any visible object on screen." alt="" coords="107,237,204,267"/> <area shape="rect" id="node4" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="90,160,221,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="96,83,215,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="50,5,138,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="163,5,273,35"/> </map> </p> </div> | |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.