]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/combo.py
Added the wx.combo module, which contains the ComboCtrl and ComboPopup
[wxWidgets.git] / wxPython / src / gtk / combo.py
1 # This file was created automatically by SWIG 1.3.29.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 """
5 ComboCtrl class that can have any type of popup widget, and also an
6 owner-drawn combobox control.
7 """
8
9 import _combo
10 import new
11 new_instancemethod = new.instancemethod
12 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
13 if (name == "thisown"): return self.this.own(value)
14 if (name == "this"):
15 if type(value).__name__ == 'PySwigObject':
16 self.__dict__[name] = value
17 return
18 method = class_type.__swig_setmethods__.get(name,None)
19 if method: return method(self,value)
20 if (not static) or hasattr(self,name):
21 self.__dict__[name] = value
22 else:
23 raise AttributeError("You cannot add attributes to %s" % self)
24
25 def _swig_setattr(self,class_type,name,value):
26 return _swig_setattr_nondynamic(self,class_type,name,value,0)
27
28 def _swig_getattr(self,class_type,name):
29 if (name == "thisown"): return self.this.own()
30 method = class_type.__swig_getmethods__.get(name,None)
31 if method: return method(self)
32 raise AttributeError,name
33
34 def _swig_repr(self):
35 try: strthis = "proxy of " + self.this.__repr__()
36 except: strthis = ""
37 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
38
39 import types
40 try:
41 _object = types.ObjectType
42 _newclass = 1
43 except AttributeError:
44 class _object : pass
45 _newclass = 0
46 del types
47
48
49 def _swig_setattr_nondynamic_method(set):
50 def set_attr(self,name,value):
51 if (name == "thisown"): return self.this.own(value)
52 if hasattr(self,name) or (name == "this"):
53 set(self,name,value)
54 else:
55 raise AttributeError("You cannot add attributes to %s" % self)
56 return set_attr
57
58
59 import _windows
60 import _core
61 wx = _core
62 __docfilter__ = wx.__DocFilter(globals())
63 #---------------------------------------------------------------------------
64
65 CC_BUTTON_OUTSIDE_BORDER = _combo.CC_BUTTON_OUTSIDE_BORDER
66 CC_POPUP_ON_MOUSE_UP = _combo.CC_POPUP_ON_MOUSE_UP
67 CC_NO_TEXT_AUTO_SELECT = _combo.CC_NO_TEXT_AUTO_SELECT
68 CC_MF_ON_BUTTON = _combo.CC_MF_ON_BUTTON
69 CC_MF_ON_CLICK_AREA = _combo.CC_MF_ON_CLICK_AREA
70 class ComboCtrlFeatures(object):
71 """Proxy of C++ ComboCtrlFeatures class"""
72 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
73 def __init__(self): raise AttributeError, "No constructor defined"
74 __repr__ = _swig_repr
75 MovableButton = _combo.ComboCtrlFeatures_MovableButton
76 BitmapButton = _combo.ComboCtrlFeatures_BitmapButton
77 ButtonSpacing = _combo.ComboCtrlFeatures_ButtonSpacing
78 TextIndent = _combo.ComboCtrlFeatures_TextIndent
79 PaintControl = _combo.ComboCtrlFeatures_PaintControl
80 PaintWritable = _combo.ComboCtrlFeatures_PaintWritable
81 Borderless = _combo.ComboCtrlFeatures_Borderless
82 All = _combo.ComboCtrlFeatures_All
83 _combo.ComboCtrlFeatures_swigregister(ComboCtrlFeatures)
84
85 class ComboCtrl(_core.Control):
86 """Proxy of C++ ComboCtrl class"""
87 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
88 __repr__ = _swig_repr
89 def __init__(self, *args, **kwargs):
90 """
91 __init__(self, Window parent, int id=ID_ANY, String value=wxEmptyString,
92 Point pos=DefaultPosition, Size size=DefaultSize,
93 long style=0, Validator validator=DefaultValidator,
94 String name=wxPyComboBoxNameStr) -> ComboCtrl
95 """
96 _combo.ComboCtrl_swiginit(self,_combo.new_ComboCtrl(*args, **kwargs))
97 self._setOORInfo(self);ComboCtrl._setCallbackInfo(self, self, ComboCtrl)
98
99 def _setCallbackInfo(*args, **kwargs):
100 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
101 return _combo.ComboCtrl__setCallbackInfo(*args, **kwargs)
102
103 def ShowPopup(*args, **kwargs):
104 """ShowPopup(self)"""
105 return _combo.ComboCtrl_ShowPopup(*args, **kwargs)
106
107 def HidePopup(*args, **kwargs):
108 """HidePopup(self)"""
109 return _combo.ComboCtrl_HidePopup(*args, **kwargs)
110
111 def OnButtonClick(*args, **kwargs):
112 """OnButtonClick(self)"""
113 return _combo.ComboCtrl_OnButtonClick(*args, **kwargs)
114
115 def IsPopupShown(*args, **kwargs):
116 """IsPopupShown(self) -> bool"""
117 return _combo.ComboCtrl_IsPopupShown(*args, **kwargs)
118
119 def SetPopupControl(*args, **kwargs):
120 """SetPopupControl(self, ComboPopup popup)"""
121 return _combo.ComboCtrl_SetPopupControl(*args, **kwargs)
122
123 def GetPopupControl(*args, **kwargs):
124 """GetPopupControl(self) -> ComboPopup"""
125 return _combo.ComboCtrl_GetPopupControl(*args, **kwargs)
126
127 def GetPopupWindow(*args, **kwargs):
128 """GetPopupWindow(self) -> Window"""
129 return _combo.ComboCtrl_GetPopupWindow(*args, **kwargs)
130
131 def GetTextCtrl(*args, **kwargs):
132 """GetTextCtrl(self) -> wxTextCtrl"""
133 return _combo.ComboCtrl_GetTextCtrl(*args, **kwargs)
134
135 def GetButton(*args, **kwargs):
136 """GetButton(self) -> Window"""
137 return _combo.ComboCtrl_GetButton(*args, **kwargs)
138
139 def GetValue(*args, **kwargs):
140 """GetValue(self) -> String"""
141 return _combo.ComboCtrl_GetValue(*args, **kwargs)
142
143 def SetValue(*args, **kwargs):
144 """SetValue(self, String value)"""
145 return _combo.ComboCtrl_SetValue(*args, **kwargs)
146
147 def Copy(*args, **kwargs):
148 """Copy(self)"""
149 return _combo.ComboCtrl_Copy(*args, **kwargs)
150
151 def Cut(*args, **kwargs):
152 """Cut(self)"""
153 return _combo.ComboCtrl_Cut(*args, **kwargs)
154
155 def Paste(*args, **kwargs):
156 """Paste(self)"""
157 return _combo.ComboCtrl_Paste(*args, **kwargs)
158
159 def SetInsertionPoint(*args, **kwargs):
160 """SetInsertionPoint(self, long pos)"""
161 return _combo.ComboCtrl_SetInsertionPoint(*args, **kwargs)
162
163 def SetInsertionPointEnd(*args, **kwargs):
164 """SetInsertionPointEnd(self)"""
165 return _combo.ComboCtrl_SetInsertionPointEnd(*args, **kwargs)
166
167 def GetInsertionPoint(*args, **kwargs):
168 """GetInsertionPoint(self) -> long"""
169 return _combo.ComboCtrl_GetInsertionPoint(*args, **kwargs)
170
171 def GetLastPosition(*args, **kwargs):
172 """GetLastPosition(self) -> long"""
173 return _combo.ComboCtrl_GetLastPosition(*args, **kwargs)
174
175 def Replace(*args, **kwargs):
176 """Replace(self, long from, long to, String value)"""
177 return _combo.ComboCtrl_Replace(*args, **kwargs)
178
179 def Remove(*args, **kwargs):
180 """Remove(self, long from, long to)"""
181 return _combo.ComboCtrl_Remove(*args, **kwargs)
182
183 def Undo(*args, **kwargs):
184 """Undo(self)"""
185 return _combo.ComboCtrl_Undo(*args, **kwargs)
186
187 def SetMark(*args, **kwargs):
188 """SetMark(self, long from, long to)"""
189 return _combo.ComboCtrl_SetMark(*args, **kwargs)
190
191 def SetText(*args, **kwargs):
192 """SetText(self, String value)"""
193 return _combo.ComboCtrl_SetText(*args, **kwargs)
194
195 def SetValueWithEvent(*args, **kwargs):
196 """SetValueWithEvent(self, String value, bool withEvent=True)"""
197 return _combo.ComboCtrl_SetValueWithEvent(*args, **kwargs)
198
199 def SetPopupMinWidth(*args, **kwargs):
200 """SetPopupMinWidth(self, int width)"""
201 return _combo.ComboCtrl_SetPopupMinWidth(*args, **kwargs)
202
203 def SetPopupMaxHeight(*args, **kwargs):
204 """SetPopupMaxHeight(self, int height)"""
205 return _combo.ComboCtrl_SetPopupMaxHeight(*args, **kwargs)
206
207 def SetPopupExtents(*args, **kwargs):
208 """SetPopupExtents(self, int extLeft, int extRight)"""
209 return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs)
210
211 def SetCustomPaintWidth(*args, **kwargs):
212 """SetCustomPaintWidth(self, int width)"""
213 return _combo.ComboCtrl_SetCustomPaintWidth(*args, **kwargs)
214
215 def GetCustomPaintWidth(*args, **kwargs):
216 """GetCustomPaintWidth(self) -> int"""
217 return _combo.ComboCtrl_GetCustomPaintWidth(*args, **kwargs)
218
219 def SetPopupAnchor(*args, **kwargs):
220 """SetPopupAnchor(self, int anchorSide)"""
221 return _combo.ComboCtrl_SetPopupAnchor(*args, **kwargs)
222
223 def SetButtonPosition(*args, **kwargs):
224 """SetButtonPosition(self, int width=-1, int height=-1, int side=RIGHT, int spacingX=0)"""
225 return _combo.ComboCtrl_SetButtonPosition(*args, **kwargs)
226
227 def GetButtonSize(*args, **kwargs):
228 """GetButtonSize(self) -> Size"""
229 return _combo.ComboCtrl_GetButtonSize(*args, **kwargs)
230
231 def SetButtonBitmaps(*args, **kwargs):
232 """
233 SetButtonBitmaps(self, Bitmap bmpNormal, bool pushButtonBg=False, Bitmap bmpPressed=wxNullBitmap,
234 Bitmap bmpHover=wxNullBitmap,
235 Bitmap bmpDisabled=wxNullBitmap)
236 """
237 return _combo.ComboCtrl_SetButtonBitmaps(*args, **kwargs)
238
239 def SetTextIndent(*args, **kwargs):
240 """SetTextIndent(self, int indent)"""
241 return _combo.ComboCtrl_SetTextIndent(*args, **kwargs)
242
243 def GetTextIndent(*args, **kwargs):
244 """GetTextIndent(self) -> int"""
245 return _combo.ComboCtrl_GetTextIndent(*args, **kwargs)
246
247 def GetTextRect(*args, **kwargs):
248 """GetTextRect(self) -> Rect"""
249 return _combo.ComboCtrl_GetTextRect(*args, **kwargs)
250
251 def UseAltPopupWindow(*args, **kwargs):
252 """UseAltPopupWindow(self, bool enable=True)"""
253 return _combo.ComboCtrl_UseAltPopupWindow(*args, **kwargs)
254
255 def EnablePopupAnimation(*args, **kwargs):
256 """EnablePopupAnimation(self, bool enable=True)"""
257 return _combo.ComboCtrl_EnablePopupAnimation(*args, **kwargs)
258
259 def IsKeyPopupToggle(*args, **kwargs):
260 """IsKeyPopupToggle(self, KeyEvent event) -> bool"""
261 return _combo.ComboCtrl_IsKeyPopupToggle(*args, **kwargs)
262
263 def PrepareBackground(*args, **kwargs):
264 """PrepareBackground(self, DC dc, Rect rect, int flags)"""
265 return _combo.ComboCtrl_PrepareBackground(*args, **kwargs)
266
267 def ShouldDrawFocus(*args, **kwargs):
268 """ShouldDrawFocus(self) -> bool"""
269 return _combo.ComboCtrl_ShouldDrawFocus(*args, **kwargs)
270
271 def GetBitmapNormal(*args, **kwargs):
272 """GetBitmapNormal(self) -> Bitmap"""
273 return _combo.ComboCtrl_GetBitmapNormal(*args, **kwargs)
274
275 def GetBitmapPressed(*args, **kwargs):
276 """GetBitmapPressed(self) -> Bitmap"""
277 return _combo.ComboCtrl_GetBitmapPressed(*args, **kwargs)
278
279 def GetBitmapHover(*args, **kwargs):
280 """GetBitmapHover(self) -> Bitmap"""
281 return _combo.ComboCtrl_GetBitmapHover(*args, **kwargs)
282
283 def GetBitmapDisabled(*args, **kwargs):
284 """GetBitmapDisabled(self) -> Bitmap"""
285 return _combo.ComboCtrl_GetBitmapDisabled(*args, **kwargs)
286
287 def GetInternalFlags(*args, **kwargs):
288 """GetInternalFlags(self) -> unsigned int"""
289 return _combo.ComboCtrl_GetInternalFlags(*args, **kwargs)
290
291 def IsCreated(*args, **kwargs):
292 """IsCreated(self) -> bool"""
293 return _combo.ComboCtrl_IsCreated(*args, **kwargs)
294
295 def OnPopupDismiss(*args, **kwargs):
296 """OnPopupDismiss(self)"""
297 return _combo.ComboCtrl_OnPopupDismiss(*args, **kwargs)
298
299 Hidden = _combo.ComboCtrl_Hidden
300 Animating = _combo.ComboCtrl_Animating
301 Visible = _combo.ComboCtrl_Visible
302 def IsPopupWindowState(*args, **kwargs):
303 """IsPopupWindowState(self, int state) -> bool"""
304 return _combo.ComboCtrl_IsPopupWindowState(*args, **kwargs)
305
306 def GetPopupWindowState(*args, **kwargs):
307 """GetPopupWindowState(self) -> int"""
308 return _combo.ComboCtrl_GetPopupWindowState(*args, **kwargs)
309
310 def SetCtrlMainWnd(*args, **kwargs):
311 """SetCtrlMainWnd(self, Window wnd)"""
312 return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs)
313
314 def GetFeatures(*args, **kwargs):
315 """GetFeatures() -> int"""
316 return _combo.ComboCtrl_GetFeatures(*args, **kwargs)
317
318 GetFeatures = staticmethod(GetFeatures)
319 ShowBelow = _combo.ComboCtrl_ShowBelow
320 ShowAbove = _combo.ComboCtrl_ShowAbove
321 CanDeferShow = _combo.ComboCtrl_CanDeferShow
322 def DoShowPopup(*args, **kwargs):
323 """DoShowPopup(self, Rect rect, int flags)"""
324 return _combo.ComboCtrl_DoShowPopup(*args, **kwargs)
325
326 def AnimateShow(*args, **kwargs):
327 """AnimateShow(self, Rect rect, int flags) -> bool"""
328 return _combo.ComboCtrl_AnimateShow(*args, **kwargs)
329
330 _combo.ComboCtrl_swigregister(ComboCtrl)
331
332 def PreComboCtrl(*args, **kwargs):
333 """PreComboCtrl() -> ComboCtrl"""
334 val = _combo.new_PreComboCtrl(*args, **kwargs)
335 return val
336
337 def ComboCtrl_GetFeatures(*args):
338 """ComboCtrl_GetFeatures() -> int"""
339 return _combo.ComboCtrl_GetFeatures(*args)
340
341 #---------------------------------------------------------------------------
342
343 class ComboPopup(object):
344 """Proxy of C++ ComboPopup class"""
345 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
346 __repr__ = _swig_repr
347 def __init__(self, *args, **kwargs):
348 """__init__(self) -> ComboPopup"""
349 _combo.ComboPopup_swiginit(self,_combo.new_ComboPopup(*args, **kwargs))
350 ComboPopup._setCallbackInfo(self, self, ComboPopup)
351
352 __swig_destroy__ = _combo.delete_ComboPopup
353 __del__ = lambda self : None;
354 def _setCallbackInfo(*args, **kwargs):
355 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
356 return _combo.ComboPopup__setCallbackInfo(*args, **kwargs)
357
358 def Init(*args, **kwargs):
359 """Init(self)"""
360 return _combo.ComboPopup_Init(*args, **kwargs)
361
362 def Create(*args, **kwargs):
363 """Create(self, Window parent) -> bool"""
364 return _combo.ComboPopup_Create(*args, **kwargs)
365
366 def GetControl(*args, **kwargs):
367 """GetControl(self) -> Window"""
368 return _combo.ComboPopup_GetControl(*args, **kwargs)
369
370 def OnPopup(*args, **kwargs):
371 """OnPopup(self)"""
372 return _combo.ComboPopup_OnPopup(*args, **kwargs)
373
374 def OnDismiss(*args, **kwargs):
375 """OnDismiss(self)"""
376 return _combo.ComboPopup_OnDismiss(*args, **kwargs)
377
378 def SetStringValue(*args, **kwargs):
379 """SetStringValue(self, String value)"""
380 return _combo.ComboPopup_SetStringValue(*args, **kwargs)
381
382 def GetStringValue(*args, **kwargs):
383 """GetStringValue(self) -> String"""
384 return _combo.ComboPopup_GetStringValue(*args, **kwargs)
385
386 def PaintComboControl(*args, **kwargs):
387 """PaintComboControl(self, DC dc, Rect rect)"""
388 return _combo.ComboPopup_PaintComboControl(*args, **kwargs)
389
390 def OnComboKeyEvent(*args, **kwargs):
391 """OnComboKeyEvent(self, KeyEvent event)"""
392 return _combo.ComboPopup_OnComboKeyEvent(*args, **kwargs)
393
394 def OnComboDoubleClick(*args, **kwargs):
395 """OnComboDoubleClick(self)"""
396 return _combo.ComboPopup_OnComboDoubleClick(*args, **kwargs)
397
398 def GetAdjustedSize(*args, **kwargs):
399 """GetAdjustedSize(self, int minWidth, int prefHeight, int maxHeight) -> Size"""
400 return _combo.ComboPopup_GetAdjustedSize(*args, **kwargs)
401
402 def LazyCreate(*args, **kwargs):
403 """LazyCreate(self) -> bool"""
404 return _combo.ComboPopup_LazyCreate(*args, **kwargs)
405
406 def Dismiss(*args, **kwargs):
407 """Dismiss(self)"""
408 return _combo.ComboPopup_Dismiss(*args, **kwargs)
409
410 def IsCreated(*args, **kwargs):
411 """IsCreated(self) -> bool"""
412 return _combo.ComboPopup_IsCreated(*args, **kwargs)
413
414 def DefaultPaintComboControl(*args, **kwargs):
415 """DefaultPaintComboControl(wxComboCtrlBase combo, DC dc, Rect rect)"""
416 return _combo.ComboPopup_DefaultPaintComboControl(*args, **kwargs)
417
418 DefaultPaintComboControl = staticmethod(DefaultPaintComboControl)
419 def GetCombo(*args, **kwargs):
420 """GetCombo(self) -> ComboCtrl"""
421 return _combo.ComboPopup_GetCombo(*args, **kwargs)
422
423 _combo.ComboPopup_swigregister(ComboPopup)
424
425 def ComboPopup_DefaultPaintComboControl(*args, **kwargs):
426 """ComboPopup_DefaultPaintComboControl(wxComboCtrlBase combo, DC dc, Rect rect)"""
427 return _combo.ComboPopup_DefaultPaintComboControl(*args, **kwargs)
428
429 #---------------------------------------------------------------------------
430
431 ODCB_DCLICK_CYCLES = _combo.ODCB_DCLICK_CYCLES
432 ODCB_STD_CONTROL_PAINT = _combo.ODCB_STD_CONTROL_PAINT
433 ODCB_PAINTING_CONTROL = _combo.ODCB_PAINTING_CONTROL
434 ODCB_PAINTING_SELECTED = _combo.ODCB_PAINTING_SELECTED
435 class OwnerDrawnComboBox(ComboCtrl,_core.ItemContainer):
436 """Proxy of C++ OwnerDrawnComboBox class"""
437 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
438 __repr__ = _swig_repr
439 def __init__(self, *args, **kwargs):
440 """
441 __init__(self, Window parent, int id=-1, String value=EmptyString,
442 Point pos=DefaultPosition, Size size=DefaultSize,
443 wxArrayString choices=wxPyEmptyStringArray,
444 long style=0, Validator validator=DefaultValidator,
445 String name=wxPyComboBoxNameStr) -> OwnerDrawnComboBox
446 """
447 _combo.OwnerDrawnComboBox_swiginit(self,_combo.new_OwnerDrawnComboBox(*args, **kwargs))
448 self._setOORInfo(self);OwnerDrawnComboBox._setCallbackInfo(self, self, OwnerDrawnComboBox)
449
450 def Create(*args, **kwargs):
451 """
452 Create(self, Window parent, int id=-1, String value=EmptyString,
453 Point pos=DefaultPosition, Size size=DefaultSize,
454 wxArrayString choices=wxPyEmptyStringArray,
455 long style=0, Validator validator=DefaultValidator,
456 String name=wxPyComboBoxNameStr) -> bool
457 """
458 return _combo.OwnerDrawnComboBox_Create(*args, **kwargs)
459
460 def GetWidestItemWidth(*args, **kwargs):
461 """GetWidestItemWidth(self) -> int"""
462 return _combo.OwnerDrawnComboBox_GetWidestItemWidth(*args, **kwargs)
463
464 def GetWidestItem(*args, **kwargs):
465 """GetWidestItem(self) -> int"""
466 return _combo.OwnerDrawnComboBox_GetWidestItem(*args, **kwargs)
467
468 def SetMark(*args, **kwargs):
469 """SetMark(self, long from, long to)"""
470 return _combo.OwnerDrawnComboBox_SetMark(*args, **kwargs)
471
472 _combo.OwnerDrawnComboBox_swigregister(OwnerDrawnComboBox)
473
474 def PreOwnerDrawnComboBox(*args, **kwargs):
475 """PreOwnerDrawnComboBox() -> OwnerDrawnComboBox"""
476 val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs)
477 return val
478
479
480