1wxSplitterWindow(3)        Erlang Module Definition        wxSplitterWindow(3)
2
3
4

NAME

6       wxSplitterWindow - Functions for wxSplitterWindow class
7

DESCRIPTION

9       This  class manages up to two subwindows. The current view can be split
10       into two programmatically (perhaps from a menu  command),  and  unsplit
11       either programmatically or via the wxSplitterWindow user interface.
12
13       Styles
14
15       This class supports the following styles:
16
17       See: wxSplitterEvent, Overview splitterwindow
18
19       This  class  is  derived  (and  can  use  functions) from: wxWindow wx‐
20       EvtHandler
21
22       wxWidgets docs: wxSplitterWindow
23

EVENTS

25       Event types emitted from this  class:  command_splitter_sash_pos_chang‐
26       ing, command_splitter_sash_pos_changed, command_splitter_unsplit
27

DATA TYPES

29       wxSplitterWindow() = wx:wx_object()
30

EXPORTS

32       new() -> wxSplitterWindow()
33
34              Default constructor.
35
36       new(Parent) -> wxSplitterWindow()
37
38              Types:
39
40                 Parent = wxWindow:wxWindow()
41
42       new(Parent, Options :: [Option]) -> wxSplitterWindow()
43
44              Types:
45
46                 Parent = wxWindow:wxWindow()
47                 Option =
48                     {id, integer()} |
49                     {pos, {X :: integer(), Y :: integer()}} |
50                     {size, {W :: integer(), H :: integer()}} |
51                     {style, integer()}
52
53              Constructor for creating the window.
54
55              Remark: After using this constructor, you must create either one
56              or two subwindows with the splitter window as parent,  and  then
57              call  one  of  initialize/2, splitVertically/4 and splitHorizon‐
58              tally/4 in order to set the pane(s). You can create two windows,
59              with  one  hidden  when  not  being shown; or you can create and
60              delete the second pane on demand.
61
62              See: initialize/2, splitVertically/4, splitHorizontally/4,  cre‐
63              ate/3
64
65       destroy(This :: wxSplitterWindow()) -> ok
66
67              Destroys the wxSplitterWindow and its children.
68
69       create(This, Parent) -> boolean()
70
71              Types:
72
73                 This = wxSplitterWindow()
74                 Parent = wxWindow:wxWindow()
75
76       create(This, Parent, Options :: [Option]) -> boolean()
77
78              Types:
79
80                 This = wxSplitterWindow()
81                 Parent = wxWindow:wxWindow()
82                 Option =
83                     {id, integer()} |
84                     {pos, {X :: integer(), Y :: integer()}} |
85                     {size, {W :: integer(), H :: integer()}} |
86                     {style, integer()}
87
88              Creation function, for two-step construction.
89
90              See new/2 for details.
91
92       getMinimumPaneSize(This) -> integer()
93
94              Types:
95
96                 This = wxSplitterWindow()
97
98              Returns the current minimum pane size (defaults to zero).
99
100              See: setMinimumPaneSize/2
101
102       getSashGravity(This) -> number()
103
104              Types:
105
106                 This = wxSplitterWindow()
107
108              Returns the current sash gravity.
109
110              See: setSashGravity/2
111
112       getSashPosition(This) -> integer()
113
114              Types:
115
116                 This = wxSplitterWindow()
117
118              Returns the current sash position.
119
120              See: setSashPosition/3
121
122       getSplitMode(This) -> wx:wx_enum()
123
124              Types:
125
126                 This = wxSplitterWindow()
127
128              Gets the split mode.
129
130              See: setSplitMode/2, splitVertically/4, splitHorizontally/4
131
132       getWindow1(This) -> wxWindow:wxWindow()
133
134              Types:
135
136                 This = wxSplitterWindow()
137
138              Returns the left/top or only pane.
139
140       getWindow2(This) -> wxWindow:wxWindow()
141
142              Types:
143
144                 This = wxSplitterWindow()
145
146              Returns the right/bottom pane.
147
148       initialize(This, Window) -> ok
149
150              Types:
151
152                 This = wxSplitterWindow()
153                 Window = wxWindow:wxWindow()
154
155              Initializes the splitter window to have one pane.
156
157              The child window is shown if it is currently hidden.
158
159              Remark: This should be called if you wish to initially view only
160              a single pane in the splitter window.
161
162              See: splitVertically/4, splitHorizontally/4
163
164       isSplit(This) -> boolean()
165
166              Types:
167
168                 This = wxSplitterWindow()
169
170              Returns true if the window is split, false otherwise.
171
172       replaceWindow(This, WinOld, WinNew) -> boolean()
173
174              Types:
175
176                 This = wxSplitterWindow()
177                 WinOld = WinNew = wxWindow:wxWindow()
178
179              This function replaces one of the windows managed  by  the  wxS‐
180              plitterWindow with another one.
181
182              It  is  in general better to use it instead of calling unsplit/2
183              and then resplitting the window back  because  it  will  provoke
184              much  less  flicker  (if any). It is valid to call this function
185              whether the splitter has two windows or only one.
186
187              Both parameters should be non-NULL and winOld must  specify  one
188              of  the  windows  managed by the splitter. If the parameters are
189              incorrect or the window couldn't be replaced, false is returned.
190              Otherwise  the function will return true, but please notice that
191              it will not delete the replaced window and you may wish to do it
192              yourself.
193
194              See: getMinimumPaneSize/1
195
196       setSashGravity(This, Gravity) -> ok
197
198              Types:
199
200                 This = wxSplitterWindow()
201                 Gravity = number()
202
203              Sets the sash gravity.
204
205              Remark:  Gravity  is real factor which controls position of sash
206              while resizing wxSplitterWindow. Gravity tells  wxSplitterWindow
207              how  much will left/top window grow while resizing. Example val‐
208              ues:
209
210              Notice that when sash gravity for a newly created splitter  win‐
211              dow,  it  is often necessary to explicitly set the splitter size
212              using wxWindow:setSize/6 to ensure that is big  enough  for  its
213              initial  sash position. Otherwise, i.e. if the window is created
214              with the default tiny size and only resized to its correct  size
215              later, the initial sash position will be affected by the gravity
216              and typically result in sash being at the rightmost position for
217              the gravity of 1. See the example code creating wxSplitterWindow
218              in the splitter sample for more details.
219
220              See: getSashGravity/1
221
222       setSashPosition(This, Position) -> ok
223
224              Types:
225
226                 This = wxSplitterWindow()
227                 Position = integer()
228
229       setSashPosition(This, Position, Options :: [Option]) -> ok
230
231              Types:
232
233                 This = wxSplitterWindow()
234                 Position = integer()
235                 Option = {redraw, boolean()}
236
237              Sets the sash position.
238
239              Remark: Does not currently check for an out-of-range value.
240
241              See: getSashPosition/1
242
243       setMinimumPaneSize(This, PaneSize) -> ok
244
245              Types:
246
247                 This = wxSplitterWindow()
248                 PaneSize = integer()
249
250              Sets the minimum pane size.
251
252              Remark: The default minimum pane size is zero, which means  that
253              either  pane  can  be reduced to zero by dragging the sash, thus
254              removing one of the panes. To prevent this behaviour  (and  veto
255              out-of-range  sash dragging), set a minimum size, for example 20
256              pixels. If the wxSP_PERMIT_UNSPLIT style is used when a splitter
257              window  is  created,  the  window may be unsplit even if minimum
258              size is non-zero.
259
260              See: getMinimumPaneSize/1
261
262       setSplitMode(This, Mode) -> ok
263
264              Types:
265
266                 This = wxSplitterWindow()
267                 Mode = integer()
268
269              Sets the split mode.
270
271              Remark: Only sets the internal variable;  does  not  update  the
272              display.
273
274              See: getSplitMode/1, splitVertically/4, splitHorizontally/4
275
276       splitHorizontally(This, Window1, Window2) -> boolean()
277
278              Types:
279
280                 This = wxSplitterWindow()
281                 Window1 = Window2 = wxWindow:wxWindow()
282
283       splitHorizontally(This, Window1, Window2, Options :: [Option]) ->
284                            boolean()
285
286              Types:
287
288                 This = wxSplitterWindow()
289                 Window1 = Window2 = wxWindow:wxWindow()
290                 Option = {sashPosition, integer()}
291
292              Initializes the top and bottom panes of the splitter window.
293
294              The child windows are shown if they are currently hidden.
295
296              Return:  true if successful, false otherwise (the window was al‐
297              ready split).
298
299              Remark: This should be called if you wish to initially view  two
300              panes. It can also be called at any subsequent time, but the ap‐
301              plication should check that the window is  not  currently  split
302              using isSplit/1.
303
304              See: splitVertically/4, isSplit/1, unsplit/2
305
306       splitVertically(This, Window1, Window2) -> boolean()
307
308              Types:
309
310                 This = wxSplitterWindow()
311                 Window1 = Window2 = wxWindow:wxWindow()
312
313       splitVertically(This, Window1, Window2, Options :: [Option]) ->
314                          boolean()
315
316              Types:
317
318                 This = wxSplitterWindow()
319                 Window1 = Window2 = wxWindow:wxWindow()
320                 Option = {sashPosition, integer()}
321
322              Initializes the left and right panes of the splitter window.
323
324              The child windows are shown if they are currently hidden.
325
326              Return:  true if successful, false otherwise (the window was al‐
327              ready split).
328
329              Remark: This should be called if you wish to initially view  two
330              panes. It can also be called at any subsequent time, but the ap‐
331              plication should check that the window is  not  currently  split
332              using isSplit/1.
333
334              See: splitHorizontally/4, isSplit/1, unsplit/2
335
336       unsplit(This) -> boolean()
337
338              Types:
339
340                 This = wxSplitterWindow()
341
342       unsplit(This, Options :: [Option]) -> boolean()
343
344              Types:
345
346                 This = wxSplitterWindow()
347                 Option = {toRemove, wxWindow:wxWindow()}
348
349              Unsplits the window.
350
351              Return:  true if successful, false otherwise (the window was not
352              split).
353
354              Remark: This call will not actually delete the  pane  being  re‐
355              moved; it calls OnUnsplit() (not implemented in wx) which can be
356              overridden for the desired behaviour. By default, the pane being
357              removed is hidden.
358
359              See:  splitHorizontally/4,  splitVertically/4,  isSplit/1, OnUn‐
360              split() (not implemented in wx)
361
362       updateSize(This) -> ok
363
364              Types:
365
366                 This = wxSplitterWindow()
367
368              Causes any pending sizing of the sash and child  panes  to  take
369              place immediately.
370
371              Such  resizing  normally  takes  place in idle time, in order to
372              wait for layout to be completed. However, this can  cause  unac‐
373              ceptable  flicker  as the panes are resized after the window has
374              been shown. To work around this, you can perform  window  layout
375              (for  example by sending a size event to the parent window), and
376              then call this function, before showing the top-level window.
377
378
379
380wxWidgets team.                    wx 2.2.2                wxSplitterWindow(3)
Impressum