]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/sizers.py
wxPython Merge #2 of 2.4 branch --> HEAD (branch tag: wxPy_2_4_merge_2)
[wxWidgets.git] / wxPython / src / gtk / sizers.py
1 # This file was created automatically by SWIG.
2 import sizersc
3
4 from misc import *
5
6 from windows import *
7
8 from gdi import *
9
10 from fonts import *
11
12 from clip_dnd import *
13
14 from controls import *
15
16 from events import *
17 import wx
18 class wxSizerItemPtr(wxObjectPtr):
19 def __init__(self,this):
20 self.this = this
21 self.thisown = 0
22 def DeleteWindows(self, *_args, **_kwargs):
23 val = sizersc.wxSizerItem_DeleteWindows(self, *_args, **_kwargs)
24 return val
25 def DetachSizer(self, *_args, **_kwargs):
26 val = sizersc.wxSizerItem_DetachSizer(self, *_args, **_kwargs)
27 return val
28 def GetSize(self, *_args, **_kwargs):
29 val = sizersc.wxSizerItem_GetSize(self, *_args, **_kwargs)
30 if val: val = wxSizePtr(val) ; val.thisown = 1
31 return val
32 def CalcMin(self, *_args, **_kwargs):
33 val = sizersc.wxSizerItem_CalcMin(self, *_args, **_kwargs)
34 if val: val = wxSizePtr(val) ; val.thisown = 1
35 return val
36 def SetDimension(self, *_args, **_kwargs):
37 val = sizersc.wxSizerItem_SetDimension(self, *_args, **_kwargs)
38 return val
39 def GetMinSize(self, *_args, **_kwargs):
40 val = sizersc.wxSizerItem_GetMinSize(self, *_args, **_kwargs)
41 if val: val = wxSizePtr(val) ; val.thisown = 1
42 return val
43 def SetInitSize(self, *_args, **_kwargs):
44 val = sizersc.wxSizerItem_SetInitSize(self, *_args, **_kwargs)
45 return val
46 def SetRatioWH(self, *_args, **_kwargs):
47 val = sizersc.wxSizerItem_SetRatioWH(self, *_args, **_kwargs)
48 return val
49 def SetRatioSize(self, *_args, **_kwargs):
50 val = sizersc.wxSizerItem_SetRatioSize(self, *_args, **_kwargs)
51 return val
52 def SetRatio(self, *_args, **_kwargs):
53 val = sizersc.wxSizerItem_SetRatio(self, *_args, **_kwargs)
54 return val
55 def GetRatio(self, *_args, **_kwargs):
56 val = sizersc.wxSizerItem_GetRatio(self, *_args, **_kwargs)
57 return val
58 def IsWindow(self, *_args, **_kwargs):
59 val = sizersc.wxSizerItem_IsWindow(self, *_args, **_kwargs)
60 return val
61 def IsSizer(self, *_args, **_kwargs):
62 val = sizersc.wxSizerItem_IsSizer(self, *_args, **_kwargs)
63 return val
64 def IsSpacer(self, *_args, **_kwargs):
65 val = sizersc.wxSizerItem_IsSpacer(self, *_args, **_kwargs)
66 return val
67 def SetProportion(self, *_args, **_kwargs):
68 val = sizersc.wxSizerItem_SetProportion(self, *_args, **_kwargs)
69 return val
70 def GetProportion(self, *_args, **_kwargs):
71 val = sizersc.wxSizerItem_GetProportion(self, *_args, **_kwargs)
72 return val
73 def SetFlag(self, *_args, **_kwargs):
74 val = sizersc.wxSizerItem_SetFlag(self, *_args, **_kwargs)
75 return val
76 def GetFlag(self, *_args, **_kwargs):
77 val = sizersc.wxSizerItem_GetFlag(self, *_args, **_kwargs)
78 return val
79 def SetBorder(self, *_args, **_kwargs):
80 val = sizersc.wxSizerItem_SetBorder(self, *_args, **_kwargs)
81 return val
82 def GetBorder(self, *_args, **_kwargs):
83 val = sizersc.wxSizerItem_GetBorder(self, *_args, **_kwargs)
84 return val
85 def GetWindow(self, *_args, **_kwargs):
86 val = sizersc.wxSizerItem_GetWindow(self, *_args, **_kwargs)
87 return val
88 def SetWindow(self, *_args, **_kwargs):
89 val = sizersc.wxSizerItem_SetWindow(self, *_args, **_kwargs)
90 return val
91 def GetSizer(self, *_args, **_kwargs):
92 val = sizersc.wxSizerItem_GetSizer(self, *_args, **_kwargs)
93 return val
94 def SetSizer(self, *_args, **_kwargs):
95 val = sizersc.wxSizerItem_SetSizer(self, *_args, **_kwargs)
96 return val
97 def GetSpacer(self, *_args, **_kwargs):
98 val = sizersc.wxSizerItem_GetSpacer(self, *_args, **_kwargs)
99 if val: val = wxSizePtr(val)
100 return val
101 def SetSpacer(self, *_args, **_kwargs):
102 val = sizersc.wxSizerItem_SetSpacer(self, *_args, **_kwargs)
103 return val
104 def Show(self, *_args, **_kwargs):
105 val = sizersc.wxSizerItem_Show(self, *_args, **_kwargs)
106 return val
107 def IsShown(self, *_args, **_kwargs):
108 val = sizersc.wxSizerItem_IsShown(self, *_args, **_kwargs)
109 return val
110 def GetPosition(self, *_args, **_kwargs):
111 val = sizersc.wxSizerItem_GetPosition(self, *_args, **_kwargs)
112 if val: val = wxPointPtr(val) ; val.thisown = 1
113 return val
114 def GetUserData(self, *_args, **_kwargs):
115 val = sizersc.wxSizerItem_GetUserData(self, *_args, **_kwargs)
116 return val
117 def __repr__(self):
118 return "<%s.%s instance; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
119 SetOption = SetProportion
120 GetOption = GetProportion
121 class wxSizerItem(wxSizerItemPtr):
122 def __init__(self,this):
123 self.this = this
124
125
126
127
128 class wxSizerPtr(wxObjectPtr):
129 def __init__(self,this):
130 self.this = this
131 self.thisown = 0
132 def _setOORInfo(self, *_args, **_kwargs):
133 val = sizersc.wxSizer__setOORInfo(self, *_args, **_kwargs)
134 return val
135 def Destroy(self, *_args, **_kwargs):
136 val = sizersc.wxSizer_Destroy(self, *_args, **_kwargs)
137 return val
138 def _Add(self, *_args, **_kwargs):
139 val = sizersc.wxSizer__Add(self, *_args, **_kwargs)
140 return val
141 def _Insert(self, *_args, **_kwargs):
142 val = sizersc.wxSizer__Insert(self, *_args, **_kwargs)
143 return val
144 def _Prepend(self, *_args, **_kwargs):
145 val = sizersc.wxSizer__Prepend(self, *_args, **_kwargs)
146 return val
147 def Remove(self, *_args, **_kwargs):
148 val = sizersc.wxSizer_Remove(self, *_args, **_kwargs)
149 return val
150 def _SetItemMinSize(self, *_args, **_kwargs):
151 val = sizersc.wxSizer__SetItemMinSize(self, *_args, **_kwargs)
152 return val
153 def SetDimension(self, *_args, **_kwargs):
154 val = sizersc.wxSizer_SetDimension(self, *_args, **_kwargs)
155 return val
156 def SetMinSize(self, *_args, **_kwargs):
157 val = sizersc.wxSizer_SetMinSize(self, *_args, **_kwargs)
158 return val
159 def GetSize(self, *_args, **_kwargs):
160 val = sizersc.wxSizer_GetSize(self, *_args, **_kwargs)
161 if val: val = wxSizePtr(val) ; val.thisown = 1
162 return val
163 def GetPosition(self, *_args, **_kwargs):
164 val = sizersc.wxSizer_GetPosition(self, *_args, **_kwargs)
165 if val: val = wxPointPtr(val) ; val.thisown = 1
166 return val
167 def GetMinSize(self, *_args, **_kwargs):
168 val = sizersc.wxSizer_GetMinSize(self, *_args, **_kwargs)
169 if val: val = wxSizePtr(val) ; val.thisown = 1
170 return val
171 def Layout(self, *_args, **_kwargs):
172 val = sizersc.wxSizer_Layout(self, *_args, **_kwargs)
173 return val
174 def Fit(self, *_args, **_kwargs):
175 val = sizersc.wxSizer_Fit(self, *_args, **_kwargs)
176 if val: val = wxSizePtr(val) ; val.thisown = 1
177 return val
178 def FitInside(self, *_args, **_kwargs):
179 val = sizersc.wxSizer_FitInside(self, *_args, **_kwargs)
180 return val
181 def SetSizeHints(self, *_args, **_kwargs):
182 val = sizersc.wxSizer_SetSizeHints(self, *_args, **_kwargs)
183 return val
184 def SetVirtualSizeHints(self, *_args, **_kwargs):
185 val = sizersc.wxSizer_SetVirtualSizeHints(self, *_args, **_kwargs)
186 return val
187 def Clear(self, *_args, **_kwargs):
188 val = sizersc.wxSizer_Clear(self, *_args, **_kwargs)
189 return val
190 def DeleteWindows(self, *_args, **_kwargs):
191 val = sizersc.wxSizer_DeleteWindows(self, *_args, **_kwargs)
192 return val
193 def GetChildren(self, *_args, **_kwargs):
194 val = sizersc.wxSizer_GetChildren(self, *_args, **_kwargs)
195 return val
196 def Show(self, *_args, **_kwargs):
197 val = sizersc.wxSizer_Show(self, *_args, **_kwargs)
198 return val
199 def Hide(self, *_args, **_kwargs):
200 val = sizersc.wxSizer_Hide(self, *_args, **_kwargs)
201 return val
202 def IsShown(self, *_args, **_kwargs):
203 val = sizersc.wxSizer_IsShown(self, *_args, **_kwargs)
204 return val
205 def ShowItems(self, *_args, **_kwargs):
206 val = sizersc.wxSizer_ShowItems(self, *_args, **_kwargs)
207 return val
208 def __repr__(self):
209 return "<%s.%s instance; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
210
211 def Add(self, item, *args, **kw):
212 if type(item) == type(1):
213 item = (item, args[0]) # backwards compatibility, args are width, height
214 args = args[1:]
215 self._Add(item, *args, **kw)
216
217 def AddMany(self, widgets):
218 for childinfo in widgets:
219 if type(childinfo) != type(()):
220 childinfo = (childinfo, )
221 self.Add(*childinfo)
222
223 def Prepend(self, item, *args, **kw):
224 if type(item) == type(1):
225 item = (item, args[0]) # backwards compatibility, args are width, height
226 args = args[1:]
227 self._Prepend(item, *args, **kw)
228
229 def Insert(self, before, item, *args, **kw):
230 if type(item) == type(1):
231 item = (item, args[0]) # backwards compatibility, args are width, height
232 args = args[1:]
233 self._Insert(before, item, *args, **kw)
234
235
236 # for backwards compatibility only
237 AddWindow = AddSizer = AddSpacer = Add
238 PrependWindow = PrependSizer = PrependSpacer = Prepend
239 InsertWindow = InsertSizer = InsertSpacer = Insert
240 RemoveWindow = RemoveSizer = RemovePos = Remove
241
242
243 def SetItemMinSize(self, item, *args):
244 if len(args) == 2:
245 return self._SetItemMinSize(item, args)
246 else:
247 return self._SetItemMinSize(item, args[0])
248
249
250
251 def GetSizeTuple(self):
252 return self.GetSize().asTuple()
253 def GetPositionTuple(self):
254 return self.GetPosition().asTuple()
255 def GetMinSizeTuple(self):
256 return self.GetMinSize().asTuple()
257
258 class wxSizer(wxSizerPtr):
259 def __init__(self,this):
260 self.this = this
261
262
263
264
265 class wxPySizerPtr(wxSizerPtr):
266 def __init__(self,this):
267 self.this = this
268 self.thisown = 0
269 def _setCallbackInfo(self, *_args, **_kwargs):
270 val = sizersc.wxPySizer__setCallbackInfo(self, *_args, **_kwargs)
271 return val
272 def __repr__(self):
273 return "<%s.%s instance; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
274 class wxPySizer(wxPySizerPtr):
275 def __init__(self,*_args,**_kwargs):
276 self.this = sizersc.new_wxPySizer(*_args,**_kwargs)
277 self.thisown = 1
278 self._setCallbackInfo(self, wxPySizer)
279 self._setOORInfo(self)
280
281
282
283
284 class wxBoxSizerPtr(wxSizerPtr):
285 def __init__(self,this):
286 self.this = this
287 self.thisown = 0
288 def GetOrientation(self, *_args, **_kwargs):
289 val = sizersc.wxBoxSizer_GetOrientation(self, *_args, **_kwargs)
290 return val
291 def SetOrientation(self, *_args, **_kwargs):
292 val = sizersc.wxBoxSizer_SetOrientation(self, *_args, **_kwargs)
293 return val
294 def RecalcSizes(self, *_args, **_kwargs):
295 val = sizersc.wxBoxSizer_RecalcSizes(self, *_args, **_kwargs)
296 return val
297 def CalcMin(self, *_args, **_kwargs):
298 val = sizersc.wxBoxSizer_CalcMin(self, *_args, **_kwargs)
299 if val: val = wxSizePtr(val) ; val.thisown = 1
300 return val
301 def __repr__(self):
302 return "<%s.%s instance; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
303 class wxBoxSizer(wxBoxSizerPtr):
304 def __init__(self,*_args,**_kwargs):
305 self.this = sizersc.new_wxBoxSizer(*_args,**_kwargs)
306 self.thisown = 1
307 self._setOORInfo(self)
308
309
310
311
312 class wxStaticBoxSizerPtr(wxBoxSizerPtr):
313 def __init__(self,this):
314 self.this = this
315 self.thisown = 0
316 def GetStaticBox(self, *_args, **_kwargs):
317 val = sizersc.wxStaticBoxSizer_GetStaticBox(self, *_args, **_kwargs)
318 return val
319 def RecalcSizes(self, *_args, **_kwargs):
320 val = sizersc.wxStaticBoxSizer_RecalcSizes(self, *_args, **_kwargs)
321 return val
322 def CalcMin(self, *_args, **_kwargs):
323 val = sizersc.wxStaticBoxSizer_CalcMin(self, *_args, **_kwargs)
324 if val: val = wxSizePtr(val) ; val.thisown = 1
325 return val
326 def __repr__(self):
327 return "<%s.%s instance; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
328 class wxStaticBoxSizer(wxStaticBoxSizerPtr):
329 def __init__(self,*_args,**_kwargs):
330 self.this = sizersc.new_wxStaticBoxSizer(*_args,**_kwargs)
331 self.thisown = 1
332 self._setOORInfo(self)
333
334
335
336
337 class wxNotebookSizerPtr(wxSizerPtr):
338 def __init__(self,this):
339 self.this = this
340 self.thisown = 0
341 def RecalcSizes(self, *_args, **_kwargs):
342 val = sizersc.wxNotebookSizer_RecalcSizes(self, *_args, **_kwargs)
343 return val
344 def CalcMin(self, *_args, **_kwargs):
345 val = sizersc.wxNotebookSizer_CalcMin(self, *_args, **_kwargs)
346 if val: val = wxSizePtr(val) ; val.thisown = 1
347 return val
348 def GetNotebook(self, *_args, **_kwargs):
349 val = sizersc.wxNotebookSizer_GetNotebook(self, *_args, **_kwargs)
350 return val
351 def __repr__(self):
352 return "<%s.%s instance; proxy of C++ wxNotebookSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
353 class wxNotebookSizer(wxNotebookSizerPtr):
354 def __init__(self,*_args,**_kwargs):
355 self.this = sizersc.new_wxNotebookSizer(*_args,**_kwargs)
356 self.thisown = 1
357 self._setOORInfo(self)
358
359
360
361
362 class wxGridSizerPtr(wxSizerPtr):
363 def __init__(self,this):
364 self.this = this
365 self.thisown = 0
366 def RecalcSizes(self, *_args, **_kwargs):
367 val = sizersc.wxGridSizer_RecalcSizes(self, *_args, **_kwargs)
368 return val
369 def CalcMin(self, *_args, **_kwargs):
370 val = sizersc.wxGridSizer_CalcMin(self, *_args, **_kwargs)
371 if val: val = wxSizePtr(val) ; val.thisown = 1
372 return val
373 def SetCols(self, *_args, **_kwargs):
374 val = sizersc.wxGridSizer_SetCols(self, *_args, **_kwargs)
375 return val
376 def SetRows(self, *_args, **_kwargs):
377 val = sizersc.wxGridSizer_SetRows(self, *_args, **_kwargs)
378 return val
379 def SetVGap(self, *_args, **_kwargs):
380 val = sizersc.wxGridSizer_SetVGap(self, *_args, **_kwargs)
381 return val
382 def SetHGap(self, *_args, **_kwargs):
383 val = sizersc.wxGridSizer_SetHGap(self, *_args, **_kwargs)
384 return val
385 def GetCols(self, *_args, **_kwargs):
386 val = sizersc.wxGridSizer_GetCols(self, *_args, **_kwargs)
387 return val
388 def GetRows(self, *_args, **_kwargs):
389 val = sizersc.wxGridSizer_GetRows(self, *_args, **_kwargs)
390 return val
391 def GetVGap(self, *_args, **_kwargs):
392 val = sizersc.wxGridSizer_GetVGap(self, *_args, **_kwargs)
393 return val
394 def GetHGap(self, *_args, **_kwargs):
395 val = sizersc.wxGridSizer_GetHGap(self, *_args, **_kwargs)
396 return val
397 def __repr__(self):
398 return "<%s.%s instance; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
399 class wxGridSizer(wxGridSizerPtr):
400 def __init__(self,*_args,**_kwargs):
401 self.this = sizersc.new_wxGridSizer(*_args,**_kwargs)
402 self.thisown = 1
403 self._setOORInfo(self)
404
405
406
407
408 class wxFlexGridSizerPtr(wxGridSizerPtr):
409 def __init__(self,this):
410 self.this = this
411 self.thisown = 0
412 def RecalcSizes(self, *_args, **_kwargs):
413 val = sizersc.wxFlexGridSizer_RecalcSizes(self, *_args, **_kwargs)
414 return val
415 def CalcMin(self, *_args, **_kwargs):
416 val = sizersc.wxFlexGridSizer_CalcMin(self, *_args, **_kwargs)
417 if val: val = wxSizePtr(val) ; val.thisown = 1
418 return val
419 def AddGrowableRow(self, *_args, **_kwargs):
420 val = sizersc.wxFlexGridSizer_AddGrowableRow(self, *_args, **_kwargs)
421 return val
422 def RemoveGrowableRow(self, *_args, **_kwargs):
423 val = sizersc.wxFlexGridSizer_RemoveGrowableRow(self, *_args, **_kwargs)
424 return val
425 def AddGrowableCol(self, *_args, **_kwargs):
426 val = sizersc.wxFlexGridSizer_AddGrowableCol(self, *_args, **_kwargs)
427 return val
428 def RemoveGrowableCol(self, *_args, **_kwargs):
429 val = sizersc.wxFlexGridSizer_RemoveGrowableCol(self, *_args, **_kwargs)
430 return val
431 def SetFlexibleDirection(self, *_args, **_kwargs):
432 val = sizersc.wxFlexGridSizer_SetFlexibleDirection(self, *_args, **_kwargs)
433 return val
434 def GetFlexibleDirection(self, *_args, **_kwargs):
435 val = sizersc.wxFlexGridSizer_GetFlexibleDirection(self, *_args, **_kwargs)
436 return val
437 def SetNonFlexibleGrowMode(self, *_args, **_kwargs):
438 val = sizersc.wxFlexGridSizer_SetNonFlexibleGrowMode(self, *_args, **_kwargs)
439 return val
440 def GetNonFlexibleGrowMode(self, *_args, **_kwargs):
441 val = sizersc.wxFlexGridSizer_GetNonFlexibleGrowMode(self, *_args, **_kwargs)
442 return val
443 def __repr__(self):
444 return "<%s.%s instance; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
445 class wxFlexGridSizer(wxFlexGridSizerPtr):
446 def __init__(self,*_args,**_kwargs):
447 self.this = sizersc.new_wxFlexGridSizer(*_args,**_kwargs)
448 self.thisown = 1
449 self._setOORInfo(self)
450
451
452
453
454
455
456 #-------------- FUNCTION WRAPPERS ------------------
457
458
459
460 #-------------- VARIABLE WRAPPERS ------------------
461
462 wxFLEX_GROWMODE_NONE = sizersc.wxFLEX_GROWMODE_NONE
463 wxFLEX_GROWMODE_SPECIFIED = sizersc.wxFLEX_GROWMODE_SPECIFIED
464 wxFLEX_GROWMODE_ALL = sizersc.wxFLEX_GROWMODE_ALL