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