]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/xrc.py
reSWIGged
[wxWidgets.git] / wxPython / src / gtk / xrc.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 The `XmlResource` class allows program resources defining menus, layout of
6 controls on a panel, etc. to be loaded from an XML file.
7 """
8
9 import _xrc
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 _core
60 wx = _core
61 __docfilter__ = wx.__DocFilter(globals())
62 #---------------------------------------------------------------------------
63
64 WX_XMLRES_CURRENT_VERSION_MAJOR = _xrc.WX_XMLRES_CURRENT_VERSION_MAJOR
65 WX_XMLRES_CURRENT_VERSION_MINOR = _xrc.WX_XMLRES_CURRENT_VERSION_MINOR
66 WX_XMLRES_CURRENT_VERSION_RELEASE = _xrc.WX_XMLRES_CURRENT_VERSION_RELEASE
67 WX_XMLRES_CURRENT_VERSION_REVISION = _xrc.WX_XMLRES_CURRENT_VERSION_REVISION
68 XRC_USE_LOCALE = _xrc.XRC_USE_LOCALE
69 XRC_NO_SUBCLASSING = _xrc.XRC_NO_SUBCLASSING
70 XRC_NO_RELOADING = _xrc.XRC_NO_RELOADING
71 class XmlResource(_core.Object):
72 """Proxy of C++ XmlResource class"""
73 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
74 __repr__ = _swig_repr
75 def __init__(self, *args, **kwargs):
76 """__init__(self, String filemask, int flags=XRC_USE_LOCALE) -> XmlResource"""
77 _xrc.XmlResource_swiginit(self,_xrc.new_XmlResource(*args, **kwargs))
78 self.InitAllHandlers()
79
80 __swig_destroy__ = _xrc.delete_XmlResource
81 __del__ = lambda self : None;
82 def Load(*args, **kwargs):
83 """Load(self, String filemask) -> bool"""
84 return _xrc.XmlResource_Load(*args, **kwargs)
85
86 def LoadFromString(*args, **kwargs):
87 """LoadFromString(self, String data) -> bool"""
88 return _xrc.XmlResource_LoadFromString(*args, **kwargs)
89
90 def Unload(*args, **kwargs):
91 """Unload(self, String filename) -> bool"""
92 return _xrc.XmlResource_Unload(*args, **kwargs)
93
94 def InitAllHandlers(*args, **kwargs):
95 """InitAllHandlers(self)"""
96 return _xrc.XmlResource_InitAllHandlers(*args, **kwargs)
97
98 def AddHandler(*args, **kwargs):
99 """AddHandler(self, XmlResourceHandler handler)"""
100 return _xrc.XmlResource_AddHandler(*args, **kwargs)
101
102 def InsertHandler(*args, **kwargs):
103 """InsertHandler(self, XmlResourceHandler handler)"""
104 return _xrc.XmlResource_InsertHandler(*args, **kwargs)
105
106 def ClearHandlers(*args, **kwargs):
107 """ClearHandlers(self)"""
108 return _xrc.XmlResource_ClearHandlers(*args, **kwargs)
109
110 def AddSubclassFactory(*args, **kwargs):
111 """AddSubclassFactory(XmlSubclassFactory factory)"""
112 return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
113
114 AddSubclassFactory = staticmethod(AddSubclassFactory)
115 def LoadMenu(*args, **kwargs):
116 """LoadMenu(self, String name) -> Menu"""
117 return _xrc.XmlResource_LoadMenu(*args, **kwargs)
118
119 def LoadMenuBar(*args, **kwargs):
120 """LoadMenuBar(self, String name) -> MenuBar"""
121 return _xrc.XmlResource_LoadMenuBar(*args, **kwargs)
122
123 def LoadMenuBarOnFrame(*args, **kwargs):
124 """LoadMenuBarOnFrame(self, Window parent, String name) -> MenuBar"""
125 return _xrc.XmlResource_LoadMenuBarOnFrame(*args, **kwargs)
126
127 def LoadToolBar(*args, **kwargs):
128 """LoadToolBar(self, Window parent, String name) -> wxToolBar"""
129 return _xrc.XmlResource_LoadToolBar(*args, **kwargs)
130
131 def LoadDialog(*args, **kwargs):
132 """LoadDialog(self, Window parent, String name) -> wxDialog"""
133 return _xrc.XmlResource_LoadDialog(*args, **kwargs)
134
135 def LoadOnDialog(*args, **kwargs):
136 """LoadOnDialog(self, wxDialog dlg, Window parent, String name) -> bool"""
137 return _xrc.XmlResource_LoadOnDialog(*args, **kwargs)
138
139 def LoadPanel(*args, **kwargs):
140 """LoadPanel(self, Window parent, String name) -> wxPanel"""
141 return _xrc.XmlResource_LoadPanel(*args, **kwargs)
142
143 def LoadOnPanel(*args, **kwargs):
144 """LoadOnPanel(self, wxPanel panel, Window parent, String name) -> bool"""
145 return _xrc.XmlResource_LoadOnPanel(*args, **kwargs)
146
147 def LoadFrame(*args, **kwargs):
148 """LoadFrame(self, Window parent, String name) -> wxFrame"""
149 return _xrc.XmlResource_LoadFrame(*args, **kwargs)
150
151 def LoadOnFrame(*args, **kwargs):
152 """LoadOnFrame(self, wxFrame frame, Window parent, String name) -> bool"""
153 return _xrc.XmlResource_LoadOnFrame(*args, **kwargs)
154
155 def LoadObject(*args, **kwargs):
156 """LoadObject(self, Window parent, String name, String classname) -> Object"""
157 return _xrc.XmlResource_LoadObject(*args, **kwargs)
158
159 def LoadOnObject(*args, **kwargs):
160 """LoadOnObject(self, Object instance, Window parent, String name, String classname) -> bool"""
161 return _xrc.XmlResource_LoadOnObject(*args, **kwargs)
162
163 def LoadBitmap(*args, **kwargs):
164 """LoadBitmap(self, String name) -> Bitmap"""
165 return _xrc.XmlResource_LoadBitmap(*args, **kwargs)
166
167 def LoadIcon(*args, **kwargs):
168 """LoadIcon(self, String name) -> Icon"""
169 return _xrc.XmlResource_LoadIcon(*args, **kwargs)
170
171 def AttachUnknownControl(*args, **kwargs):
172 """AttachUnknownControl(self, String name, Window control, Window parent=None) -> bool"""
173 return _xrc.XmlResource_AttachUnknownControl(*args, **kwargs)
174
175 def GetXRCID(*args, **kwargs):
176 """GetXRCID(String str_id, int value_if_not_found=ID_NONE) -> int"""
177 return _xrc.XmlResource_GetXRCID(*args, **kwargs)
178
179 GetXRCID = staticmethod(GetXRCID)
180 def GetVersion(*args, **kwargs):
181 """GetVersion(self) -> long"""
182 return _xrc.XmlResource_GetVersion(*args, **kwargs)
183
184 def CompareVersion(*args, **kwargs):
185 """CompareVersion(self, int major, int minor, int release, int revision) -> int"""
186 return _xrc.XmlResource_CompareVersion(*args, **kwargs)
187
188 def Get(*args, **kwargs):
189 """Get() -> XmlResource"""
190 return _xrc.XmlResource_Get(*args, **kwargs)
191
192 Get = staticmethod(Get)
193 def Set(*args, **kwargs):
194 """Set(XmlResource res) -> XmlResource"""
195 return _xrc.XmlResource_Set(*args, **kwargs)
196
197 Set = staticmethod(Set)
198 def GetFlags(*args, **kwargs):
199 """GetFlags(self) -> int"""
200 return _xrc.XmlResource_GetFlags(*args, **kwargs)
201
202 def SetFlags(*args, **kwargs):
203 """SetFlags(self, int flags)"""
204 return _xrc.XmlResource_SetFlags(*args, **kwargs)
205
206 _xrc.XmlResource_swigregister(XmlResource)
207 cvar = _xrc.cvar
208 UTF8String = cvar.UTF8String
209 StyleString = cvar.StyleString
210 SizeString = cvar.SizeString
211 PosString = cvar.PosString
212 BitmapString = cvar.BitmapString
213 IconString = cvar.IconString
214 FontString = cvar.FontString
215
216 def EmptyXmlResource(*args, **kwargs):
217 """EmptyXmlResource(int flags=XRC_USE_LOCALE) -> XmlResource"""
218 val = _xrc.new_EmptyXmlResource(*args, **kwargs)
219 val.InitAllHandlers()
220 return val
221
222 def XmlResource_AddSubclassFactory(*args, **kwargs):
223 """XmlResource_AddSubclassFactory(XmlSubclassFactory factory)"""
224 return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
225
226 def XmlResource_GetXRCID(*args, **kwargs):
227 """XmlResource_GetXRCID(String str_id, int value_if_not_found=ID_NONE) -> int"""
228 return _xrc.XmlResource_GetXRCID(*args, **kwargs)
229
230 def XmlResource_Get(*args):
231 """XmlResource_Get() -> XmlResource"""
232 return _xrc.XmlResource_Get(*args)
233
234 def XmlResource_Set(*args, **kwargs):
235 """XmlResource_Set(XmlResource res) -> XmlResource"""
236 return _xrc.XmlResource_Set(*args, **kwargs)
237
238 def XRCID(str_id, value_if_not_found = wx.ID_NONE):
239 return XmlResource_GetXRCID(str_id, value_if_not_found)
240
241 def XRCCTRL(window, str_id, *ignoreargs):
242 return window.FindWindowById(XRCID(str_id))
243
244 #---------------------------------------------------------------------------
245
246 class XmlSubclassFactory(object):
247 """Proxy of C++ XmlSubclassFactory class"""
248 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
249 __repr__ = _swig_repr
250 def __init__(self, *args, **kwargs):
251 """__init__(self) -> XmlSubclassFactory"""
252 _xrc.XmlSubclassFactory_swiginit(self,_xrc.new_XmlSubclassFactory(*args, **kwargs))
253 self._setCallbackInfo(self, XmlSubclassFactory)
254
255 def _setCallbackInfo(*args, **kwargs):
256 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
257 return _xrc.XmlSubclassFactory__setCallbackInfo(*args, **kwargs)
258
259 _xrc.XmlSubclassFactory_swigregister(XmlSubclassFactory)
260
261 #---------------------------------------------------------------------------
262
263 XML_ELEMENT_NODE = _xrc.XML_ELEMENT_NODE
264 XML_ATTRIBUTE_NODE = _xrc.XML_ATTRIBUTE_NODE
265 XML_TEXT_NODE = _xrc.XML_TEXT_NODE
266 XML_CDATA_SECTION_NODE = _xrc.XML_CDATA_SECTION_NODE
267 XML_ENTITY_REF_NODE = _xrc.XML_ENTITY_REF_NODE
268 XML_ENTITY_NODE = _xrc.XML_ENTITY_NODE
269 XML_PI_NODE = _xrc.XML_PI_NODE
270 XML_COMMENT_NODE = _xrc.XML_COMMENT_NODE
271 XML_DOCUMENT_NODE = _xrc.XML_DOCUMENT_NODE
272 XML_DOCUMENT_TYPE_NODE = _xrc.XML_DOCUMENT_TYPE_NODE
273 XML_DOCUMENT_FRAG_NODE = _xrc.XML_DOCUMENT_FRAG_NODE
274 XML_NOTATION_NODE = _xrc.XML_NOTATION_NODE
275 XML_HTML_DOCUMENT_NODE = _xrc.XML_HTML_DOCUMENT_NODE
276 class XmlProperty(object):
277 """Proxy of C++ XmlProperty class"""
278 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
279 __repr__ = _swig_repr
280 def __init__(self, *args, **kwargs):
281 """
282 __init__(self, String name=EmptyString, String value=EmptyString,
283 XmlProperty next=None) -> XmlProperty
284 """
285 _xrc.XmlProperty_swiginit(self,_xrc.new_XmlProperty(*args, **kwargs))
286 def GetName(*args, **kwargs):
287 """GetName(self) -> String"""
288 return _xrc.XmlProperty_GetName(*args, **kwargs)
289
290 def GetValue(*args, **kwargs):
291 """GetValue(self) -> String"""
292 return _xrc.XmlProperty_GetValue(*args, **kwargs)
293
294 def GetNext(*args, **kwargs):
295 """GetNext(self) -> XmlProperty"""
296 return _xrc.XmlProperty_GetNext(*args, **kwargs)
297
298 def SetName(*args, **kwargs):
299 """SetName(self, String name)"""
300 return _xrc.XmlProperty_SetName(*args, **kwargs)
301
302 def SetValue(*args, **kwargs):
303 """SetValue(self, String value)"""
304 return _xrc.XmlProperty_SetValue(*args, **kwargs)
305
306 def SetNext(*args, **kwargs):
307 """SetNext(self, XmlProperty next)"""
308 return _xrc.XmlProperty_SetNext(*args, **kwargs)
309
310 _xrc.XmlProperty_swigregister(XmlProperty)
311
312 class XmlNode(object):
313 """Proxy of C++ XmlNode class"""
314 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
315 __repr__ = _swig_repr
316 def __init__(self, *args, **kwargs):
317 """
318 __init__(self, XmlNode parent=None, int type=0, String name=EmptyString,
319 String content=EmptyString, XmlProperty props=None,
320 XmlNode next=None) -> XmlNode
321 """
322 _xrc.XmlNode_swiginit(self,_xrc.new_XmlNode(*args, **kwargs))
323 __swig_destroy__ = _xrc.delete_XmlNode
324 __del__ = lambda self : None;
325 def AddChild(*args, **kwargs):
326 """AddChild(self, XmlNode child)"""
327 return _xrc.XmlNode_AddChild(*args, **kwargs)
328
329 def InsertChild(*args, **kwargs):
330 """InsertChild(self, XmlNode child, XmlNode before_node)"""
331 return _xrc.XmlNode_InsertChild(*args, **kwargs)
332
333 def RemoveChild(*args, **kwargs):
334 """RemoveChild(self, XmlNode child) -> bool"""
335 return _xrc.XmlNode_RemoveChild(*args, **kwargs)
336
337 def AddProperty(*args, **kwargs):
338 """AddProperty(self, XmlProperty prop)"""
339 return _xrc.XmlNode_AddProperty(*args, **kwargs)
340
341 def AddPropertyName(*args, **kwargs):
342 """AddPropertyName(self, String name, String value)"""
343 return _xrc.XmlNode_AddPropertyName(*args, **kwargs)
344
345 def DeleteProperty(*args, **kwargs):
346 """DeleteProperty(self, String name) -> bool"""
347 return _xrc.XmlNode_DeleteProperty(*args, **kwargs)
348
349 def GetType(*args, **kwargs):
350 """GetType(self) -> int"""
351 return _xrc.XmlNode_GetType(*args, **kwargs)
352
353 def GetName(*args, **kwargs):
354 """GetName(self) -> String"""
355 return _xrc.XmlNode_GetName(*args, **kwargs)
356
357 def GetContent(*args, **kwargs):
358 """GetContent(self) -> String"""
359 return _xrc.XmlNode_GetContent(*args, **kwargs)
360
361 def GetParent(*args, **kwargs):
362 """GetParent(self) -> XmlNode"""
363 return _xrc.XmlNode_GetParent(*args, **kwargs)
364
365 def GetNext(*args, **kwargs):
366 """GetNext(self) -> XmlNode"""
367 return _xrc.XmlNode_GetNext(*args, **kwargs)
368
369 def GetChildren(*args, **kwargs):
370 """GetChildren(self) -> XmlNode"""
371 return _xrc.XmlNode_GetChildren(*args, **kwargs)
372
373 def GetProperties(*args, **kwargs):
374 """GetProperties(self) -> XmlProperty"""
375 return _xrc.XmlNode_GetProperties(*args, **kwargs)
376
377 def GetPropVal(*args, **kwargs):
378 """GetPropVal(self, String propName, String defaultVal) -> String"""
379 return _xrc.XmlNode_GetPropVal(*args, **kwargs)
380
381 def HasProp(*args, **kwargs):
382 """HasProp(self, String propName) -> bool"""
383 return _xrc.XmlNode_HasProp(*args, **kwargs)
384
385 def SetType(*args, **kwargs):
386 """SetType(self, int type)"""
387 return _xrc.XmlNode_SetType(*args, **kwargs)
388
389 def SetName(*args, **kwargs):
390 """SetName(self, String name)"""
391 return _xrc.XmlNode_SetName(*args, **kwargs)
392
393 def SetContent(*args, **kwargs):
394 """SetContent(self, String con)"""
395 return _xrc.XmlNode_SetContent(*args, **kwargs)
396
397 def SetParent(*args, **kwargs):
398 """SetParent(self, XmlNode parent)"""
399 return _xrc.XmlNode_SetParent(*args, **kwargs)
400
401 def SetNext(*args, **kwargs):
402 """SetNext(self, XmlNode next)"""
403 return _xrc.XmlNode_SetNext(*args, **kwargs)
404
405 def SetChildren(*args, **kwargs):
406 """SetChildren(self, XmlNode child)"""
407 return _xrc.XmlNode_SetChildren(*args, **kwargs)
408
409 def SetProperties(*args, **kwargs):
410 """SetProperties(self, XmlProperty prop)"""
411 return _xrc.XmlNode_SetProperties(*args, **kwargs)
412
413 _xrc.XmlNode_swigregister(XmlNode)
414
415 def XmlNodeEasy(*args, **kwargs):
416 """XmlNodeEasy(int type, String name, String content=EmptyString) -> XmlNode"""
417 val = _xrc.new_XmlNodeEasy(*args, **kwargs)
418 return val
419
420 class XmlDocument(_core.Object):
421 """Proxy of C++ XmlDocument class"""
422 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
423 __repr__ = _swig_repr
424 def __init__(self, *args, **kwargs):
425 """__init__(self, String filename, String encoding=UTF8String) -> XmlDocument"""
426 _xrc.XmlDocument_swiginit(self,_xrc.new_XmlDocument(*args, **kwargs))
427 __swig_destroy__ = _xrc.delete_XmlDocument
428 __del__ = lambda self : None;
429 def Load(*args, **kwargs):
430 """Load(self, String filename, String encoding=UTF8String) -> bool"""
431 return _xrc.XmlDocument_Load(*args, **kwargs)
432
433 def LoadFromStream(*args, **kwargs):
434 """LoadFromStream(self, InputStream stream, String encoding=UTF8String) -> bool"""
435 return _xrc.XmlDocument_LoadFromStream(*args, **kwargs)
436
437 def Save(*args, **kwargs):
438 """Save(self, String filename) -> bool"""
439 return _xrc.XmlDocument_Save(*args, **kwargs)
440
441 def SaveToStream(*args, **kwargs):
442 """SaveToStream(self, OutputStream stream) -> bool"""
443 return _xrc.XmlDocument_SaveToStream(*args, **kwargs)
444
445 def IsOk(*args, **kwargs):
446 """IsOk(self) -> bool"""
447 return _xrc.XmlDocument_IsOk(*args, **kwargs)
448
449 def GetRoot(*args, **kwargs):
450 """GetRoot(self) -> XmlNode"""
451 return _xrc.XmlDocument_GetRoot(*args, **kwargs)
452
453 def GetVersion(*args, **kwargs):
454 """GetVersion(self) -> String"""
455 return _xrc.XmlDocument_GetVersion(*args, **kwargs)
456
457 def GetFileEncoding(*args, **kwargs):
458 """GetFileEncoding(self) -> String"""
459 return _xrc.XmlDocument_GetFileEncoding(*args, **kwargs)
460
461 def SetRoot(*args, **kwargs):
462 """SetRoot(self, XmlNode node)"""
463 return _xrc.XmlDocument_SetRoot(*args, **kwargs)
464
465 def SetVersion(*args, **kwargs):
466 """SetVersion(self, String version)"""
467 return _xrc.XmlDocument_SetVersion(*args, **kwargs)
468
469 def SetFileEncoding(*args, **kwargs):
470 """SetFileEncoding(self, String encoding)"""
471 return _xrc.XmlDocument_SetFileEncoding(*args, **kwargs)
472
473 _xrc.XmlDocument_swigregister(XmlDocument)
474
475 def XmlDocumentFromStream(*args, **kwargs):
476 """XmlDocumentFromStream(InputStream stream, String encoding=UTF8String) -> XmlDocument"""
477 val = _xrc.new_XmlDocumentFromStream(*args, **kwargs)
478 return val
479
480 def EmptyXmlDocument(*args, **kwargs):
481 """EmptyXmlDocument() -> XmlDocument"""
482 val = _xrc.new_EmptyXmlDocument(*args, **kwargs)
483 return val
484
485 #---------------------------------------------------------------------------
486
487 class XmlResourceHandler(_core.Object):
488 """Proxy of C++ XmlResourceHandler class"""
489 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
490 __repr__ = _swig_repr
491 def __init__(self, *args, **kwargs):
492 """__init__(self) -> XmlResourceHandler"""
493 _xrc.XmlResourceHandler_swiginit(self,_xrc.new_XmlResourceHandler(*args, **kwargs))
494 self._setCallbackInfo(self, XmlResourceHandler)
495
496 def _setCallbackInfo(*args, **kwargs):
497 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
498 return _xrc.XmlResourceHandler__setCallbackInfo(*args, **kwargs)
499
500 def CreateResource(*args, **kwargs):
501 """CreateResource(self, XmlNode node, Object parent, Object instance) -> Object"""
502 return _xrc.XmlResourceHandler_CreateResource(*args, **kwargs)
503
504 def SetParentResource(*args, **kwargs):
505 """SetParentResource(self, XmlResource res)"""
506 return _xrc.XmlResourceHandler_SetParentResource(*args, **kwargs)
507
508 def GetResource(*args, **kwargs):
509 """GetResource(self) -> XmlResource"""
510 return _xrc.XmlResourceHandler_GetResource(*args, **kwargs)
511
512 def GetNode(*args, **kwargs):
513 """GetNode(self) -> XmlNode"""
514 return _xrc.XmlResourceHandler_GetNode(*args, **kwargs)
515
516 def GetClass(*args, **kwargs):
517 """GetClass(self) -> String"""
518 return _xrc.XmlResourceHandler_GetClass(*args, **kwargs)
519
520 def GetParent(*args, **kwargs):
521 """GetParent(self) -> Object"""
522 return _xrc.XmlResourceHandler_GetParent(*args, **kwargs)
523
524 def GetInstance(*args, **kwargs):
525 """GetInstance(self) -> Object"""
526 return _xrc.XmlResourceHandler_GetInstance(*args, **kwargs)
527
528 def GetParentAsWindow(*args, **kwargs):
529 """GetParentAsWindow(self) -> Window"""
530 return _xrc.XmlResourceHandler_GetParentAsWindow(*args, **kwargs)
531
532 def IsOfClass(*args, **kwargs):
533 """IsOfClass(self, XmlNode node, String classname) -> bool"""
534 return _xrc.XmlResourceHandler_IsOfClass(*args, **kwargs)
535
536 def GetNodeContent(*args, **kwargs):
537 """GetNodeContent(self, XmlNode node) -> String"""
538 return _xrc.XmlResourceHandler_GetNodeContent(*args, **kwargs)
539
540 def HasParam(*args, **kwargs):
541 """HasParam(self, String param) -> bool"""
542 return _xrc.XmlResourceHandler_HasParam(*args, **kwargs)
543
544 def GetParamNode(*args, **kwargs):
545 """GetParamNode(self, String param) -> XmlNode"""
546 return _xrc.XmlResourceHandler_GetParamNode(*args, **kwargs)
547
548 def GetParamValue(*args, **kwargs):
549 """GetParamValue(self, String param) -> String"""
550 return _xrc.XmlResourceHandler_GetParamValue(*args, **kwargs)
551
552 def AddStyle(*args, **kwargs):
553 """AddStyle(self, String name, int value)"""
554 return _xrc.XmlResourceHandler_AddStyle(*args, **kwargs)
555
556 def AddWindowStyles(*args, **kwargs):
557 """AddWindowStyles(self)"""
558 return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs)
559
560 def GetStyle(*args, **kwargs):
561 """GetStyle(self, String param=StyleString, int defaults=0) -> int"""
562 return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs)
563
564 def GetText(*args, **kwargs):
565 """GetText(self, String param, bool translate=True) -> String"""
566 return _xrc.XmlResourceHandler_GetText(*args, **kwargs)
567
568 def GetID(*args, **kwargs):
569 """GetID(self) -> int"""
570 return _xrc.XmlResourceHandler_GetID(*args, **kwargs)
571
572 def GetName(*args, **kwargs):
573 """GetName(self) -> String"""
574 return _xrc.XmlResourceHandler_GetName(*args, **kwargs)
575
576 def GetBool(*args, **kwargs):
577 """GetBool(self, String param, bool defaultv=False) -> bool"""
578 return _xrc.XmlResourceHandler_GetBool(*args, **kwargs)
579
580 def GetLong(*args, **kwargs):
581 """GetLong(self, String param, long defaultv=0) -> long"""
582 return _xrc.XmlResourceHandler_GetLong(*args, **kwargs)
583
584 def GetColour(*args, **kwargs):
585 """GetColour(self, String param) -> Colour"""
586 return _xrc.XmlResourceHandler_GetColour(*args, **kwargs)
587
588 def GetSize(*args, **kwargs):
589 """GetSize(self, String param=SizeString) -> Size"""
590 return _xrc.XmlResourceHandler_GetSize(*args, **kwargs)
591
592 def GetPosition(*args, **kwargs):
593 """GetPosition(self, String param=PosString) -> Point"""
594 return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs)
595
596 def GetDimension(*args, **kwargs):
597 """GetDimension(self, String param, int defaultv=0) -> int"""
598 return _xrc.XmlResourceHandler_GetDimension(*args, **kwargs)
599
600 def GetBitmap(*args, **kwargs):
601 """
602 GetBitmap(self, String param=BitmapString, wxArtClient defaultArtClient=wxART_OTHER,
603 Size size=DefaultSize) -> Bitmap
604 """
605 return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs)
606
607 def GetIcon(*args, **kwargs):
608 """
609 GetIcon(self, String param=IconString, wxArtClient defaultArtClient=wxART_OTHER,
610 Size size=DefaultSize) -> Icon
611 """
612 return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs)
613
614 def GetFont(*args, **kwargs):
615 """GetFont(self, String param=FontString) -> Font"""
616 return _xrc.XmlResourceHandler_GetFont(*args, **kwargs)
617
618 def SetupWindow(*args, **kwargs):
619 """SetupWindow(self, Window wnd)"""
620 return _xrc.XmlResourceHandler_SetupWindow(*args, **kwargs)
621
622 def CreateChildren(*args, **kwargs):
623 """CreateChildren(self, Object parent, bool this_hnd_only=False)"""
624 return _xrc.XmlResourceHandler_CreateChildren(*args, **kwargs)
625
626 def CreateChildrenPrivately(*args, **kwargs):
627 """CreateChildrenPrivately(self, Object parent, XmlNode rootnode=None)"""
628 return _xrc.XmlResourceHandler_CreateChildrenPrivately(*args, **kwargs)
629
630 def CreateResFromNode(*args, **kwargs):
631 """CreateResFromNode(self, XmlNode node, Object parent, Object instance=None) -> Object"""
632 return _xrc.XmlResourceHandler_CreateResFromNode(*args, **kwargs)
633
634 def GetCurFileSystem(*args, **kwargs):
635 """GetCurFileSystem(self) -> FileSystem"""
636 return _xrc.XmlResourceHandler_GetCurFileSystem(*args, **kwargs)
637
638 _xrc.XmlResourceHandler_swigregister(XmlResourceHandler)
639
640 #----------------------------------------------------------------------------
641 # The global was removed in favor of static accessor functions. This is for
642 # backwards compatibility:
643
644 TheXmlResource = XmlResource_Get()
645
646
647 #----------------------------------------------------------------------------
648 # Create a factory for handling the subclass property of the object tag.
649
650
651 def _my_import(name):
652 mod = __import__(name)
653 components = name.split('.')
654 for comp in components[1:]:
655 mod = getattr(mod, comp)
656 return mod
657
658
659 class XmlSubclassFactory_Python(XmlSubclassFactory):
660 def __init__(self):
661 XmlSubclassFactory.__init__(self)
662
663 def Create(self, className):
664 assert className.find('.') != -1, "Module name must be specified!"
665 mname = className[:className.rfind('.')]
666 cname = className[className.rfind('.')+1:]
667 module = _my_import(mname)
668 klass = getattr(module, cname)
669 inst = klass()
670 return inst
671
672
673 XmlResource_AddSubclassFactory(XmlSubclassFactory_Python())
674
675 #----------------------------------------------------------------------------
676
677
678