File: wx.lib.splitter.MultiSplitterWindow.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 (276 lines) | stat: -rw-r--r-- 11,894 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
.. 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.splitter

.. highlight:: python



.. _wx.lib.splitter.MultiSplitterWindow:

==========================================================================================================================================
|phoenix_title|  **wx.lib.splitter.MultiSplitterWindow**
==========================================================================================================================================

This class is very similar to `wx.SplitterWindow` except that it
allows for more than two windows and more than one sash.  Many of
the same styles, constants, and methods behave the same as in
wx.SplitterWindow.  The key differences are seen in the methods
that deal with the child windows managed by the splitter, and also
those that deal with the sash positions.  In most cases you will
need to pass an index value to tell the class which window or sash
you are referring to.

The concept of the sash position is also different than in
wx.SplitterWindow.  Since the wx.Splitterwindow has only one sash
you can think of it's position as either relative to the whole
splitter window, or as relative to the first window pane managed
by the splitter.  Once there is more than one sash then the
distinciton between the two concepts needs to be clairified.  I've
chosen to use the second definition, and sash positions are the
distance (either horizontally or vertically) from the origin of
the window just before the sash in the splitter stack.

NOTE: These things are not yet supported:

    * Using negative sash positions to indicate a position offset
      from the end.

    * User controlled unsplitting (with double clicks on the sash
      or dragging a sash until the pane size is zero.)

    * Sash gravity



|

|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>MultiSplitterWindow</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.splitter.MultiSplitterWindow_inheritance.png" alt="Inheritance diagram of MultiSplitterWindow" 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.splitter.MultiSplitterWindow.html" title="wx.lib.splitter.MultiSplitterWindow" alt="" coords="5,392,251,421"/> <area shape="rect" id="node2" href="wx.Panel.html" title="wx.Panel" alt="" coords="88,315,168,344"/> <area shape="rect" id="node3" href="wx.Window.html" title="wx.Window" alt="" coords="79,237,177,267"/> <area shape="rect" id="node4" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="63,160,193,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="69,83,187,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="wx.Object" alt="" coords="25,5,111,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="136,5,243,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.Panel`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.splitter.MultiSplitterWindow.__init__`                            Default class constructor.
:meth:`~wx.lib.splitter.MultiSplitterWindow.AppendWindow`                        Add a new window to the splitter at the right side or bottom
:meth:`~wx.lib.splitter.MultiSplitterWindow.DetachWindow`                        Removes the window from the stack of windows managed by the
:meth:`~wx.lib.splitter.MultiSplitterWindow.DoGetBestSize`                       Overridden base class virtual.  Determines the best size of
:meth:`~wx.lib.splitter.MultiSplitterWindow.ExchangeWindows`                     Trade the positions in the splitter of the two windows.
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetMinimumPaneSize`                  Returns the smallest allowed size for a window pane.
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetOrientation`                      Returns the current orientation of the splitter, either
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetSashPosition`                     Returns the position of the idx'th sash, measured from the
:meth:`~wx.lib.splitter.MultiSplitterWindow.GetWindow`                           Returns the idx'th window being managed by the splitter.
:meth:`~wx.lib.splitter.MultiSplitterWindow.InsertWindow`                        Insert a new window into the splitter.
:meth:`~wx.lib.splitter.MultiSplitterWindow.ReplaceWindow`                       Replaces oldWindow (which is currently being managed by the
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetBackgroundColour`                 Sets the back ground colour.
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetMinimumPaneSize`                  Set the smallest size that any pane will be allowed to be
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetOrientation`                      Set whether the windows managed by the splitter will be
:meth:`~wx.lib.splitter.MultiSplitterWindow.SetSashPosition`                     Set the position of the idx'th sash, measured from the left/top
:meth:`~wx.lib.splitter.MultiSplitterWindow.SizeWindows`                         Reposition and size the windows managed by the splitter.
================================================================================ ================================================================================


|


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


