1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
.. 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>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.Panel.html" title="wx.Panel" alt="" coords="109,315,184,344"/> <area shape="rect" id="node3" href="wx.lib.floatcanvas.NavCanvas.NavCanvas.html" title="wx.lib.floatcanvas.NavCanvas.NavCanvas" alt="" coords="4,392,288,421"/> <area shape="rect" id="node2" href="wx.Window.html" title="wx.Window" alt="" coords="102,237,191,267"/> <area shape="rect" id="node4" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="39,5,140,35"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="91,83,201,112"/> <area shape="rect" id="node7" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="86,160,207,189"/> <area shape="rect" id="node6" href="wx.Object.html" title="wx.Object" alt="" coords="164,5,245,35"/> </map>
</p>
|
|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.
|