]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/sizers.py
Don't create a bitmap with dimensions <= 0...
[wxWidgets.git] / wxPython / src / gtk / sizers.py
CommitLineData
2f90df85
RD
1# This file was created automatically by SWIG.
2import sizersc
3
4from misc import *
5
6from windows import *
7
8from gdi import *
9
b1462dfa
RD
10from clip_dnd import *
11
2f90df85
RD
12from controls import *
13
14from events import *
15import wx
16import string
9df61a29 17class wxSizerItemPtr(wxObjectPtr):
2f90df85
RD
18 def __init__(self,this):
19 self.this = this
20 self.thisown = 0
aa2a5b86
RD
21 def GetPosition(self, *_args, **_kwargs):
22 val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs)
23 if val: val = wxPointPtr(val) ; val.thisown = 1
24 return val
2f90df85
RD
25 def GetSize(self, *_args, **_kwargs):
26 val = apply(sizersc.wxSizerItem_GetSize,(self,) + _args, _kwargs)
27 if val: val = wxSizePtr(val) ; val.thisown = 1
28 return val
29 def CalcMin(self, *_args, **_kwargs):
30 val = apply(sizersc.wxSizerItem_CalcMin,(self,) + _args, _kwargs)
31 if val: val = wxSizePtr(val) ; val.thisown = 1
32 return val
33 def SetDimension(self, *_args, **_kwargs):
34 val = apply(sizersc.wxSizerItem_SetDimension,(self,) + _args, _kwargs)
35 return val
f6bcfd97
BP
36 def SetRatioWH(self, *_args, **_kwargs):
37 val = apply(sizersc.wxSizerItem_SetRatioWH,(self,) + _args, _kwargs)
38 return val
39 def SetRatioSize(self, *_args, **_kwargs):
40 val = apply(sizersc.wxSizerItem_SetRatioSize,(self,) + _args, _kwargs)
41 return val
42 def SetRatio(self, *_args, **_kwargs):
43 val = apply(sizersc.wxSizerItem_SetRatio,(self,) + _args, _kwargs)
44 return val
45 def GetRatio(self, *_args, **_kwargs):
46 val = apply(sizersc.wxSizerItem_GetRatio,(self,) + _args, _kwargs)
47 return val
2f90df85
RD
48 def IsWindow(self, *_args, **_kwargs):
49 val = apply(sizersc.wxSizerItem_IsWindow,(self,) + _args, _kwargs)
50 return val
51 def IsSizer(self, *_args, **_kwargs):
52 val = apply(sizersc.wxSizerItem_IsSizer,(self,) + _args, _kwargs)
53 return val
54 def IsSpacer(self, *_args, **_kwargs):
55 val = apply(sizersc.wxSizerItem_IsSpacer,(self,) + _args, _kwargs)
56 return val
57 def GetWindow(self, *_args, **_kwargs):
58 val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs)
2f90df85 59 return val
f6bcfd97
BP
60 def SetWindow(self, *_args, **_kwargs):
61 val = apply(sizersc.wxSizerItem_SetWindow,(self,) + _args, _kwargs)
62 return val
2f90df85
RD
63 def GetSizer(self, *_args, **_kwargs):
64 val = apply(sizersc.wxSizerItem_GetSizer,(self,) + _args, _kwargs)
2f90df85 65 return val
f6bcfd97
BP
66 def SetSizer(self, *_args, **_kwargs):
67 val = apply(sizersc.wxSizerItem_SetSizer,(self,) + _args, _kwargs)
68 return val
2f90df85
RD
69 def GetOption(self, *_args, **_kwargs):
70 val = apply(sizersc.wxSizerItem_GetOption,(self,) + _args, _kwargs)
71 return val
72 def GetFlag(self, *_args, **_kwargs):
73 val = apply(sizersc.wxSizerItem_GetFlag,(self,) + _args, _kwargs)
74 return val
75 def GetBorder(self, *_args, **_kwargs):
76 val = apply(sizersc.wxSizerItem_GetBorder,(self,) + _args, _kwargs)
77 return val
9b3d3bc4
RD
78 def SetInitSize(self, *_args, **_kwargs):
79 val = apply(sizersc.wxSizerItem_SetInitSize,(self,) + _args, _kwargs)
80 return val
81 def SetOption(self, *_args, **_kwargs):
82 val = apply(sizersc.wxSizerItem_SetOption,(self,) + _args, _kwargs)
83 return val
84 def SetFlag(self, *_args, **_kwargs):
85 val = apply(sizersc.wxSizerItem_SetFlag,(self,) + _args, _kwargs)
86 return val
87 def SetBorder(self, *_args, **_kwargs):
88 val = apply(sizersc.wxSizerItem_SetBorder,(self,) + _args, _kwargs)
89 return val
2f90df85
RD
90 def GetUserData(self, *_args, **_kwargs):
91 val = apply(sizersc.wxSizerItem_GetUserData,(self,) + _args, _kwargs)
92 return val
93 def __repr__(self):
94 return "<C wxSizerItem instance at %s>" % (self.this,)
95class wxSizerItem(wxSizerItemPtr):
96 def __init__(self,this):
97 self.this = this
98
99
100
101
9df61a29 102class wxSizerPtr(wxObjectPtr):
2f90df85
RD
103 def __init__(self,this):
104 self.this = this
105 self.thisown = 0
106 def Destroy(self, *_args, **_kwargs):
107 val = apply(sizersc.wxSizer_Destroy,(self,) + _args, _kwargs)
108 return val
109 def AddWindow(self, *_args, **_kwargs):
110 val = apply(sizersc.wxSizer_AddWindow,(self,) + _args, _kwargs)
111 return val
112 def AddSizer(self, *_args, **_kwargs):
113 val = apply(sizersc.wxSizer_AddSizer,(self,) + _args, _kwargs)
114 return val
115 def AddSpacer(self, *_args, **_kwargs):
116 val = apply(sizersc.wxSizer_AddSpacer,(self,) + _args, _kwargs)
117 return val
f6bcfd97
BP
118 def InsertWindow(self, *_args, **_kwargs):
119 val = apply(sizersc.wxSizer_InsertWindow,(self,) + _args, _kwargs)
120 return val
121 def InsertSizer(self, *_args, **_kwargs):
122 val = apply(sizersc.wxSizer_InsertSizer,(self,) + _args, _kwargs)
123 return val
124 def InsertSpacer(self, *_args, **_kwargs):
125 val = apply(sizersc.wxSizer_InsertSpacer,(self,) + _args, _kwargs)
126 return val
2f90df85
RD
127 def PrependWindow(self, *_args, **_kwargs):
128 val = apply(sizersc.wxSizer_PrependWindow,(self,) + _args, _kwargs)
129 return val
130 def PrependSizer(self, *_args, **_kwargs):
131 val = apply(sizersc.wxSizer_PrependSizer,(self,) + _args, _kwargs)
132 return val
133 def PrependSpacer(self, *_args, **_kwargs):
134 val = apply(sizersc.wxSizer_PrependSpacer,(self,) + _args, _kwargs)
135 return val
136 def RemoveWindow(self, *_args, **_kwargs):
137 val = apply(sizersc.wxSizer_RemoveWindow,(self,) + _args, _kwargs)
138 return val
139 def RemoveSizer(self, *_args, **_kwargs):
140 val = apply(sizersc.wxSizer_RemoveSizer,(self,) + _args, _kwargs)
141 return val
142 def RemovePos(self, *_args, **_kwargs):
143 val = apply(sizersc.wxSizer_RemovePos,(self,) + _args, _kwargs)
144 return val
145 def SetDimension(self, *_args, **_kwargs):
146 val = apply(sizersc.wxSizer_SetDimension,(self,) + _args, _kwargs)
147 return val
f6bcfd97
BP
148 def SetMinSize(self, *_args, **_kwargs):
149 val = apply(sizersc.wxSizer_SetMinSize,(self,) + _args, _kwargs)
150 return val
151 def SetItemMinSizeWindow(self, *_args, **_kwargs):
152 val = apply(sizersc.wxSizer_SetItemMinSizeWindow,(self,) + _args, _kwargs)
153 return val
154 def SetItemMinSizeSizer(self, *_args, **_kwargs):
155 val = apply(sizersc.wxSizer_SetItemMinSizeSizer,(self,) + _args, _kwargs)
156 return val
157 def SetItemMinSizePos(self, *_args, **_kwargs):
158 val = apply(sizersc.wxSizer_SetItemMinSizePos,(self,) + _args, _kwargs)
159 return val
2f90df85
RD
160 def GetSize(self, *_args, **_kwargs):
161 val = apply(sizersc.wxSizer_GetSize,(self,) + _args, _kwargs)
162 if val: val = wxSizePtr(val) ; val.thisown = 1
163 return val
164 def GetPosition(self, *_args, **_kwargs):
165 val = apply(sizersc.wxSizer_GetPosition,(self,) + _args, _kwargs)
166 if val: val = wxPointPtr(val) ; val.thisown = 1
167 return val
168 def GetMinSize(self, *_args, **_kwargs):
169 val = apply(sizersc.wxSizer_GetMinSize,(self,) + _args, _kwargs)
170 if val: val = wxSizePtr(val) ; val.thisown = 1
171 return val
172 def Layout(self, *_args, **_kwargs):
173 val = apply(sizersc.wxSizer_Layout,(self,) + _args, _kwargs)
174 return val
175 def Fit(self, *_args, **_kwargs):
176 val = apply(sizersc.wxSizer_Fit,(self,) + _args, _kwargs)
177 return val
178 def SetSizeHints(self, *_args, **_kwargs):
179 val = apply(sizersc.wxSizer_SetSizeHints,(self,) + _args, _kwargs)
180 return val
181 def GetChildren(self, *_args, **_kwargs):
182 val = apply(sizersc.wxSizer_GetChildren,(self,) + _args, _kwargs)
183 return val
184 def __repr__(self):
185 return "<C wxSizer instance at %s>" % (self.this,)
186
7a446686 187 def Add(self, *args, **kw):
2f90df85 188 if type(args[0]) == type(1):
7a446686 189 apply(self.AddSpacer, args, kw)
2f90df85 190 elif string.find(args[0].this, 'Sizer') != -1:
7a446686 191 apply(self.AddSizer, args, kw)
2f90df85 192 else:
7a446686 193 apply(self.AddWindow, args, kw)
2f90df85 194
7a446686 195 def Insert(self, *args, **kw):
c368d904 196 if type(args[1]) == type(1):
7a446686 197 apply(self.InsertSpacer, args, kw)
c368d904 198 elif string.find(args[1].this, 'Sizer') != -1:
7a446686 199 apply(self.InsertSizer, args, kw)
f6bcfd97 200 else:
7a446686 201 apply(self.InsertWindow, args, kw)
f6bcfd97 202
7a446686 203 def Prepend(self, *args, **kw):
2f90df85 204 if type(args[0]) == type(1):
7a446686 205 apply(self.PrependSpacer, args, kw)
2f90df85 206 elif string.find(args[0].this, 'Sizer') != -1:
7a446686 207 apply(self.PrependSizer, args, kw)
2f90df85 208 else:
7a446686 209 apply(self.PrependWindow, args, kw)
2f90df85 210
7a446686 211 def Remove(self, *args, **kw):
2f90df85 212 if type(args[0]) == type(1):
7a446686 213 apply(self.RemovePos, args, kw)
2f90df85 214 elif string.find(args[0].this, 'Sizer') != -1:
7a446686 215 apply(self.RemoveSizer, args, kw)
2f90df85 216 else:
7a446686 217 apply(self.RemoveWindow, args, kw)
2f90df85
RD
218
219 def AddMany(self, widgets):
220 for childinfo in widgets:
221 if type(childinfo) != type(()):
222 childinfo = (childinfo, )
223 apply(self.Add, childinfo)
224
f6bcfd97
BP
225
226 def SetItemMinSize(self, *args):
227 if type(args[0]) == type(1):
228 apply(self.SetItemMinSizePos, args)
229 elif string.find(args[0].this, 'Sizer') != -1:
230 apply(self.SetItemMinSizeSizer, args)
231 else:
232 apply(self.SetItemMinSizeWindow, args)
233
2f90df85
RD
234class wxSizer(wxSizerPtr):
235 def __init__(self,this):
236 self.this = this
237
238
239
240
241class wxPySizerPtr(wxSizerPtr):
242 def __init__(self,this):
243 self.this = this
244 self.thisown = 0
245 def _setSelf(self, *_args, **_kwargs):
246 val = apply(sizersc.wxPySizer__setSelf,(self,) + _args, _kwargs)
247 return val
248 def __repr__(self):
249 return "<C wxPySizer instance at %s>" % (self.this,)
250class wxPySizer(wxPySizerPtr):
251 def __init__(self,*_args,**_kwargs):
252 self.this = apply(sizersc.new_wxPySizer,_args,_kwargs)
253 self.thisown = 1
f6bcfd97 254 self._setSelf(self, wxPySizer)
2f90df85
RD
255
256
257
258
259class wxBoxSizerPtr(wxSizerPtr):
260 def __init__(self,this):
261 self.this = this
262 self.thisown = 0
263 def GetOrientation(self, *_args, **_kwargs):
264 val = apply(sizersc.wxBoxSizer_GetOrientation,(self,) + _args, _kwargs)
265 return val
f6bcfd97
BP
266 def RecalcSizes(self, *_args, **_kwargs):
267 val = apply(sizersc.wxBoxSizer_RecalcSizes,(self,) + _args, _kwargs)
268 return val
269 def CalcMin(self, *_args, **_kwargs):
270 val = apply(sizersc.wxBoxSizer_CalcMin,(self,) + _args, _kwargs)
271 if val: val = wxSizePtr(val) ; val.thisown = 1
272 return val
2f90df85
RD
273 def __repr__(self):
274 return "<C wxBoxSizer instance at %s>" % (self.this,)
275class wxBoxSizer(wxBoxSizerPtr):
276 def __init__(self,*_args,**_kwargs):
277 self.this = apply(sizersc.new_wxBoxSizer,_args,_kwargs)
278 self.thisown = 1
279
280
281
282
283class wxStaticBoxSizerPtr(wxBoxSizerPtr):
284 def __init__(self,this):
285 self.this = this
286 self.thisown = 0
287 def GetStaticBox(self, *_args, **_kwargs):
288 val = apply(sizersc.wxStaticBoxSizer_GetStaticBox,(self,) + _args, _kwargs)
2f90df85 289 return val
f6bcfd97
BP
290 def RecalcSizes(self, *_args, **_kwargs):
291 val = apply(sizersc.wxStaticBoxSizer_RecalcSizes,(self,) + _args, _kwargs)
292 return val
293 def CalcMin(self, *_args, **_kwargs):
294 val = apply(sizersc.wxStaticBoxSizer_CalcMin,(self,) + _args, _kwargs)
295 if val: val = wxSizePtr(val) ; val.thisown = 1
296 return val
2f90df85
RD
297 def __repr__(self):
298 return "<C wxStaticBoxSizer instance at %s>" % (self.this,)
299class wxStaticBoxSizer(wxStaticBoxSizerPtr):
300 def __init__(self,*_args,**_kwargs):
301 self.this = apply(sizersc.new_wxStaticBoxSizer,_args,_kwargs)
302 self.thisown = 1
303
304
305
306
f6bcfd97
BP
307class wxNotebookSizerPtr(wxSizerPtr):
308 def __init__(self,this):
309 self.this = this
310 self.thisown = 0
311 def RecalcSizes(self, *_args, **_kwargs):
312 val = apply(sizersc.wxNotebookSizer_RecalcSizes,(self,) + _args, _kwargs)
313 return val
314 def CalcMin(self, *_args, **_kwargs):
315 val = apply(sizersc.wxNotebookSizer_CalcMin,(self,) + _args, _kwargs)
316 if val: val = wxSizePtr(val) ; val.thisown = 1
317 return val
318 def GetNotebook(self, *_args, **_kwargs):
319 val = apply(sizersc.wxNotebookSizer_GetNotebook,(self,) + _args, _kwargs)
f6bcfd97
BP
320 return val
321 def __repr__(self):
322 return "<C wxNotebookSizer instance at %s>" % (self.this,)
323class wxNotebookSizer(wxNotebookSizerPtr):
324 def __init__(self,*_args,**_kwargs):
325 self.this = apply(sizersc.new_wxNotebookSizer,_args,_kwargs)
326 self.thisown = 1
327
328
329
330
331class wxGridSizerPtr(wxSizerPtr):
332 def __init__(self,this):
333 self.this = this
334 self.thisown = 0
335 def RecalcSizes(self, *_args, **_kwargs):
336 val = apply(sizersc.wxGridSizer_RecalcSizes,(self,) + _args, _kwargs)
337 return val
338 def CalcMin(self, *_args, **_kwargs):
339 val = apply(sizersc.wxGridSizer_CalcMin,(self,) + _args, _kwargs)
340 if val: val = wxSizePtr(val) ; val.thisown = 1
341 return val
342 def SetCols(self, *_args, **_kwargs):
343 val = apply(sizersc.wxGridSizer_SetCols,(self,) + _args, _kwargs)
344 return val
345 def SetRows(self, *_args, **_kwargs):
346 val = apply(sizersc.wxGridSizer_SetRows,(self,) + _args, _kwargs)
347 return val
348 def SetVGap(self, *_args, **_kwargs):
349 val = apply(sizersc.wxGridSizer_SetVGap,(self,) + _args, _kwargs)
350 return val
351 def SetHGap(self, *_args, **_kwargs):
352 val = apply(sizersc.wxGridSizer_SetHGap,(self,) + _args, _kwargs)
353 return val
354 def GetCols(self, *_args, **_kwargs):
355 val = apply(sizersc.wxGridSizer_GetCols,(self,) + _args, _kwargs)
356 return val
357 def GetRows(self, *_args, **_kwargs):
358 val = apply(sizersc.wxGridSizer_GetRows,(self,) + _args, _kwargs)
359 return val
360 def GetVGap(self, *_args, **_kwargs):
361 val = apply(sizersc.wxGridSizer_GetVGap,(self,) + _args, _kwargs)
362 return val
363 def GetHGap(self, *_args, **_kwargs):
364 val = apply(sizersc.wxGridSizer_GetHGap,(self,) + _args, _kwargs)
365 return val
366 def __repr__(self):
367 return "<C wxGridSizer instance at %s>" % (self.this,)
368class wxGridSizer(wxGridSizerPtr):
369 def __init__(self,*_args,**_kwargs):
370 self.this = apply(sizersc.new_wxGridSizer,_args,_kwargs)
371 self.thisown = 1
372
373
374
375
376class wxFlexGridSizerPtr(wxGridSizerPtr):
377 def __init__(self,this):
378 self.this = this
379 self.thisown = 0
380 def RecalcSizes(self, *_args, **_kwargs):
381 val = apply(sizersc.wxFlexGridSizer_RecalcSizes,(self,) + _args, _kwargs)
382 return val
383 def CalcMin(self, *_args, **_kwargs):
384 val = apply(sizersc.wxFlexGridSizer_CalcMin,(self,) + _args, _kwargs)
385 if val: val = wxSizePtr(val) ; val.thisown = 1
386 return val
387 def AddGrowableRow(self, *_args, **_kwargs):
388 val = apply(sizersc.wxFlexGridSizer_AddGrowableRow,(self,) + _args, _kwargs)
389 return val
390 def RemoveGrowableRow(self, *_args, **_kwargs):
391 val = apply(sizersc.wxFlexGridSizer_RemoveGrowableRow,(self,) + _args, _kwargs)
392 return val
393 def AddGrowableCol(self, *_args, **_kwargs):
394 val = apply(sizersc.wxFlexGridSizer_AddGrowableCol,(self,) + _args, _kwargs)
395 return val
396 def RemoveGrowableCol(self, *_args, **_kwargs):
397 val = apply(sizersc.wxFlexGridSizer_RemoveGrowableCol,(self,) + _args, _kwargs)
398 return val
399 def __repr__(self):
400 return "<C wxFlexGridSizer instance at %s>" % (self.this,)
401class wxFlexGridSizer(wxFlexGridSizerPtr):
402 def __init__(self,*_args,**_kwargs):
403 self.this = apply(sizersc.new_wxFlexGridSizer,_args,_kwargs)
404 self.thisown = 1
405
406
407
408
2f90df85
RD
409
410
411#-------------- FUNCTION WRAPPERS ------------------
412
413
414
415#-------------- VARIABLE WRAPPERS ------------------
416