.. class:: MultiSplitterWindow(wx.Panel)

   This class is very similar to `wx.SplitterWindow` except that it
   allows for more than two windows and more than one sash.  Many of
   the same styles, constants, and methods behave the same as in
   wx.SplitterWindow.  The key differences are seen in the methods
   that deal with the child windows managed by the splitter, and also
   those that deal with the sash positions.  In most cases you will
   need to pass an index value to tell the class which window or sash
   you are referring to.
   
   The concept of the sash position is also different than in
   wx.SplitterWindow.  Since the wx.Splitterwindow has only one sash
   you can think of it's position as either relative to the whole
   splitter window, or as relative to the first window pane managed
   by the splitter.  Once there is more than one sash then the
   distinciton between the two concepts needs to be clairified.  I've
   chosen to use the second definition, and sash positions are the
   distance (either horizontally or vertically) from the origin of
   the window just before the sash in the splitter stack.
   
   NOTE: These things are not yet supported:
   
       * Using negative sash positions to indicate a position offset
         from the end.
   
       * User controlled unsplitting (with double clicks on the sash
         or dragging a sash until the pane size is zero.)
   
       * Sash gravity

   .. method:: __init__(self, parent, id=-1, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0, name="multiSplitter")

      Default class constructor.
      
      :param wx.Window `parent`: the parent window
      :param integer `id`: an identifier for the control: a value of -1 is taken to mean a default
      :param wx.Point `pos`: the control position. A value of (-1, -1) indicates a default position,
        chosen by either the windowing system or wxPython, depending on platform
      :param wx.Size `size`: the control size. A value of (-1, -1) indicates a default size,
        chosen by either the windowing system or wxPython, depending on platform
      :param integer `style`: the control window style
      :param string `name`: the control name


   .. method:: AppendWindow(self, window, sashPos=-1)

      Add a new window to the splitter at the right side or bottom
      of the window stack.
      
      :param `window`: the window to add to the splitter
      :param `sashPos`: if given it is used to size the new window


   .. method:: DetachWindow(self, window)

      Removes the window from the stack of windows managed by the
      splitter.  The window will still exist so you should `Hide` or
      `Destroy` it as needed.
      
      :param `window`: the window to be removed from the splitter


   .. method:: DoGetBestSize(self)

      Overridden base class virtual.  Determines the best size of
      the control based on the best sizes of the child windows.


   .. method:: ExchangeWindows(self, window1, window2)

      Trade the positions in the splitter of the two windows.
      
      :param `window1`: the first window to switch position
      :param `window2`: the second window to switch position


   .. method:: GetMinimumPaneSize(self)

      Returns the smallest allowed size for a window pane.


   .. method:: GetOrientation(self)

      Returns the current orientation of the splitter, either
      ``wx.VERTICAL`` or ``wx.HORIZONTAL``.


   .. method:: GetSashPosition(self, idx)

      Returns the position of the idx'th sash, measured from the
      left/top of the window preceding the sash.
      
      :param int `idx`: get the sash position of the given index


   .. method:: GetWindow(self, idx)

      Returns the idx'th window being managed by the splitter.
      
      :param int `idx`: get the window at the given index


   .. method:: InsertWindow(self, idx, window, sashPos=-1)

      Insert a new window into the splitter.
      
      :param int `idx`: the position to insert the window at.
      :param `window`: the window to add to the splitter
      :param `sashPos`: if given it is used to size the new window


   .. method:: ReplaceWindow(self, oldWindow, newWindow)

      Replaces oldWindow (which is currently being managed by the
      splitter) with newWindow.  The oldWindow window will still
      exist so you should `Hide` or `Destroy` it as needed.
      
      :param `oldWindow`: the window to be replace
      :param `newWindow`: the window to replace the above window


   .. method:: SetBackgroundColour(self,color)

      Sets the back ground colour.
      
      :param wx.Colour `color`: the colour to use.


   .. method:: SetMinimumPaneSize(self, minSize)

      Set the smallest size that any pane will be allowed to be
      resized to.
      
      :param int `minSize`: the minimum size of pane


   .. method:: SetOrientation(self, orient)

      Set whether the windows managed by the splitter will be
      stacked vertically or horizontally.  The default is
      horizontal.
      
      :param `orient`: either ``wx.VERTICAL`` or ``wx.HORIZONTAL``


   .. method:: SetSashPosition(self, idx, pos)

      Set the position of the idx'th sash, measured from the left/top
      of the window preceding the sash.
      
      :param int `idx`: set the sash position of the given index
      :param int `pos`: the sash position


   .. method:: SizeWindows(self)

      Reposition and size the windows managed by the splitter.
      Useful when windows have been added/removed or when styles
      have been changed.