]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/controls2.py
SWIGged code updates
[wxWidgets.git] / wxPython / src / msw / controls2.py
1 # This file was created automatically by SWIG.
2 import controls2c
3
4 from misc import *
5
6 from windows import *
7
8 from gdi import *
9
10 from clip_dnd import *
11
12 from events import *
13
14 from controls import *
15 import wx
16
17 def EVT_LIST_BEGIN_DRAG(win, id, func):
18 win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_DRAG, func)
19
20 def EVT_LIST_BEGIN_RDRAG(win, id, func):
21 win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_RDRAG, func)
22
23 def EVT_LIST_BEGIN_LABEL_EDIT(win, id, func):
24 win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, func)
25
26 def EVT_LIST_END_LABEL_EDIT(win, id, func):
27 win.Connect(id, -1, wxEVT_COMMAND_LIST_END_LABEL_EDIT, func)
28
29 def EVT_LIST_DELETE_ITEM(win, id, func):
30 win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ITEM, func)
31
32 def EVT_LIST_DELETE_ALL_ITEMS(win, id, func):
33 win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, func)
34
35 def EVT_LIST_GET_INFO(win, id, func):
36 win.Connect(id, -1, wxEVT_COMMAND_LIST_GET_INFO, func)
37
38 def EVT_LIST_SET_INFO(win, id, func):
39 win.Connect(id, -1, wxEVT_COMMAND_LIST_SET_INFO, func)
40
41 def EVT_LIST_ITEM_SELECTED(win, id, func):
42 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
43
44 def EVT_LIST_ITEM_DESELECTED(win, id, func):
45 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
46
47 def EVT_LIST_KEY_DOWN(win, id, func):
48 win.Connect(id, -1, wxEVT_COMMAND_LIST_KEY_DOWN, func)
49
50 def EVT_LIST_INSERT_ITEM(win, id, func):
51 win.Connect(id, -1, wxEVT_COMMAND_LIST_INSERT_ITEM, func)
52
53 def EVT_LIST_COL_CLICK(win, id, func):
54 win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
55
56 def EVT_LIST_COL_RIGHT_CLICK(win, id, func):
57 win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, func)
58
59 def EVT_LIST_COL_BEGIN_DRAG(win, id, func):
60 win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, func)
61
62 def EVT_LIST_COL_DRAGGING(win, id, func):
63 win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_DRAGGING, func)
64
65 def EVT_LIST_COL_END_DRAG(win, id, func):
66 win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_END_DRAG, func)
67
68 def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func):
69 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, func)
70
71 def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func):
72 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func)
73
74 def EVT_LIST_ITEM_ACTIVATED(win, id, func):
75 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func)
76
77 def EVT_LIST_CACHE_HINT(win, id, func):
78 win.Connect(id, -1, wxEVT_COMMAND_LIST_CACHE_HINT, func)
79
80 def EVT_LIST_ITEM_FOCUSED(win, id, func):
81 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_FOCUSED, func)
82
83
84 # wxTreeCtrl events
85 def EVT_TREE_BEGIN_DRAG(win, id, func):
86 win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func)
87
88 def EVT_TREE_BEGIN_RDRAG(win, id, func):
89 win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
90
91 def EVT_TREE_END_DRAG(win, id, func):
92 win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func)
93
94 def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func):
95 win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
96
97 def EVT_TREE_END_LABEL_EDIT(win, id, func):
98 win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func)
99
100 def EVT_TREE_GET_INFO(win, id, func):
101 win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func)
102
103 def EVT_TREE_SET_INFO(win, id, func):
104 win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func)
105
106 def EVT_TREE_ITEM_EXPANDED(win, id, func):
107 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func)
108
109 def EVT_TREE_ITEM_EXPANDING(win, id, func):
110 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func)
111
112 def EVT_TREE_ITEM_COLLAPSED(win, id, func):
113 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func)
114
115 def EVT_TREE_ITEM_COLLAPSING(win, id, func):
116 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func)
117
118 def EVT_TREE_SEL_CHANGED(win, id, func):
119 win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func)
120
121 def EVT_TREE_SEL_CHANGING(win, id, func):
122 win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func)
123
124 def EVT_TREE_KEY_DOWN(win, id, func):
125 win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func)
126
127 def EVT_TREE_DELETE_ITEM(win, id, func):
128 win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
129
130 def EVT_TREE_ITEM_ACTIVATED(win, id, func):
131 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, func)
132
133 def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func):
134 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, func)
135
136 def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func):
137 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func)
138
139 class wxListItemAttrPtr :
140 def __init__(self,this):
141 self.this = this
142 self.thisown = 0
143 def SetTextColour(self, *_args, **_kwargs):
144 val = apply(controls2c.wxListItemAttr_SetTextColour,(self,) + _args, _kwargs)
145 return val
146 def SetBackgroundColour(self, *_args, **_kwargs):
147 val = apply(controls2c.wxListItemAttr_SetBackgroundColour,(self,) + _args, _kwargs)
148 return val
149 def SetFont(self, *_args, **_kwargs):
150 val = apply(controls2c.wxListItemAttr_SetFont,(self,) + _args, _kwargs)
151 return val
152 def HasTextColour(self, *_args, **_kwargs):
153 val = apply(controls2c.wxListItemAttr_HasTextColour,(self,) + _args, _kwargs)
154 return val
155 def HasBackgroundColour(self, *_args, **_kwargs):
156 val = apply(controls2c.wxListItemAttr_HasBackgroundColour,(self,) + _args, _kwargs)
157 return val
158 def HasFont(self, *_args, **_kwargs):
159 val = apply(controls2c.wxListItemAttr_HasFont,(self,) + _args, _kwargs)
160 return val
161 def GetTextColour(self, *_args, **_kwargs):
162 val = apply(controls2c.wxListItemAttr_GetTextColour,(self,) + _args, _kwargs)
163 if val: val = wxColourPtr(val)
164 return val
165 def GetBackgroundColour(self, *_args, **_kwargs):
166 val = apply(controls2c.wxListItemAttr_GetBackgroundColour,(self,) + _args, _kwargs)
167 if val: val = wxColourPtr(val)
168 return val
169 def GetFont(self, *_args, **_kwargs):
170 val = apply(controls2c.wxListItemAttr_GetFont,(self,) + _args, _kwargs)
171 if val: val = wxFontPtr(val)
172 return val
173 def __repr__(self):
174 return "<C wxListItemAttr instance at %s>" % (self.this,)
175 class wxListItemAttr(wxListItemAttrPtr):
176 def __init__(self,*_args,**_kwargs):
177 self.this = apply(controls2c.new_wxListItemAttr,_args,_kwargs)
178 self.thisown = 1
179
180
181
182
183 class wxListItemPtr(wxObjectPtr):
184 def __init__(self,this):
185 self.this = this
186 self.thisown = 0
187 def __del__(self,controls2c=controls2c):
188 if self.thisown == 1 :
189 controls2c.delete_wxListItem(self)
190 def Clear(self, *_args, **_kwargs):
191 val = apply(controls2c.wxListItem_Clear,(self,) + _args, _kwargs)
192 return val
193 def ClearAttributes(self, *_args, **_kwargs):
194 val = apply(controls2c.wxListItem_ClearAttributes,(self,) + _args, _kwargs)
195 return val
196 def SetMask(self, *_args, **_kwargs):
197 val = apply(controls2c.wxListItem_SetMask,(self,) + _args, _kwargs)
198 return val
199 def SetId(self, *_args, **_kwargs):
200 val = apply(controls2c.wxListItem_SetId,(self,) + _args, _kwargs)
201 return val
202 def SetColumn(self, *_args, **_kwargs):
203 val = apply(controls2c.wxListItem_SetColumn,(self,) + _args, _kwargs)
204 return val
205 def SetState(self, *_args, **_kwargs):
206 val = apply(controls2c.wxListItem_SetState,(self,) + _args, _kwargs)
207 return val
208 def SetStateMask(self, *_args, **_kwargs):
209 val = apply(controls2c.wxListItem_SetStateMask,(self,) + _args, _kwargs)
210 return val
211 def SetText(self, *_args, **_kwargs):
212 val = apply(controls2c.wxListItem_SetText,(self,) + _args, _kwargs)
213 return val
214 def SetImage(self, *_args, **_kwargs):
215 val = apply(controls2c.wxListItem_SetImage,(self,) + _args, _kwargs)
216 return val
217 def SetData(self, *_args, **_kwargs):
218 val = apply(controls2c.wxListItem_SetData,(self,) + _args, _kwargs)
219 return val
220 def SetWidth(self, *_args, **_kwargs):
221 val = apply(controls2c.wxListItem_SetWidth,(self,) + _args, _kwargs)
222 return val
223 def SetAlign(self, *_args, **_kwargs):
224 val = apply(controls2c.wxListItem_SetAlign,(self,) + _args, _kwargs)
225 return val
226 def SetTextColour(self, *_args, **_kwargs):
227 val = apply(controls2c.wxListItem_SetTextColour,(self,) + _args, _kwargs)
228 return val
229 def SetBackgroundColour(self, *_args, **_kwargs):
230 val = apply(controls2c.wxListItem_SetBackgroundColour,(self,) + _args, _kwargs)
231 return val
232 def SetFont(self, *_args, **_kwargs):
233 val = apply(controls2c.wxListItem_SetFont,(self,) + _args, _kwargs)
234 return val
235 def GetMask(self, *_args, **_kwargs):
236 val = apply(controls2c.wxListItem_GetMask,(self,) + _args, _kwargs)
237 return val
238 def GetId(self, *_args, **_kwargs):
239 val = apply(controls2c.wxListItem_GetId,(self,) + _args, _kwargs)
240 return val
241 def GetColumn(self, *_args, **_kwargs):
242 val = apply(controls2c.wxListItem_GetColumn,(self,) + _args, _kwargs)
243 return val
244 def GetState(self, *_args, **_kwargs):
245 val = apply(controls2c.wxListItem_GetState,(self,) + _args, _kwargs)
246 return val
247 def GetText(self, *_args, **_kwargs):
248 val = apply(controls2c.wxListItem_GetText,(self,) + _args, _kwargs)
249 return val
250 def GetImage(self, *_args, **_kwargs):
251 val = apply(controls2c.wxListItem_GetImage,(self,) + _args, _kwargs)
252 return val
253 def GetData(self, *_args, **_kwargs):
254 val = apply(controls2c.wxListItem_GetData,(self,) + _args, _kwargs)
255 return val
256 def GetWidth(self, *_args, **_kwargs):
257 val = apply(controls2c.wxListItem_GetWidth,(self,) + _args, _kwargs)
258 return val
259 def GetAlign(self, *_args, **_kwargs):
260 val = apply(controls2c.wxListItem_GetAlign,(self,) + _args, _kwargs)
261 return val
262 def GetAttributes(self, *_args, **_kwargs):
263 val = apply(controls2c.wxListItem_GetAttributes,(self,) + _args, _kwargs)
264 if val: val = wxListItemAttrPtr(val)
265 return val
266 def HasAttributes(self, *_args, **_kwargs):
267 val = apply(controls2c.wxListItem_HasAttributes,(self,) + _args, _kwargs)
268 return val
269 def GetTextColour(self, *_args, **_kwargs):
270 val = apply(controls2c.wxListItem_GetTextColour,(self,) + _args, _kwargs)
271 if val: val = wxColourPtr(val) ; val.thisown = 1
272 return val
273 def GetBackgroundColour(self, *_args, **_kwargs):
274 val = apply(controls2c.wxListItem_GetBackgroundColour,(self,) + _args, _kwargs)
275 if val: val = wxColourPtr(val) ; val.thisown = 1
276 return val
277 def GetFont(self, *_args, **_kwargs):
278 val = apply(controls2c.wxListItem_GetFont,(self,) + _args, _kwargs)
279 if val: val = wxFontPtr(val) ; val.thisown = 1
280 return val
281 def __setattr__(self,name,value):
282 if name == "m_mask" :
283 controls2c.wxListItem_m_mask_set(self,value)
284 return
285 if name == "m_itemId" :
286 controls2c.wxListItem_m_itemId_set(self,value)
287 return
288 if name == "m_col" :
289 controls2c.wxListItem_m_col_set(self,value)
290 return
291 if name == "m_state" :
292 controls2c.wxListItem_m_state_set(self,value)
293 return
294 if name == "m_stateMask" :
295 controls2c.wxListItem_m_stateMask_set(self,value)
296 return
297 if name == "m_text" :
298 controls2c.wxListItem_m_text_set(self,value)
299 return
300 if name == "m_image" :
301 controls2c.wxListItem_m_image_set(self,value)
302 return
303 if name == "m_data" :
304 controls2c.wxListItem_m_data_set(self,value)
305 return
306 if name == "m_format" :
307 controls2c.wxListItem_m_format_set(self,value)
308 return
309 if name == "m_width" :
310 controls2c.wxListItem_m_width_set(self,value)
311 return
312 self.__dict__[name] = value
313 def __getattr__(self,name):
314 if name == "m_mask" :
315 return controls2c.wxListItem_m_mask_get(self)
316 if name == "m_itemId" :
317 return controls2c.wxListItem_m_itemId_get(self)
318 if name == "m_col" :
319 return controls2c.wxListItem_m_col_get(self)
320 if name == "m_state" :
321 return controls2c.wxListItem_m_state_get(self)
322 if name == "m_stateMask" :
323 return controls2c.wxListItem_m_stateMask_get(self)
324 if name == "m_text" :
325 return controls2c.wxListItem_m_text_get(self)
326 if name == "m_image" :
327 return controls2c.wxListItem_m_image_get(self)
328 if name == "m_data" :
329 return controls2c.wxListItem_m_data_get(self)
330 if name == "m_format" :
331 return controls2c.wxListItem_m_format_get(self)
332 if name == "m_width" :
333 return controls2c.wxListItem_m_width_get(self)
334 raise AttributeError,name
335 def __repr__(self):
336 return "<C wxListItem instance at %s>" % (self.this,)
337 class wxListItem(wxListItemPtr):
338 def __init__(self,*_args,**_kwargs):
339 self.this = apply(controls2c.new_wxListItem,_args,_kwargs)
340 self.thisown = 1
341
342
343
344
345 class wxListEventPtr(wxNotifyEventPtr):
346 def __init__(self,this):
347 self.this = this
348 self.thisown = 0
349 def GetCode(self, *_args, **_kwargs):
350 val = apply(controls2c.wxListEvent_GetCode,(self,) + _args, _kwargs)
351 return val
352 def GetIndex(self, *_args, **_kwargs):
353 val = apply(controls2c.wxListEvent_GetIndex,(self,) + _args, _kwargs)
354 return val
355 def GetColumn(self, *_args, **_kwargs):
356 val = apply(controls2c.wxListEvent_GetColumn,(self,) + _args, _kwargs)
357 return val
358 def Cancelled(self, *_args, **_kwargs):
359 val = apply(controls2c.wxListEvent_Cancelled,(self,) + _args, _kwargs)
360 return val
361 def GetPoint(self, *_args, **_kwargs):
362 val = apply(controls2c.wxListEvent_GetPoint,(self,) + _args, _kwargs)
363 if val: val = wxPointPtr(val) ; val.thisown = 1
364 return val
365 def GetLabel(self, *_args, **_kwargs):
366 val = apply(controls2c.wxListEvent_GetLabel,(self,) + _args, _kwargs)
367 return val
368 def GetText(self, *_args, **_kwargs):
369 val = apply(controls2c.wxListEvent_GetText,(self,) + _args, _kwargs)
370 return val
371 def GetImage(self, *_args, **_kwargs):
372 val = apply(controls2c.wxListEvent_GetImage,(self,) + _args, _kwargs)
373 return val
374 def GetData(self, *_args, **_kwargs):
375 val = apply(controls2c.wxListEvent_GetData,(self,) + _args, _kwargs)
376 return val
377 def GetMask(self, *_args, **_kwargs):
378 val = apply(controls2c.wxListEvent_GetMask,(self,) + _args, _kwargs)
379 return val
380 def GetItem(self, *_args, **_kwargs):
381 val = apply(controls2c.wxListEvent_GetItem,(self,) + _args, _kwargs)
382 return val
383 def GetCacheFrom(self, *_args, **_kwargs):
384 val = apply(controls2c.wxListEvent_GetCacheFrom,(self,) + _args, _kwargs)
385 return val
386 def GetCacheTo(self, *_args, **_kwargs):
387 val = apply(controls2c.wxListEvent_GetCacheTo,(self,) + _args, _kwargs)
388 return val
389 def __setattr__(self,name,value):
390 if name == "m_code" :
391 controls2c.wxListEvent_m_code_set(self,value)
392 return
393 if name == "m_itemIndex" :
394 controls2c.wxListEvent_m_itemIndex_set(self,value)
395 return
396 if name == "m_col" :
397 controls2c.wxListEvent_m_col_set(self,value)
398 return
399 if name == "m_cancelled" :
400 controls2c.wxListEvent_m_cancelled_set(self,value)
401 return
402 if name == "m_pointDrag" :
403 controls2c.wxListEvent_m_pointDrag_set(self,value.this)
404 return
405 if name == "m_item" :
406 controls2c.wxListEvent_m_item_set(self,value.this)
407 return
408 self.__dict__[name] = value
409 def __getattr__(self,name):
410 if name == "m_code" :
411 return controls2c.wxListEvent_m_code_get(self)
412 if name == "m_itemIndex" :
413 return controls2c.wxListEvent_m_itemIndex_get(self)
414 if name == "m_col" :
415 return controls2c.wxListEvent_m_col_get(self)
416 if name == "m_cancelled" :
417 return controls2c.wxListEvent_m_cancelled_get(self)
418 if name == "m_pointDrag" :
419 return wxPointPtr(controls2c.wxListEvent_m_pointDrag_get(self))
420 if name == "m_item" :
421 return wxListItemPtr(controls2c.wxListEvent_m_item_get(self))
422 raise AttributeError,name
423 def __repr__(self):
424 return "<C wxListEvent instance at %s>" % (self.this,)
425 class wxListEvent(wxListEventPtr):
426 def __init__(self,*_args,**_kwargs):
427 self.this = apply(controls2c.new_wxListEvent,_args,_kwargs)
428 self.thisown = 1
429
430
431
432
433 class wxListCtrlPtr(wxControlPtr):
434 def __init__(self,this):
435 self.this = this
436 self.thisown = 0
437 def Create(self, *_args, **_kwargs):
438 val = apply(controls2c.wxListCtrl_Create,(self,) + _args, _kwargs)
439 return val
440 def _setCallbackInfo(self, *_args, **_kwargs):
441 val = apply(controls2c.wxListCtrl__setCallbackInfo,(self,) + _args, _kwargs)
442 return val
443 def SetForegroundColour(self, *_args, **_kwargs):
444 val = apply(controls2c.wxListCtrl_SetForegroundColour,(self,) + _args, _kwargs)
445 return val
446 def SetBackgroundColour(self, *_args, **_kwargs):
447 val = apply(controls2c.wxListCtrl_SetBackgroundColour,(self,) + _args, _kwargs)
448 return val
449 def GetColumn(self, *_args, **_kwargs):
450 val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs)
451 return val
452 def SetColumn(self, *_args, **_kwargs):
453 val = apply(controls2c.wxListCtrl_SetColumn,(self,) + _args, _kwargs)
454 return val
455 def GetColumnWidth(self, *_args, **_kwargs):
456 val = apply(controls2c.wxListCtrl_GetColumnWidth,(self,) + _args, _kwargs)
457 return val
458 def SetColumnWidth(self, *_args, **_kwargs):
459 val = apply(controls2c.wxListCtrl_SetColumnWidth,(self,) + _args, _kwargs)
460 return val
461 def GetCountPerPage(self, *_args, **_kwargs):
462 val = apply(controls2c.wxListCtrl_GetCountPerPage,(self,) + _args, _kwargs)
463 return val
464 def GetEditControl(self, *_args, **_kwargs):
465 val = apply(controls2c.wxListCtrl_GetEditControl,(self,) + _args, _kwargs)
466 return val
467 def GetItem(self, *_args, **_kwargs):
468 val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
469 return val
470 def SetItem(self, *_args, **_kwargs):
471 val = apply(controls2c.wxListCtrl_SetItem,(self,) + _args, _kwargs)
472 return val
473 def SetStringItem(self, *_args, **_kwargs):
474 val = apply(controls2c.wxListCtrl_SetStringItem,(self,) + _args, _kwargs)
475 return val
476 def GetItemState(self, *_args, **_kwargs):
477 val = apply(controls2c.wxListCtrl_GetItemState,(self,) + _args, _kwargs)
478 return val
479 def SetItemState(self, *_args, **_kwargs):
480 val = apply(controls2c.wxListCtrl_SetItemState,(self,) + _args, _kwargs)
481 return val
482 def SetItemImage(self, *_args, **_kwargs):
483 val = apply(controls2c.wxListCtrl_SetItemImage,(self,) + _args, _kwargs)
484 return val
485 def GetItemText(self, *_args, **_kwargs):
486 val = apply(controls2c.wxListCtrl_GetItemText,(self,) + _args, _kwargs)
487 return val
488 def SetItemText(self, *_args, **_kwargs):
489 val = apply(controls2c.wxListCtrl_SetItemText,(self,) + _args, _kwargs)
490 return val
491 def GetItemData(self, *_args, **_kwargs):
492 val = apply(controls2c.wxListCtrl_GetItemData,(self,) + _args, _kwargs)
493 return val
494 def SetItemData(self, *_args, **_kwargs):
495 val = apply(controls2c.wxListCtrl_SetItemData,(self,) + _args, _kwargs)
496 return val
497 def GetItemPosition(self, *_args, **_kwargs):
498 val = apply(controls2c.wxListCtrl_GetItemPosition,(self,) + _args, _kwargs)
499 if val: val = wxPointPtr(val) ; val.thisown = 1
500 return val
501 def GetItemRect(self, *_args, **_kwargs):
502 val = apply(controls2c.wxListCtrl_GetItemRect,(self,) + _args, _kwargs)
503 if val: val = wxRectPtr(val) ; val.thisown = 1
504 return val
505 def SetItemPosition(self, *_args, **_kwargs):
506 val = apply(controls2c.wxListCtrl_SetItemPosition,(self,) + _args, _kwargs)
507 return val
508 def GetItemCount(self, *_args, **_kwargs):
509 val = apply(controls2c.wxListCtrl_GetItemCount,(self,) + _args, _kwargs)
510 return val
511 def GetColumnCount(self, *_args, **_kwargs):
512 val = apply(controls2c.wxListCtrl_GetColumnCount,(self,) + _args, _kwargs)
513 return val
514 def GetItemSpacing(self, *_args, **_kwargs):
515 val = apply(controls2c.wxListCtrl_GetItemSpacing,(self,) + _args, _kwargs)
516 return val
517 def GetSelectedItemCount(self, *_args, **_kwargs):
518 val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs)
519 return val
520 def GetTextColour(self, *_args, **_kwargs):
521 val = apply(controls2c.wxListCtrl_GetTextColour,(self,) + _args, _kwargs)
522 if val: val = wxColourPtr(val) ; val.thisown = 1
523 return val
524 def SetTextColour(self, *_args, **_kwargs):
525 val = apply(controls2c.wxListCtrl_SetTextColour,(self,) + _args, _kwargs)
526 return val
527 def GetTopItem(self, *_args, **_kwargs):
528 val = apply(controls2c.wxListCtrl_GetTopItem,(self,) + _args, _kwargs)
529 return val
530 def SetSingleStyle(self, *_args, **_kwargs):
531 val = apply(controls2c.wxListCtrl_SetSingleStyle,(self,) + _args, _kwargs)
532 return val
533 def SetWindowStyleFlag(self, *_args, **_kwargs):
534 val = apply(controls2c.wxListCtrl_SetWindowStyleFlag,(self,) + _args, _kwargs)
535 return val
536 def GetNextItem(self, *_args, **_kwargs):
537 val = apply(controls2c.wxListCtrl_GetNextItem,(self,) + _args, _kwargs)
538 return val
539 def GetImageList(self, *_args, **_kwargs):
540 val = apply(controls2c.wxListCtrl_GetImageList,(self,) + _args, _kwargs)
541 return val
542 def SetImageList(self, *_args, **_kwargs):
543 val = apply(controls2c.wxListCtrl_SetImageList,(self,) + _args, _kwargs)
544 return val
545 def AssignImageList(self, *_args, **_kwargs):
546 val = apply(controls2c.wxListCtrl_AssignImageList,(self,) + _args, _kwargs)
547 _args[0].thisown = 0
548 return val
549 def IsVirtual(self, *_args, **_kwargs):
550 val = apply(controls2c.wxListCtrl_IsVirtual,(self,) + _args, _kwargs)
551 return val
552 def RefreshItem(self, *_args, **_kwargs):
553 val = apply(controls2c.wxListCtrl_RefreshItem,(self,) + _args, _kwargs)
554 return val
555 def RefreshItems(self, *_args, **_kwargs):
556 val = apply(controls2c.wxListCtrl_RefreshItems,(self,) + _args, _kwargs)
557 return val
558 def Arrange(self, *_args, **_kwargs):
559 val = apply(controls2c.wxListCtrl_Arrange,(self,) + _args, _kwargs)
560 return val
561 def DeleteItem(self, *_args, **_kwargs):
562 val = apply(controls2c.wxListCtrl_DeleteItem,(self,) + _args, _kwargs)
563 return val
564 def DeleteAllItems(self, *_args, **_kwargs):
565 val = apply(controls2c.wxListCtrl_DeleteAllItems,(self,) + _args, _kwargs)
566 return val
567 def DeleteColumn(self, *_args, **_kwargs):
568 val = apply(controls2c.wxListCtrl_DeleteColumn,(self,) + _args, _kwargs)
569 return val
570 def DeleteAllColumns(self, *_args, **_kwargs):
571 val = apply(controls2c.wxListCtrl_DeleteAllColumns,(self,) + _args, _kwargs)
572 return val
573 def ClearAll(self, *_args, **_kwargs):
574 val = apply(controls2c.wxListCtrl_ClearAll,(self,) + _args, _kwargs)
575 return val
576 def EditLabel(self, *_args, **_kwargs):
577 val = apply(controls2c.wxListCtrl_EditLabel,(self,) + _args, _kwargs)
578 return val
579 def EndEditLabel(self, *_args, **_kwargs):
580 val = apply(controls2c.wxListCtrl_EndEditLabel,(self,) + _args, _kwargs)
581 return val
582 def EnsureVisible(self, *_args, **_kwargs):
583 val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs)
584 return val
585 def FindItem(self, *_args, **_kwargs):
586 val = apply(controls2c.wxListCtrl_FindItem,(self,) + _args, _kwargs)
587 return val
588 def FindItemData(self, *_args, **_kwargs):
589 val = apply(controls2c.wxListCtrl_FindItemData,(self,) + _args, _kwargs)
590 return val
591 def FindItemAtPos(self, *_args, **_kwargs):
592 val = apply(controls2c.wxListCtrl_FindItemAtPos,(self,) + _args, _kwargs)
593 return val
594 def HitTest(self, *_args, **_kwargs):
595 val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs)
596 return val
597 def InsertItem(self, *_args, **_kwargs):
598 val = apply(controls2c.wxListCtrl_InsertItem,(self,) + _args, _kwargs)
599 return val
600 def InsertStringItem(self, *_args, **_kwargs):
601 val = apply(controls2c.wxListCtrl_InsertStringItem,(self,) + _args, _kwargs)
602 return val
603 def InsertImageItem(self, *_args, **_kwargs):
604 val = apply(controls2c.wxListCtrl_InsertImageItem,(self,) + _args, _kwargs)
605 return val
606 def InsertImageStringItem(self, *_args, **_kwargs):
607 val = apply(controls2c.wxListCtrl_InsertImageStringItem,(self,) + _args, _kwargs)
608 return val
609 def InsertColumnInfo(self, *_args, **_kwargs):
610 val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs)
611 return val
612 def InsertColumn(self, *_args, **_kwargs):
613 val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs)
614 return val
615 def SetItemCount(self, *_args, **_kwargs):
616 val = apply(controls2c.wxListCtrl_SetItemCount,(self,) + _args, _kwargs)
617 return val
618 def ScrollList(self, *_args, **_kwargs):
619 val = apply(controls2c.wxListCtrl_ScrollList,(self,) + _args, _kwargs)
620 return val
621 def SortItems(self, *_args, **_kwargs):
622 val = apply(controls2c.wxListCtrl_SortItems,(self,) + _args, _kwargs)
623 return val
624 def __repr__(self):
625 return "<C wxListCtrl instance at %s>" % (self.this,)
626
627 def GetItem(self, *_args, **_kwargs):
628 val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
629 val.thisown = 1
630 return val
631
632
633 # Some helpers...
634
635 def Select(self, idx, on=1):
636 '''[de]select an item'''
637 if on: state = wxLIST_STATE_SELECTED
638 else: state = 0
639 self.SetItemState(idx, state, wxLIST_STATE_SELECTED)
640
641 def Focus(self, idx):
642 '''Focus and show the given item'''
643 self.SetItemState(idx, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED)
644 self.EnsureVisible(idx)
645
646 def GetFocusedItem(self):
647 '''get the currently focused item or -1 if none'''
648 return self.GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED)
649
650 def IsSelected(self, idx):
651 '''return TRUE if the item is selected'''
652 return self.GetItemState(idx, wxLIST_STATE_SELECTED) != 0
653
654 def SetColumnImage(self, col, image):
655 item = wxListItem()
656 item.SetMask(wxLIST_MASK_IMAGE)
657 item.SetImage(image)
658 self.SetColumn(col, item)
659
660 def ClearColumnImage(self, col):
661 self.SetColumnImage(col, -1)
662
663 class wxListCtrl(wxListCtrlPtr):
664 def __init__(self,*_args,**_kwargs):
665 self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
666 self.thisown = 1
667 self._setCallbackInfo(self, wxListCtrl)
668 self._setOORInfo(self)
669
670
671
672 def wxPreListCtrl(*_args,**_kwargs):
673 val = wxListCtrlPtr(apply(controls2c.new_wxPreListCtrl,_args,_kwargs))
674 val.thisown = 1
675 val._setOORInfo(val)
676 return val
677
678
679 class wxListViewPtr(wxListCtrlPtr):
680 def __init__(self,this):
681 self.this = this
682 self.thisown = 0
683 def Create(self, *_args, **_kwargs):
684 val = apply(controls2c.wxListView_Create,(self,) + _args, _kwargs)
685 return val
686 def Select(self, *_args, **_kwargs):
687 val = apply(controls2c.wxListView_Select,(self,) + _args, _kwargs)
688 return val
689 def Focus(self, *_args, **_kwargs):
690 val = apply(controls2c.wxListView_Focus,(self,) + _args, _kwargs)
691 return val
692 def GetFocusedItem(self, *_args, **_kwargs):
693 val = apply(controls2c.wxListView_GetFocusedItem,(self,) + _args, _kwargs)
694 return val
695 def GetNextSelected(self, *_args, **_kwargs):
696 val = apply(controls2c.wxListView_GetNextSelected,(self,) + _args, _kwargs)
697 return val
698 def GetFirstSelected(self, *_args, **_kwargs):
699 val = apply(controls2c.wxListView_GetFirstSelected,(self,) + _args, _kwargs)
700 return val
701 def IsSelected(self, *_args, **_kwargs):
702 val = apply(controls2c.wxListView_IsSelected,(self,) + _args, _kwargs)
703 return val
704 def SetColumnImage(self, *_args, **_kwargs):
705 val = apply(controls2c.wxListView_SetColumnImage,(self,) + _args, _kwargs)
706 return val
707 def ClearColumnImage(self, *_args, **_kwargs):
708 val = apply(controls2c.wxListView_ClearColumnImage,(self,) + _args, _kwargs)
709 return val
710 def __repr__(self):
711 return "<C wxListView instance at %s>" % (self.this,)
712 class wxListView(wxListViewPtr):
713 def __init__(self,*_args,**_kwargs):
714 self.this = apply(controls2c.new_wxListView,_args,_kwargs)
715 self.thisown = 1
716 self._setOORInfo(self)
717
718
719
720 def wxPreListView(*_args,**_kwargs):
721 val = wxListViewPtr(apply(controls2c.new_wxPreListView,_args,_kwargs))
722 val.thisown = 1
723 val._setOORInfo(val)
724 return val
725
726
727 class wxTreeItemAttrPtr :
728 def __init__(self,this):
729 self.this = this
730 self.thisown = 0
731 def SetTextColour(self, *_args, **_kwargs):
732 val = apply(controls2c.wxTreeItemAttr_SetTextColour,(self,) + _args, _kwargs)
733 return val
734 def SetBackgroundColour(self, *_args, **_kwargs):
735 val = apply(controls2c.wxTreeItemAttr_SetBackgroundColour,(self,) + _args, _kwargs)
736 return val
737 def SetFont(self, *_args, **_kwargs):
738 val = apply(controls2c.wxTreeItemAttr_SetFont,(self,) + _args, _kwargs)
739 return val
740 def HasTextColour(self, *_args, **_kwargs):
741 val = apply(controls2c.wxTreeItemAttr_HasTextColour,(self,) + _args, _kwargs)
742 return val
743 def HasBackgroundColour(self, *_args, **_kwargs):
744 val = apply(controls2c.wxTreeItemAttr_HasBackgroundColour,(self,) + _args, _kwargs)
745 return val
746 def HasFont(self, *_args, **_kwargs):
747 val = apply(controls2c.wxTreeItemAttr_HasFont,(self,) + _args, _kwargs)
748 return val
749 def GetTextColour(self, *_args, **_kwargs):
750 val = apply(controls2c.wxTreeItemAttr_GetTextColour,(self,) + _args, _kwargs)
751 if val: val = wxColourPtr(val)
752 return val
753 def GetBackgroundColour(self, *_args, **_kwargs):
754 val = apply(controls2c.wxTreeItemAttr_GetBackgroundColour,(self,) + _args, _kwargs)
755 if val: val = wxColourPtr(val)
756 return val
757 def GetFont(self, *_args, **_kwargs):
758 val = apply(controls2c.wxTreeItemAttr_GetFont,(self,) + _args, _kwargs)
759 if val: val = wxFontPtr(val)
760 return val
761 def __repr__(self):
762 return "<C wxTreeItemAttr instance at %s>" % (self.this,)
763 class wxTreeItemAttr(wxTreeItemAttrPtr):
764 def __init__(self,*_args,**_kwargs):
765 self.this = apply(controls2c.new_wxTreeItemAttr,_args,_kwargs)
766 self.thisown = 1
767
768
769
770
771 class wxTreeItemIdPtr :
772 def __init__(self,this):
773 self.this = this
774 self.thisown = 0
775 def __del__(self,controls2c=controls2c):
776 if self.thisown == 1 :
777 controls2c.delete_wxTreeItemId(self)
778 def IsOk(self, *_args, **_kwargs):
779 val = apply(controls2c.wxTreeItemId_IsOk,(self,) + _args, _kwargs)
780 return val
781 def __cmp__(self, *_args, **_kwargs):
782 val = apply(controls2c.wxTreeItemId___cmp__,(self,) + _args, _kwargs)
783 return val
784 def __repr__(self):
785 return "<C wxTreeItemId instance at %s>" % (self.this,)
786 class wxTreeItemId(wxTreeItemIdPtr):
787 def __init__(self,*_args,**_kwargs):
788 self.this = apply(controls2c.new_wxTreeItemId,_args,_kwargs)
789 self.thisown = 1
790
791
792
793
794 class wxTreeItemDataPtr(wxObjectPtr):
795 def __init__(self,this):
796 self.this = this
797 self.thisown = 0
798 def GetData(self, *_args, **_kwargs):
799 val = apply(controls2c.wxTreeItemData_GetData,(self,) + _args, _kwargs)
800 return val
801 def SetData(self, *_args, **_kwargs):
802 val = apply(controls2c.wxTreeItemData_SetData,(self,) + _args, _kwargs)
803 return val
804 def GetId(self, *_args, **_kwargs):
805 val = apply(controls2c.wxTreeItemData_GetId,(self,) + _args, _kwargs)
806 if val: val = wxTreeItemIdPtr(val)
807 return val
808 def SetId(self, *_args, **_kwargs):
809 val = apply(controls2c.wxTreeItemData_SetId,(self,) + _args, _kwargs)
810 return val
811 def __repr__(self):
812 return "<C wxTreeItemData instance at %s>" % (self.this,)
813 class wxTreeItemData(wxTreeItemDataPtr):
814 def __init__(self,*_args,**_kwargs):
815 self.this = apply(controls2c.new_wxTreeItemData,_args,_kwargs)
816 self.thisown = 1
817
818
819
820
821 class wxTreeEventPtr(wxNotifyEventPtr):
822 def __init__(self,this):
823 self.this = this
824 self.thisown = 0
825 def GetItem(self, *_args, **_kwargs):
826 val = apply(controls2c.wxTreeEvent_GetItem,(self,) + _args, _kwargs)
827 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
828 return val
829 def GetOldItem(self, *_args, **_kwargs):
830 val = apply(controls2c.wxTreeEvent_GetOldItem,(self,) + _args, _kwargs)
831 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
832 return val
833 def GetPoint(self, *_args, **_kwargs):
834 val = apply(controls2c.wxTreeEvent_GetPoint,(self,) + _args, _kwargs)
835 if val: val = wxPointPtr(val) ; val.thisown = 1
836 return val
837 def GetKeyEvent(self, *_args, **_kwargs):
838 val = apply(controls2c.wxTreeEvent_GetKeyEvent,(self,) + _args, _kwargs)
839 if val: val = wxKeyEventPtr(val)
840 return val
841 def GetCode(self, *_args, **_kwargs):
842 val = apply(controls2c.wxTreeEvent_GetCode,(self,) + _args, _kwargs)
843 return val
844 def GetLabel(self, *_args, **_kwargs):
845 val = apply(controls2c.wxTreeEvent_GetLabel,(self,) + _args, _kwargs)
846 return val
847 def __repr__(self):
848 return "<C wxTreeEvent instance at %s>" % (self.this,)
849 class wxTreeEvent(wxTreeEventPtr):
850 def __init__(self,*_args,**_kwargs):
851 self.this = apply(controls2c.new_wxTreeEvent,_args,_kwargs)
852 self.thisown = 1
853
854
855
856
857 class wxTreeCtrlPtr(wxControlPtr):
858 def __init__(self,this):
859 self.this = this
860 self.thisown = 0
861 def Create(self, *_args, **_kwargs):
862 val = apply(controls2c.wxTreeCtrl_Create,(self,) + _args, _kwargs)
863 return val
864 def _setCallbackInfo(self, *_args, **_kwargs):
865 val = apply(controls2c.wxTreeCtrl__setCallbackInfo,(self,) + _args, _kwargs)
866 return val
867 def GetCount(self, *_args, **_kwargs):
868 val = apply(controls2c.wxTreeCtrl_GetCount,(self,) + _args, _kwargs)
869 return val
870 def GetIndent(self, *_args, **_kwargs):
871 val = apply(controls2c.wxTreeCtrl_GetIndent,(self,) + _args, _kwargs)
872 return val
873 def SetIndent(self, *_args, **_kwargs):
874 val = apply(controls2c.wxTreeCtrl_SetIndent,(self,) + _args, _kwargs)
875 return val
876 def GetImageList(self, *_args, **_kwargs):
877 val = apply(controls2c.wxTreeCtrl_GetImageList,(self,) + _args, _kwargs)
878 return val
879 def GetStateImageList(self, *_args, **_kwargs):
880 val = apply(controls2c.wxTreeCtrl_GetStateImageList,(self,) + _args, _kwargs)
881 return val
882 def SetImageList(self, *_args, **_kwargs):
883 val = apply(controls2c.wxTreeCtrl_SetImageList,(self,) + _args, _kwargs)
884 return val
885 def SetStateImageList(self, *_args, **_kwargs):
886 val = apply(controls2c.wxTreeCtrl_SetStateImageList,(self,) + _args, _kwargs)
887 return val
888 def AssignImageList(self, *_args, **_kwargs):
889 val = apply(controls2c.wxTreeCtrl_AssignImageList,(self,) + _args, _kwargs)
890 _args[0].thisown = 0
891 return val
892 def AssignStateImageList(self, *_args, **_kwargs):
893 val = apply(controls2c.wxTreeCtrl_AssignStateImageList,(self,) + _args, _kwargs)
894 _args[0].thisown = 0
895 return val
896 def GetSpacing(self, *_args, **_kwargs):
897 val = apply(controls2c.wxTreeCtrl_GetSpacing,(self,) + _args, _kwargs)
898 return val
899 def SetSpacing(self, *_args, **_kwargs):
900 val = apply(controls2c.wxTreeCtrl_SetSpacing,(self,) + _args, _kwargs)
901 return val
902 def GetItemText(self, *_args, **_kwargs):
903 val = apply(controls2c.wxTreeCtrl_GetItemText,(self,) + _args, _kwargs)
904 return val
905 def GetItemImage(self, *_args, **_kwargs):
906 val = apply(controls2c.wxTreeCtrl_GetItemImage,(self,) + _args, _kwargs)
907 return val
908 def GetItemSelectedImage(self, *_args, **_kwargs):
909 val = apply(controls2c.wxTreeCtrl_GetItemSelectedImage,(self,) + _args, _kwargs)
910 return val
911 def SetItemText(self, *_args, **_kwargs):
912 val = apply(controls2c.wxTreeCtrl_SetItemText,(self,) + _args, _kwargs)
913 return val
914 def SetItemImage(self, *_args, **_kwargs):
915 val = apply(controls2c.wxTreeCtrl_SetItemImage,(self,) + _args, _kwargs)
916 return val
917 def SetItemSelectedImage(self, *_args, **_kwargs):
918 val = apply(controls2c.wxTreeCtrl_SetItemSelectedImage,(self,) + _args, _kwargs)
919 return val
920 def SetItemHasChildren(self, *_args, **_kwargs):
921 val = apply(controls2c.wxTreeCtrl_SetItemHasChildren,(self,) + _args, _kwargs)
922 return val
923 def GetItemData(self, *_args, **_kwargs):
924 val = apply(controls2c.wxTreeCtrl_GetItemData,(self,) + _args, _kwargs)
925 if val: val = wxTreeItemDataPtr(val)
926 return val
927 def SetItemData(self, *_args, **_kwargs):
928 val = apply(controls2c.wxTreeCtrl_SetItemData,(self,) + _args, _kwargs)
929 return val
930 def GetPyData(self, *_args, **_kwargs):
931 val = apply(controls2c.wxTreeCtrl_GetPyData,(self,) + _args, _kwargs)
932 return val
933 def SetPyData(self, *_args, **_kwargs):
934 val = apply(controls2c.wxTreeCtrl_SetPyData,(self,) + _args, _kwargs)
935 return val
936 def IsVisible(self, *_args, **_kwargs):
937 val = apply(controls2c.wxTreeCtrl_IsVisible,(self,) + _args, _kwargs)
938 return val
939 def ItemHasChildren(self, *_args, **_kwargs):
940 val = apply(controls2c.wxTreeCtrl_ItemHasChildren,(self,) + _args, _kwargs)
941 return val
942 def IsExpanded(self, *_args, **_kwargs):
943 val = apply(controls2c.wxTreeCtrl_IsExpanded,(self,) + _args, _kwargs)
944 return val
945 def IsSelected(self, *_args, **_kwargs):
946 val = apply(controls2c.wxTreeCtrl_IsSelected,(self,) + _args, _kwargs)
947 return val
948 def GetRootItem(self, *_args, **_kwargs):
949 val = apply(controls2c.wxTreeCtrl_GetRootItem,(self,) + _args, _kwargs)
950 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
951 return val
952 def GetSelection(self, *_args, **_kwargs):
953 val = apply(controls2c.wxTreeCtrl_GetSelection,(self,) + _args, _kwargs)
954 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
955 return val
956 def GetItemParent(self, *_args, **_kwargs):
957 val = apply(controls2c.wxTreeCtrl_GetItemParent,(self,) + _args, _kwargs)
958 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
959 return val
960 def GetSelections(self, *_args, **_kwargs):
961 val = apply(controls2c.wxTreeCtrl_GetSelections,(self,) + _args, _kwargs)
962 return val
963 def GetChildrenCount(self, *_args, **_kwargs):
964 val = apply(controls2c.wxTreeCtrl_GetChildrenCount,(self,) + _args, _kwargs)
965 return val
966 def GetFirstChild(self, *_args, **_kwargs):
967 val = apply(controls2c.wxTreeCtrl_GetFirstChild,(self,) + _args, _kwargs)
968 return val
969 def GetNextChild(self, *_args, **_kwargs):
970 val = apply(controls2c.wxTreeCtrl_GetNextChild,(self,) + _args, _kwargs)
971 return val
972 def GetNextSibling(self, *_args, **_kwargs):
973 val = apply(controls2c.wxTreeCtrl_GetNextSibling,(self,) + _args, _kwargs)
974 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
975 return val
976 def GetPrevSibling(self, *_args, **_kwargs):
977 val = apply(controls2c.wxTreeCtrl_GetPrevSibling,(self,) + _args, _kwargs)
978 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
979 return val
980 def GetFirstVisibleItem(self, *_args, **_kwargs):
981 val = apply(controls2c.wxTreeCtrl_GetFirstVisibleItem,(self,) + _args, _kwargs)
982 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
983 return val
984 def GetNextVisible(self, *_args, **_kwargs):
985 val = apply(controls2c.wxTreeCtrl_GetNextVisible,(self,) + _args, _kwargs)
986 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
987 return val
988 def GetPrevVisible(self, *_args, **_kwargs):
989 val = apply(controls2c.wxTreeCtrl_GetPrevVisible,(self,) + _args, _kwargs)
990 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
991 return val
992 def GetLastChild(self, *_args, **_kwargs):
993 val = apply(controls2c.wxTreeCtrl_GetLastChild,(self,) + _args, _kwargs)
994 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
995 return val
996 def AddRoot(self, *_args, **_kwargs):
997 val = apply(controls2c.wxTreeCtrl_AddRoot,(self,) + _args, _kwargs)
998 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
999 return val
1000 def PrependItem(self, *_args, **_kwargs):
1001 val = apply(controls2c.wxTreeCtrl_PrependItem,(self,) + _args, _kwargs)
1002 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
1003 return val
1004 def InsertItem(self, *_args, **_kwargs):
1005 val = apply(controls2c.wxTreeCtrl_InsertItem,(self,) + _args, _kwargs)
1006 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
1007 return val
1008 def InsertItemBefore(self, *_args, **_kwargs):
1009 val = apply(controls2c.wxTreeCtrl_InsertItemBefore,(self,) + _args, _kwargs)
1010 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
1011 return val
1012 def AppendItem(self, *_args, **_kwargs):
1013 val = apply(controls2c.wxTreeCtrl_AppendItem,(self,) + _args, _kwargs)
1014 if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
1015 return val
1016 def Delete(self, *_args, **_kwargs):
1017 val = apply(controls2c.wxTreeCtrl_Delete,(self,) + _args, _kwargs)
1018 return val
1019 def DeleteChildren(self, *_args, **_kwargs):
1020 val = apply(controls2c.wxTreeCtrl_DeleteChildren,(self,) + _args, _kwargs)
1021 return val
1022 def DeleteAllItems(self, *_args, **_kwargs):
1023 val = apply(controls2c.wxTreeCtrl_DeleteAllItems,(self,) + _args, _kwargs)
1024 return val
1025 def Expand(self, *_args, **_kwargs):
1026 val = apply(controls2c.wxTreeCtrl_Expand,(self,) + _args, _kwargs)
1027 return val
1028 def Collapse(self, *_args, **_kwargs):
1029 val = apply(controls2c.wxTreeCtrl_Collapse,(self,) + _args, _kwargs)
1030 return val
1031 def CollapseAndReset(self, *_args, **_kwargs):
1032 val = apply(controls2c.wxTreeCtrl_CollapseAndReset,(self,) + _args, _kwargs)
1033 return val
1034 def Toggle(self, *_args, **_kwargs):
1035 val = apply(controls2c.wxTreeCtrl_Toggle,(self,) + _args, _kwargs)
1036 return val
1037 def Unselect(self, *_args, **_kwargs):
1038 val = apply(controls2c.wxTreeCtrl_Unselect,(self,) + _args, _kwargs)
1039 return val
1040 def UnselectAll(self, *_args, **_kwargs):
1041 val = apply(controls2c.wxTreeCtrl_UnselectAll,(self,) + _args, _kwargs)
1042 return val
1043 def SelectItem(self, *_args, **_kwargs):
1044 val = apply(controls2c.wxTreeCtrl_SelectItem,(self,) + _args, _kwargs)
1045 return val
1046 def EnsureVisible(self, *_args, **_kwargs):
1047 val = apply(controls2c.wxTreeCtrl_EnsureVisible,(self,) + _args, _kwargs)
1048 return val
1049 def ScrollTo(self, *_args, **_kwargs):
1050 val = apply(controls2c.wxTreeCtrl_ScrollTo,(self,) + _args, _kwargs)
1051 return val
1052 def EditLabel(self, *_args, **_kwargs):
1053 val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs)
1054 return val
1055 def GetEditControl(self, *_args, **_kwargs):
1056 val = apply(controls2c.wxTreeCtrl_GetEditControl,(self,) + _args, _kwargs)
1057 return val
1058 def EndEditLabel(self, *_args, **_kwargs):
1059 val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self,) + _args, _kwargs)
1060 return val
1061 def SortChildren(self, *_args, **_kwargs):
1062 val = apply(controls2c.wxTreeCtrl_SortChildren,(self,) + _args, _kwargs)
1063 return val
1064 def SetItemBold(self, *_args, **_kwargs):
1065 val = apply(controls2c.wxTreeCtrl_SetItemBold,(self,) + _args, _kwargs)
1066 return val
1067 def IsBold(self, *_args, **_kwargs):
1068 val = apply(controls2c.wxTreeCtrl_IsBold,(self,) + _args, _kwargs)
1069 return val
1070 def HitTest(self, *_args, **_kwargs):
1071 val = apply(controls2c.wxTreeCtrl_HitTest,(self,) + _args, _kwargs)
1072 return val
1073 def SetItemTextColour(self, *_args, **_kwargs):
1074 val = apply(controls2c.wxTreeCtrl_SetItemTextColour,(self,) + _args, _kwargs)
1075 return val
1076 def SetItemBackgroundColour(self, *_args, **_kwargs):
1077 val = apply(controls2c.wxTreeCtrl_SetItemBackgroundColour,(self,) + _args, _kwargs)
1078 return val
1079 def SetItemFont(self, *_args, **_kwargs):
1080 val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs)
1081 return val
1082 def SetItemDropHighlight(self, *_args, **_kwargs):
1083 val = apply(controls2c.wxTreeCtrl_SetItemDropHighlight,(self,) + _args, _kwargs)
1084 return val
1085 def GetBoundingRect(self, *_args, **_kwargs):
1086 val = apply(controls2c.wxTreeCtrl_GetBoundingRect,(self,) + _args, _kwargs)
1087 return val
1088 def __repr__(self):
1089 return "<C wxTreeCtrl instance at %s>" % (self.this,)
1090
1091 # Redefine some methods that SWIG gets a bit confused on...
1092 def GetFirstChild(self, *_args, **_kwargs):
1093 val1,val2 = apply(controls2c.wxTreeCtrl_GetFirstChild,(self,) + _args, _kwargs)
1094 val1 = wxTreeItemIdPtr(val1)
1095 val1.thisown = 1
1096 return (val1,val2)
1097 def GetNextChild(self, *_args, **_kwargs):
1098 val1,val2 = apply(controls2c.wxTreeCtrl_GetNextChild,(self,) + _args, _kwargs)
1099 val1 = wxTreeItemIdPtr(val1)
1100 val1.thisown = 1
1101 return (val1,val2)
1102 def HitTest(self, *_args, **_kwargs):
1103 val1, val2 = apply(controls2c.wxTreeCtrl_HitTest,(self,) + _args, _kwargs)
1104 val1 = wxTreeItemIdPtr(val1)
1105 val1.thisown = 1
1106 return (val1,val2)
1107
1108 class wxTreeCtrl(wxTreeCtrlPtr):
1109 def __init__(self,*_args,**_kwargs):
1110 self.this = apply(controls2c.new_wxTreeCtrl,_args,_kwargs)
1111 self.thisown = 1
1112 self._setCallbackInfo(self, wxTreeCtrl)
1113 self._setOORInfo(self)
1114
1115
1116
1117 def wxPreTreeCtrl(*_args,**_kwargs):
1118 val = wxTreeCtrlPtr(apply(controls2c.new_wxPreTreeCtrl,_args,_kwargs))
1119 val.thisown = 1
1120 val._setOORInfo(val)
1121 return val
1122
1123
1124
1125
1126 #-------------- FUNCTION WRAPPERS ------------------
1127
1128
1129
1130 #-------------- VARIABLE WRAPPERS ------------------
1131
1132 wxEVT_COMMAND_LIST_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_DRAG
1133 wxEVT_COMMAND_LIST_BEGIN_RDRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_RDRAG
1134 wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
1135 wxEVT_COMMAND_LIST_END_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_END_LABEL_EDIT
1136 wxEVT_COMMAND_LIST_DELETE_ITEM = controls2c.wxEVT_COMMAND_LIST_DELETE_ITEM
1137 wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = controls2c.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
1138 wxEVT_COMMAND_LIST_GET_INFO = controls2c.wxEVT_COMMAND_LIST_GET_INFO
1139 wxEVT_COMMAND_LIST_SET_INFO = controls2c.wxEVT_COMMAND_LIST_SET_INFO
1140 wxEVT_COMMAND_LIST_ITEM_SELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_SELECTED
1141 wxEVT_COMMAND_LIST_ITEM_DESELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_DESELECTED
1142 wxEVT_COMMAND_LIST_KEY_DOWN = controls2c.wxEVT_COMMAND_LIST_KEY_DOWN
1143 wxEVT_COMMAND_LIST_INSERT_ITEM = controls2c.wxEVT_COMMAND_LIST_INSERT_ITEM
1144 wxEVT_COMMAND_LIST_COL_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_CLICK
1145 wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK
1146 wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK
1147 wxEVT_COMMAND_LIST_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_LIST_ITEM_ACTIVATED
1148 wxEVT_COMMAND_LIST_CACHE_HINT = controls2c.wxEVT_COMMAND_LIST_CACHE_HINT
1149 wxEVT_COMMAND_LIST_COL_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_RIGHT_CLICK
1150 wxEVT_COMMAND_LIST_COL_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_BEGIN_DRAG
1151 wxEVT_COMMAND_LIST_COL_DRAGGING = controls2c.wxEVT_COMMAND_LIST_COL_DRAGGING
1152 wxEVT_COMMAND_LIST_COL_END_DRAG = controls2c.wxEVT_COMMAND_LIST_COL_END_DRAG
1153 wxEVT_COMMAND_LIST_ITEM_FOCUSED = controls2c.wxEVT_COMMAND_LIST_ITEM_FOCUSED
1154 wxLC_VRULES = controls2c.wxLC_VRULES
1155 wxLC_HRULES = controls2c.wxLC_HRULES
1156 wxLC_ICON = controls2c.wxLC_ICON
1157 wxLC_SMALL_ICON = controls2c.wxLC_SMALL_ICON
1158 wxLC_LIST = controls2c.wxLC_LIST
1159 wxLC_REPORT = controls2c.wxLC_REPORT
1160 wxLC_ALIGN_TOP = controls2c.wxLC_ALIGN_TOP
1161 wxLC_ALIGN_LEFT = controls2c.wxLC_ALIGN_LEFT
1162 wxLC_AUTOARRANGE = controls2c.wxLC_AUTOARRANGE
1163 wxLC_VIRTUAL = controls2c.wxLC_VIRTUAL
1164 wxLC_EDIT_LABELS = controls2c.wxLC_EDIT_LABELS
1165 wxLC_NO_HEADER = controls2c.wxLC_NO_HEADER
1166 wxLC_NO_SORT_HEADER = controls2c.wxLC_NO_SORT_HEADER
1167 wxLC_SINGLE_SEL = controls2c.wxLC_SINGLE_SEL
1168 wxLC_SORT_ASCENDING = controls2c.wxLC_SORT_ASCENDING
1169 wxLC_SORT_DESCENDING = controls2c.wxLC_SORT_DESCENDING
1170 wxLC_MASK_TYPE = controls2c.wxLC_MASK_TYPE
1171 wxLC_MASK_ALIGN = controls2c.wxLC_MASK_ALIGN
1172 wxLC_MASK_SORT = controls2c.wxLC_MASK_SORT
1173 wxLC_USER_TEXT = controls2c.wxLC_USER_TEXT
1174 wxLIST_MASK_STATE = controls2c.wxLIST_MASK_STATE
1175 wxLIST_MASK_TEXT = controls2c.wxLIST_MASK_TEXT
1176 wxLIST_MASK_IMAGE = controls2c.wxLIST_MASK_IMAGE
1177 wxLIST_MASK_DATA = controls2c.wxLIST_MASK_DATA
1178 wxLIST_SET_ITEM = controls2c.wxLIST_SET_ITEM
1179 wxLIST_MASK_WIDTH = controls2c.wxLIST_MASK_WIDTH
1180 wxLIST_MASK_FORMAT = controls2c.wxLIST_MASK_FORMAT
1181 wxLIST_STATE_DONTCARE = controls2c.wxLIST_STATE_DONTCARE
1182 wxLIST_STATE_DROPHILITED = controls2c.wxLIST_STATE_DROPHILITED
1183 wxLIST_STATE_FOCUSED = controls2c.wxLIST_STATE_FOCUSED
1184 wxLIST_STATE_SELECTED = controls2c.wxLIST_STATE_SELECTED
1185 wxLIST_STATE_CUT = controls2c.wxLIST_STATE_CUT
1186 wxLIST_HITTEST_ABOVE = controls2c.wxLIST_HITTEST_ABOVE
1187 wxLIST_HITTEST_BELOW = controls2c.wxLIST_HITTEST_BELOW
1188 wxLIST_HITTEST_NOWHERE = controls2c.wxLIST_HITTEST_NOWHERE
1189 wxLIST_HITTEST_ONITEMICON = controls2c.wxLIST_HITTEST_ONITEMICON
1190 wxLIST_HITTEST_ONITEMLABEL = controls2c.wxLIST_HITTEST_ONITEMLABEL
1191 wxLIST_HITTEST_ONITEMRIGHT = controls2c.wxLIST_HITTEST_ONITEMRIGHT
1192 wxLIST_HITTEST_ONITEMSTATEICON = controls2c.wxLIST_HITTEST_ONITEMSTATEICON
1193 wxLIST_HITTEST_TOLEFT = controls2c.wxLIST_HITTEST_TOLEFT
1194 wxLIST_HITTEST_TORIGHT = controls2c.wxLIST_HITTEST_TORIGHT
1195 wxLIST_HITTEST_ONITEM = controls2c.wxLIST_HITTEST_ONITEM
1196 wxLIST_NEXT_ABOVE = controls2c.wxLIST_NEXT_ABOVE
1197 wxLIST_NEXT_ALL = controls2c.wxLIST_NEXT_ALL
1198 wxLIST_NEXT_BELOW = controls2c.wxLIST_NEXT_BELOW
1199 wxLIST_NEXT_LEFT = controls2c.wxLIST_NEXT_LEFT
1200 wxLIST_NEXT_RIGHT = controls2c.wxLIST_NEXT_RIGHT
1201 wxLIST_ALIGN_DEFAULT = controls2c.wxLIST_ALIGN_DEFAULT
1202 wxLIST_ALIGN_LEFT = controls2c.wxLIST_ALIGN_LEFT
1203 wxLIST_ALIGN_TOP = controls2c.wxLIST_ALIGN_TOP
1204 wxLIST_ALIGN_SNAP_TO_GRID = controls2c.wxLIST_ALIGN_SNAP_TO_GRID
1205 wxLIST_AUTOSIZE = controls2c.wxLIST_AUTOSIZE
1206 wxLIST_AUTOSIZE_USEHEADER = controls2c.wxLIST_AUTOSIZE_USEHEADER
1207 wxLIST_RECT_BOUNDS = controls2c.wxLIST_RECT_BOUNDS
1208 wxLIST_RECT_ICON = controls2c.wxLIST_RECT_ICON
1209 wxLIST_RECT_LABEL = controls2c.wxLIST_RECT_LABEL
1210 wxLIST_FIND_UP = controls2c.wxLIST_FIND_UP
1211 wxLIST_FIND_DOWN = controls2c.wxLIST_FIND_DOWN
1212 wxLIST_FIND_LEFT = controls2c.wxLIST_FIND_LEFT
1213 wxLIST_FIND_RIGHT = controls2c.wxLIST_FIND_RIGHT
1214 wxLIST_FORMAT_LEFT = controls2c.wxLIST_FORMAT_LEFT
1215 wxLIST_FORMAT_RIGHT = controls2c.wxLIST_FORMAT_RIGHT
1216 wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE
1217 wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER
1218 wxTR_NO_BUTTONS = controls2c.wxTR_NO_BUTTONS
1219 wxTR_HAS_BUTTONS = controls2c.wxTR_HAS_BUTTONS
1220 wxTR_TWIST_BUTTONS = controls2c.wxTR_TWIST_BUTTONS
1221 wxTR_NO_LINES = controls2c.wxTR_NO_LINES
1222 wxTR_MAC_BUTTONS = controls2c.wxTR_MAC_BUTTONS
1223 wxTR_SINGLE = controls2c.wxTR_SINGLE
1224 wxTR_MULTIPLE = controls2c.wxTR_MULTIPLE
1225 wxTR_EXTENDED = controls2c.wxTR_EXTENDED
1226 wxTR_EDIT_LABELS = controls2c.wxTR_EDIT_LABELS
1227 wxTR_LINES_AT_ROOT = controls2c.wxTR_LINES_AT_ROOT
1228 wxTR_HIDE_ROOT = controls2c.wxTR_HIDE_ROOT
1229 wxTR_ROW_LINES = controls2c.wxTR_ROW_LINES
1230 wxTR_HAS_VARIABLE_ROW_HEIGHT = controls2c.wxTR_HAS_VARIABLE_ROW_HEIGHT
1231 wxTR_DEFAULT_STYLE = controls2c.wxTR_DEFAULT_STYLE
1232 wxTreeItemIcon_Normal = controls2c.wxTreeItemIcon_Normal
1233 wxTreeItemIcon_Selected = controls2c.wxTreeItemIcon_Selected
1234 wxTreeItemIcon_Expanded = controls2c.wxTreeItemIcon_Expanded
1235 wxTreeItemIcon_SelectedExpanded = controls2c.wxTreeItemIcon_SelectedExpanded
1236 wxTreeItemIcon_Max = controls2c.wxTreeItemIcon_Max
1237 wxTREE_HITTEST_ABOVE = controls2c.wxTREE_HITTEST_ABOVE
1238 wxTREE_HITTEST_BELOW = controls2c.wxTREE_HITTEST_BELOW
1239 wxTREE_HITTEST_NOWHERE = controls2c.wxTREE_HITTEST_NOWHERE
1240 wxTREE_HITTEST_ONITEMBUTTON = controls2c.wxTREE_HITTEST_ONITEMBUTTON
1241 wxTREE_HITTEST_ONITEMICON = controls2c.wxTREE_HITTEST_ONITEMICON
1242 wxTREE_HITTEST_ONITEMINDENT = controls2c.wxTREE_HITTEST_ONITEMINDENT
1243 wxTREE_HITTEST_ONITEMLABEL = controls2c.wxTREE_HITTEST_ONITEMLABEL
1244 wxTREE_HITTEST_ONITEMRIGHT = controls2c.wxTREE_HITTEST_ONITEMRIGHT
1245 wxTREE_HITTEST_ONITEMSTATEICON = controls2c.wxTREE_HITTEST_ONITEMSTATEICON
1246 wxTREE_HITTEST_TOLEFT = controls2c.wxTREE_HITTEST_TOLEFT
1247 wxTREE_HITTEST_TORIGHT = controls2c.wxTREE_HITTEST_TORIGHT
1248 wxTREE_HITTEST_ONITEMUPPERPART = controls2c.wxTREE_HITTEST_ONITEMUPPERPART
1249 wxTREE_HITTEST_ONITEMLOWERPART = controls2c.wxTREE_HITTEST_ONITEMLOWERPART
1250 wxTREE_HITTEST_ONITEM = controls2c.wxTREE_HITTEST_ONITEM
1251 wxEVT_COMMAND_TREE_BEGIN_DRAG = controls2c.wxEVT_COMMAND_TREE_BEGIN_DRAG
1252 wxEVT_COMMAND_TREE_BEGIN_RDRAG = controls2c.wxEVT_COMMAND_TREE_BEGIN_RDRAG
1253 wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = controls2c.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT
1254 wxEVT_COMMAND_TREE_END_LABEL_EDIT = controls2c.wxEVT_COMMAND_TREE_END_LABEL_EDIT
1255 wxEVT_COMMAND_TREE_DELETE_ITEM = controls2c.wxEVT_COMMAND_TREE_DELETE_ITEM
1256 wxEVT_COMMAND_TREE_GET_INFO = controls2c.wxEVT_COMMAND_TREE_GET_INFO
1257 wxEVT_COMMAND_TREE_SET_INFO = controls2c.wxEVT_COMMAND_TREE_SET_INFO
1258 wxEVT_COMMAND_TREE_ITEM_EXPANDED = controls2c.wxEVT_COMMAND_TREE_ITEM_EXPANDED
1259 wxEVT_COMMAND_TREE_ITEM_EXPANDING = controls2c.wxEVT_COMMAND_TREE_ITEM_EXPANDING
1260 wxEVT_COMMAND_TREE_ITEM_COLLAPSED = controls2c.wxEVT_COMMAND_TREE_ITEM_COLLAPSED
1261 wxEVT_COMMAND_TREE_ITEM_COLLAPSING = controls2c.wxEVT_COMMAND_TREE_ITEM_COLLAPSING
1262 wxEVT_COMMAND_TREE_SEL_CHANGED = controls2c.wxEVT_COMMAND_TREE_SEL_CHANGED
1263 wxEVT_COMMAND_TREE_SEL_CHANGING = controls2c.wxEVT_COMMAND_TREE_SEL_CHANGING
1264 wxEVT_COMMAND_TREE_KEY_DOWN = controls2c.wxEVT_COMMAND_TREE_KEY_DOWN
1265 wxEVT_COMMAND_TREE_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_TREE_ITEM_ACTIVATED
1266 wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK = controls2c.wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK
1267 wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK
1268 wxEVT_COMMAND_TREE_END_DRAG = controls2c.wxEVT_COMMAND_TREE_END_DRAG