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 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
|
.. 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
.. _wx.adv.SashEvent:
==========================================================================================================================================
|phoenix_title| **wx.adv.SashEvent**
==========================================================================================================================================
A sash event is sent when the sash of a :ref:`wx.adv.SashWindow` has been dragged by the user.
.. _SashEvent-events:
|events| Events Emitted by this Class
=====================================
Handlers bound for the following event types will receive a :ref:`wx.adv.SashEvent` parameter.
Event macros:
- EVT_SASH_DRAGGED: Process a ``wxEVT_SASH_DRAGGED`` event, when the user has finished dragging a sash.
- EVT_SASH_DRAGGED_RANGE: Process a ``wxEVT_SASH_DRAGGED_RANGE`` event, when the user has finished dragging a sash. The event handler is called when windows with ids in the given range have their sashes dragged.
.. note::
When a sash belonging to a sash window is dragged by the user, and then released, this event is sent to the window, where it may be processed by an event table entry in a derived class, a plug-in event handler or an ancestor class. Note that the :ref:`wx.adv.SashWindow` doesn't change the window's size itself. It relies on the application's event handler to do that. This is because the application may have to handle other consequences of the resize, or it may wish to veto it altogether. The event handler should look at the drag rectangle: see :meth:`wx.adv.SashEvent.GetDragRect` to see what the new size of the window would be if the resize were to be applied. It should also call :meth:`wx.adv.SashEvent.GetDragStatus` to see whether the drag was ``wx.OK`` or out of the current allowed range.
.. seealso:: :ref:`wx.adv.SashWindow`, :ref:`Events and Event Handling <events and event handling>`
|
|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>SashEvent</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.adv.SashEvent_inheritance.png" alt="Inheritance diagram of SashEvent" 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.Event.html" title="wx.Event" alt="" coords="38,83,116,112"/> <area shape="rect" id="node3" href="wx.CommandEvent.html" title="wx.CommandEvent" alt="" coords="5,160,149,189"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="36,5,117,35"/> <area shape="rect" id="node4" href="wx.adv.SashEvent.html" title="wx.adv.SashEvent" alt="" coords="9,237,144,267"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.adv.SashEvent.__init__` Constructor.
:meth:`~wx.adv.SashEvent.GetDragRect` Returns the rectangle representing the new size the window would be if the resize was applied.
:meth:`~wx.adv.SashEvent.GetDragStatus` Returns the status of the sash: one of ``wx.adv.SASH_STATUS_OK``, ``wx.adv.SASH_STATUS_OUT_OF_RANGE``.
:meth:`~wx.adv.SashEvent.GetEdge` Returns the dragged edge.
:meth:`~wx.adv.SashEvent.SetDragRect`
:meth:`~wx.adv.SashEvent.SetDragStatus`
:meth:`~wx.adv.SashEvent.SetEdge`
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.adv.SashEvent.DragRect` See :meth:`~wx.adv.SashEvent.GetDragRect` and :meth:`~wx.adv.SashEvent.SetDragRect`
:attr:`~wx.adv.SashEvent.DragStatus` See :meth:`~wx.adv.SashEvent.GetDragStatus` and :meth:`~wx.adv.SashEvent.SetDragStatus`
:attr:`~wx.adv.SashEvent.Edge` See :meth:`~wx.adv.SashEvent.GetEdge` and :meth:`~wx.adv.SashEvent.SetEdge`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.adv.SashEvent(CommandEvent)
**Possible constructors**::
SashEvent(id=0, edge=SASH_NONE)
A sash event is sent when the sash of a SashWindow has been dragged
by the user.
.. method:: __init__(self, id=0, edge=SASH_NONE)
Constructor.
:param `id`:
:type `id`: int
:param `edge`:
:type `edge`: wx.adv.SashEdgePosition
.. method:: GetDragRect(self)
Returns the rectangle representing the new size the window would be if the resize was applied.
It is up to the application to set the window size if required.
:rtype: :ref:`Rect`
.. method:: GetDragStatus(self)
Returns the status of the sash: one of ``wx.adv.SASH_STATUS_OK``, ``wx.adv.SASH_STATUS_OUT_OF_RANGE``.
If the drag caused the notional bounding box of the window to flip over, for example, the drag will be out of rage.
:rtype: :ref:`wx.adv.SashDragStatus`
.. method:: GetEdge(self)
Returns the dragged edge.
The return value is one of ``wx.adv.SASH_TOP``, ``wx.adv.SASH_RIGHT``, ``wx.adv.SASH_BOTTOM``, ``wx.adv.SASH_LEFT``.
:rtype: :ref:`wx.adv.SashEdgePosition`
.. method:: SetDragRect(self, rect)
:param `rect`:
:type `rect`: wx.Rect
.. method:: SetDragStatus(self, status)
:param `status`:
:type `status`: wx.adv.SashDragStatus
.. method:: SetEdge(self, edge)
:param `edge`:
:type `edge`: wx.adv.SashEdgePosition
.. attribute:: DragRect
See :meth:`~wx.adv.SashEvent.GetDragRect` and :meth:`~wx.adv.SashEvent.SetDragRect`
.. attribute:: DragStatus
See :meth:`~wx.adv.SashEvent.GetDragStatus` and :meth:`~wx.adv.SashEvent.SetDragStatus`
.. attribute:: Edge
See :meth:`~wx.adv.SashEvent.GetEdge` and :meth:`~wx.adv.SashEvent.SetEdge`
|