File: wx.SplitterEvent.txt

package info (click to toggle)
wxpython4.0 4.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 232,540 kB
  • sloc: cpp: 958,937; python: 233,059; ansic: 150,441; makefile: 51,662; sh: 8,687; perl: 1,563; javascript: 584; php: 326; xml: 200
file content (320 lines) | stat: -rw-r--r-- 10,532 bytes parent folder | download
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
.. 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



.. _wx.SplitterEvent:

==========================================================================================================================================
|phoenix_title|  **wx.SplitterEvent**
==========================================================================================================================================

This class represents the events generated by a splitter control.          

Also there is only one event class, the data associated to the different events is not the same and so not all accessor functions may be called for each event. The documentation mentions the kind of event(s) for which the given accessor function makes sense: calling it for other types of events will result in assert failure (in debug mode) and will return meaningless results. 

^^ 





.. _SplitterEvent-events:

|events| Events Emitted by this Class
=====================================

Handlers bound for the following event types will receive a :ref:`wx.SplitterEvent` parameter.

Event macros: 

- EVT_SPLITTER_SASH_POS_CHANGING: The sash position is in the process of being changed. May be used to modify the position of the tracking bar to properly reflect the position that would be set if the drag were to be completed at this point. Processes a  ``wxEVT_SPLITTER_SASH_POS_CHANGING``   event.   
- EVT_SPLITTER_SASH_POS_CHANGED: The sash position was changed. May be used to modify the sash position before it is set, or to prevent the change from taking place. Processes a  ``wxEVT_SPLITTER_SASH_POS_CHANGED``   event.   
- EVT_SPLITTER_UNSPLIT: The splitter has been just unsplit. Processes a  ``wxEVT_SPLITTER_UNSPLIT``   event.   
- EVT_SPLITTER_DCLICK: The sash was double clicked. The default behaviour is to unsplit the window when this happens (unless the minimum pane size has been set to a value greater than zero). Processes a  ``wxEVT_SPLITTER_DOUBLECLICKED``   event. ^^ 






         



