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