.. seealso:: :ref:`wx.SplitterWindow`, :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>SplitterEvent</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.SplitterEvent_inheritance.png" alt="Inheritance diagram of SplitterEvent" 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.SplitterEvent.html" title="wx.SplitterEvent" alt="" coords="15,315,145,344"/> <area shape="rect" id="node2" href="wx.NotifyEvent.html" title="wx.NotifyEvent" alt="" coords="19,237,141,267"/> <area shape="rect" id="node3" href="wx.CommandEvent.html" title="wx.CommandEvent" alt="" coords="5,160,155,189"/> <area shape="rect" id="node4" href="wx.Event.html" title="wx.Event" alt="" coords="39,83,121,112"/> <area shape="rect" id="node5" href="wx.Object.html" title="wx.Object" alt="" coords="37,5,123,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.SplitterEvent.__init__`                                               Constructor.
:meth:`~wx.SplitterEvent.GetOldSize`                                             Returns the old size before the update.
:meth:`~wx.SplitterEvent.GetSashPosition`                                        Returns the new sash position.
:meth:`~wx.SplitterEvent.GetWindowBeingRemoved`                                  Returns a pointer to the window being removed when a splitter window is unsplit.
:meth:`~wx.SplitterEvent.GetX`                                                   Returns the x coordinate of the double-click point.
:meth:`~wx.SplitterEvent.GetY`                                                   Returns the y coordinate of the double-click point.
:meth:`~wx.SplitterEvent.SetSashPosition`                                        In the case of  ``wxEVT_SPLITTER_SASH_POS_CHANGED``   events, sets the new sash position.
:meth:`~wx.SplitterEvent.SetSize`                                                Sets the size values of the window size.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.SplitterEvent.OldSize`                                                See :meth:`~wx.SplitterEvent.GetOldSize`
:attr:`~wx.SplitterEvent.SashPosition`                                           See :meth:`~wx.SplitterEvent.GetSashPosition` and :meth:`~wx.SplitterEvent.SetSashPosition`
:attr:`~wx.SplitterEvent.WindowBeingRemoved`                                     See :meth:`~wx.SplitterEvent.GetWindowBeingRemoved`
:attr:`~wx.SplitterEvent.X`                                                      See :meth:`~wx.SplitterEvent.GetX`
:attr:`~wx.SplitterEvent.Y`                                                      See :meth:`~wx.SplitterEvent.GetY`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.SplitterEvent(NotifyEvent)

   **Possible constructors**::

       SplitterEvent(eventType=wxEVT_NULL, splitter=None)
       
   
   This class represents the events generated by a splitter control.



   .. method:: __init__(self, eventType=wxEVT_NULL, splitter=None)

      Constructor.                  

      Used internally by wxWidgets only.                  


      :param `eventType`: 
      :type `eventType`: wx.EventType
      :param `splitter`: 
      :type `splitter`: wx.SplitterWindow







   .. method:: GetOldSize(self)

      Returns the old size before the update.                  

      The size value is already adjusted to the orientation of the sash. So for a vertical sash it's the width and for a horizontal sash it's the height. 

      May only be called while processing  ``wxEVT_SPLITTER_SASH_POS_CHANGING`` ,   ``wxEVT_SPLITTER_SASH_POS_RESIZE``   and   ``wxEVT_SPLITTER_SASH_POS_CHANGED``   events.  
      May only be called while processing   ``wxEVT_SPLITTER_SASH_POS_CHANGING`` ,   ``wxEVT_SPLITTER_SASH_POS_RESIZE``   and   ``wxEVT_SPLITTER_SASH_POS_CHANGED``   events.                   

      :rtype: `int`







      .. versionadded:: 4.1/wxWidgets-3.1.6  
         Returns the new size which is set after the update. The size value is already adjusted to the orientation of the sash. So for a vertical sash it's the width and for a horizontal sash it's the height.  







      .. versionadded:: 4.1/wxWidgets-3.1.6  
     








   .. method:: GetSashPosition(self)

      Returns the new sash position.                  

      May only be called while processing  ``wxEVT_SPLITTER_SASH_POS_CHANGING`` ,   ``wxEVT_SPLITTER_SASH_POS_RESIZE``   and   ``wxEVT_SPLITTER_SASH_POS_CHANGED``   events.                   

      :rtype: `int`








   .. method:: GetWindowBeingRemoved(self)

      Returns a pointer to the window being removed when a splitter window is unsplit.                  

      May only be called while processing  ``wxEVT_SPLITTER_UNSPLIT``   events.                   

      :rtype: :ref:`wx.Window`








   .. method:: GetX(self)

      Returns the x coordinate of the double-click point.                  

      May only be called while processing  ``wxEVT_SPLITTER_DOUBLECLICKED``   events.                   

      :rtype: `int`








   .. method:: GetY(self)

      Returns the y coordinate of the double-click point.                  

      May only be called while processing  ``wxEVT_SPLITTER_DOUBLECLICKED``   events.                   

      :rtype: `int`








   .. method:: SetSashPosition(self, pos)

      In the case of  ``wxEVT_SPLITTER_SASH_POS_CHANGED``   events, sets the new sash position.                   

      In the case of  ``wxEVT_SPLITTER_SASH_POS_CHANGING``   events, sets the new tracking bar position so visual feedback during dragging will represent that change that will actually take place. Set to -1 from the event handler code to prevent repositioning. 

      May only be called while processing  ``wxEVT_SPLITTER_SASH_POS_CHANGING`` ,   ``wxEVT_SPLITTER_SASH_POS_RESIZE``   and   ``wxEVT_SPLITTER_SASH_POS_CHANGED``   events. 




      :param `pos`: New sash position.   
      :type `pos`: int




                  





   .. method:: SetSize(self, oldSize, newSize)

      Sets the size values of the window size.                  

      This size is adjusted to the sash orientation. For a vertical sash it should be the width and for a horizontal sash it's the height. 

      May only be called while processing  ``wxEVT_SPLITTER_SASH_POS_CHANGING`` ,   ``wxEVT_SPLITTER_SASH_POS_RESIZE``   and   ``wxEVT_SPLITTER_SASH_POS_CHANGED``   events.                   


      :param `oldSize`: 
      :type `oldSize`: int
      :param `newSize`: 
      :type `newSize`: int






      .. versionadded:: 4.1/wxWidgets-3.1.6  
     








   .. attribute:: OldSize

      See :meth:`~wx.SplitterEvent.GetOldSize`


   .. attribute:: SashPosition

      See :meth:`~wx.SplitterEvent.GetSashPosition` and :meth:`~wx.SplitterEvent.SetSashPosition`


   .. attribute:: WindowBeingRemoved

      See :meth:`~wx.SplitterEvent.GetWindowBeingRemoved`


   .. attribute:: X

      See :meth:`~wx.SplitterEvent.GetX`


   .. attribute:: Y

      See :meth:`~wx.SplitterEvent.GetY`