]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/contrib/xrc/xrc.py
Noted where the documentation was
[wxWidgets.git] / wxPython / contrib / xrc / xrc.py
... / ...
CommitLineData
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
4import _xrc
5
6import core
7wx = core
8#---------------------------------------------------------------------------
9
10WX_XMLRES_CURRENT_VERSION_MAJOR = _xrc.WX_XMLRES_CURRENT_VERSION_MAJOR
11WX_XMLRES_CURRENT_VERSION_MINOR = _xrc.WX_XMLRES_CURRENT_VERSION_MINOR
12WX_XMLRES_CURRENT_VERSION_RELEASE = _xrc.WX_XMLRES_CURRENT_VERSION_RELEASE
13WX_XMLRES_CURRENT_VERSION_REVISION = _xrc.WX_XMLRES_CURRENT_VERSION_REVISION
14XRC_USE_LOCALE = _xrc.XRC_USE_LOCALE
15XRC_NO_SUBCLASSING = _xrc.XRC_NO_SUBCLASSING
16class 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) -> wxIcon"""
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
154class 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
161def EmptyXmlResource(*args, **kwargs):
162 """EmptyXmlResource(int flags=XRC_USE_LOCALE) -> XmlResource"""
163 val = _xrc.new_EmptyXmlResource(*args, **kwargs)
164 val.thisown = 1
165 val.InitAllHandlers()
166 return val
167
168def XmlResource_AddSubclassFactory(*args, **kwargs):
169 """XmlResource_AddSubclassFactory(XmlSubclassFactory factory)"""
170 return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
171
172def XmlResource_GetXRCID(*args, **kwargs):
173 """XmlResource_GetXRCID(String str_id) -> int"""
174 return _xrc.XmlResource_GetXRCID(*args, **kwargs)
175
176def XmlResource_Get(*args, **kwargs):
177 """XmlResource_Get() -> XmlResource"""
178 return _xrc.XmlResource_Get(*args, **kwargs)
179
180def XmlResource_Set(*args, **kwargs):
181 """XmlResource_Set(XmlResource res) -> XmlResource"""
182 return _xrc.XmlResource_Set(*args, **kwargs)
183
184def XRCID(str_id):
185 return XmlResource_GetXRCID(str_id)
186
187def XRCCTRL(window, str_id, *ignoreargs):
188 return window.FindWindowById(XRCID(str_id))
189
190#---------------------------------------------------------------------------
191
192class XmlSubclassFactory(object):
193 def __repr__(self):
194 return "<%s.%s; proxy of C++ wxPyXmlSubclassFactory instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
195 def __init__(self, *args, **kwargs):
196 """__init__() -> XmlSubclassFactory"""
197 newobj = _xrc.new_XmlSubclassFactory(*args, **kwargs)
198 self.this = newobj.this
199 self.thisown = 1
200 del newobj.thisown
201 self._setCallbackInfo(self, XmlSubclassFactory)
202
203 def _setCallbackInfo(*args, **kwargs):
204 """_setCallbackInfo(PyObject self, PyObject _class)"""
205 return _xrc.XmlSubclassFactory__setCallbackInfo(*args, **kwargs)
206
207
208class XmlSubclassFactoryPtr(XmlSubclassFactory):
209 def __init__(self, this):
210 self.this = this
211 if not hasattr(self,"thisown"): self.thisown = 0
212 self.__class__ = XmlSubclassFactory
213_xrc.XmlSubclassFactory_swigregister(XmlSubclassFactoryPtr)
214
215#---------------------------------------------------------------------------
216
217XML_ELEMENT_NODE = _xrc.XML_ELEMENT_NODE
218XML_ATTRIBUTE_NODE = _xrc.XML_ATTRIBUTE_NODE
219XML_TEXT_NODE = _xrc.XML_TEXT_NODE
220XML_CDATA_SECTION_NODE = _xrc.XML_CDATA_SECTION_NODE
221XML_ENTITY_REF_NODE = _xrc.XML_ENTITY_REF_NODE
222XML_ENTITY_NODE = _xrc.XML_ENTITY_NODE
223XML_PI_NODE = _xrc.XML_PI_NODE
224XML_COMMENT_NODE = _xrc.XML_COMMENT_NODE
225XML_DOCUMENT_NODE = _xrc.XML_DOCUMENT_NODE
226XML_DOCUMENT_TYPE_NODE = _xrc.XML_DOCUMENT_TYPE_NODE
227XML_DOCUMENT_FRAG_NODE = _xrc.XML_DOCUMENT_FRAG_NODE
228XML_NOTATION_NODE = _xrc.XML_NOTATION_NODE
229XML_HTML_DOCUMENT_NODE = _xrc.XML_HTML_DOCUMENT_NODE
230class XmlProperty(object):
231 def __repr__(self):
232 return "<%s.%s; proxy of C++ wxXmlProperty instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
233 def __init__(self, *args, **kwargs):
234 """
235 __init__(String name=EmptyString, String value=EmptyString,
236 XmlProperty next=None) -> XmlProperty
237 """
238 newobj = _xrc.new_XmlProperty(*args, **kwargs)
239 self.this = newobj.this
240 self.thisown = 1
241 del newobj.thisown
242 def GetName(*args, **kwargs):
243 """GetName() -> String"""
244 return _xrc.XmlProperty_GetName(*args, **kwargs)
245
246 def GetValue(*args, **kwargs):
247 """GetValue() -> String"""
248 return _xrc.XmlProperty_GetValue(*args, **kwargs)
249
250 def GetNext(*args, **kwargs):
251 """GetNext() -> XmlProperty"""
252 return _xrc.XmlProperty_GetNext(*args, **kwargs)
253
254 def SetName(*args, **kwargs):
255 """SetName(String name)"""
256 return _xrc.XmlProperty_SetName(*args, **kwargs)
257
258 def SetValue(*args, **kwargs):
259 """SetValue(String value)"""
260 return _xrc.XmlProperty_SetValue(*args, **kwargs)
261
262 def SetNext(*args, **kwargs):
263 """SetNext(XmlProperty next)"""
264 return _xrc.XmlProperty_SetNext(*args, **kwargs)
265
266
267class XmlPropertyPtr(XmlProperty):
268 def __init__(self, this):
269 self.this = this
270 if not hasattr(self,"thisown"): self.thisown = 0
271 self.__class__ = XmlProperty
272_xrc.XmlProperty_swigregister(XmlPropertyPtr)
273
274class XmlNode(object):
275 def __repr__(self):
276 return "<%s.%s; proxy of C++ wxXmlNode instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
277 def __init__(self, *args, **kwargs):
278 """
279 __init__(XmlNode parent=None, int type=0, String name=EmptyString,
280 String content=EmptyString, XmlProperty props=None,
281 XmlNode next=None) -> XmlNode
282 """
283 newobj = _xrc.new_XmlNode(*args, **kwargs)
284 self.this = newobj.this
285 self.thisown = 1
286 del newobj.thisown
287 def __del__(self, destroy=_xrc.delete_XmlNode):
288 """__del__()"""
289 try:
290 if self.thisown: destroy(self)
291 except: pass
292
293 def AddChild(*args, **kwargs):
294 """AddChild(XmlNode child)"""
295 return _xrc.XmlNode_AddChild(*args, **kwargs)
296
297 def InsertChild(*args, **kwargs):
298 """InsertChild(XmlNode child, XmlNode before_node)"""
299 return _xrc.XmlNode_InsertChild(*args, **kwargs)
300
301 def RemoveChild(*args, **kwargs):
302 """RemoveChild(XmlNode child) -> bool"""
303 return _xrc.XmlNode_RemoveChild(*args, **kwargs)
304
305 def AddProperty(*args, **kwargs):
306 """AddProperty(XmlProperty prop)"""
307 return _xrc.XmlNode_AddProperty(*args, **kwargs)
308
309 def AddPropertyName(*args, **kwargs):
310 """AddPropertyName(String name, String value)"""
311 return _xrc.XmlNode_AddPropertyName(*args, **kwargs)
312
313 def DeleteProperty(*args, **kwargs):
314 """DeleteProperty(String name) -> bool"""
315 return _xrc.XmlNode_DeleteProperty(*args, **kwargs)
316
317 def GetType(*args, **kwargs):
318 """GetType() -> int"""
319 return _xrc.XmlNode_GetType(*args, **kwargs)
320
321 def GetName(*args, **kwargs):
322 """GetName() -> String"""
323 return _xrc.XmlNode_GetName(*args, **kwargs)
324
325 def GetContent(*args, **kwargs):
326 """GetContent() -> String"""
327 return _xrc.XmlNode_GetContent(*args, **kwargs)
328
329 def GetParent(*args, **kwargs):
330 """GetParent() -> XmlNode"""
331 return _xrc.XmlNode_GetParent(*args, **kwargs)
332
333 def GetNext(*args, **kwargs):
334 """GetNext() -> XmlNode"""
335 return _xrc.XmlNode_GetNext(*args, **kwargs)
336
337 def GetChildren(*args, **kwargs):
338 """GetChildren() -> XmlNode"""
339 return _xrc.XmlNode_GetChildren(*args, **kwargs)
340
341 def GetProperties(*args, **kwargs):
342 """GetProperties() -> XmlProperty"""
343 return _xrc.XmlNode_GetProperties(*args, **kwargs)
344
345 def GetPropVal(*args, **kwargs):
346 """GetPropVal(String propName, String defaultVal) -> String"""
347 return _xrc.XmlNode_GetPropVal(*args, **kwargs)
348
349 def HasProp(*args, **kwargs):
350 """HasProp(String propName) -> bool"""
351 return _xrc.XmlNode_HasProp(*args, **kwargs)
352
353 def SetType(*args, **kwargs):
354 """SetType(int type)"""
355 return _xrc.XmlNode_SetType(*args, **kwargs)
356
357 def SetName(*args, **kwargs):
358 """SetName(String name)"""
359 return _xrc.XmlNode_SetName(*args, **kwargs)
360
361 def SetContent(*args, **kwargs):
362 """SetContent(String con)"""
363 return _xrc.XmlNode_SetContent(*args, **kwargs)
364
365 def SetParent(*args, **kwargs):
366 """SetParent(XmlNode parent)"""
367 return _xrc.XmlNode_SetParent(*args, **kwargs)
368
369 def SetNext(*args, **kwargs):
370 """SetNext(XmlNode next)"""
371 return _xrc.XmlNode_SetNext(*args, **kwargs)
372
373 def SetChildren(*args, **kwargs):
374 """SetChildren(XmlNode child)"""
375 return _xrc.XmlNode_SetChildren(*args, **kwargs)
376
377 def SetProperties(*args, **kwargs):
378 """SetProperties(XmlProperty prop)"""
379 return _xrc.XmlNode_SetProperties(*args, **kwargs)
380
381
382class XmlNodePtr(XmlNode):
383 def __init__(self, this):
384 self.this = this
385 if not hasattr(self,"thisown"): self.thisown = 0
386 self.__class__ = XmlNode
387_xrc.XmlNode_swigregister(XmlNodePtr)
388
389def XmlNodeEasy(*args, **kwargs):
390 """XmlNodeEasy(int type, String name, String content=EmptyString) -> XmlNode"""
391 val = _xrc.new_XmlNodeEasy(*args, **kwargs)
392 val.thisown = 1
393 return val
394
395class XmlDocument(core.Object):
396 def __repr__(self):
397 return "<%s.%s; proxy of C++ wxXmlDocument instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
398 def __init__(self, *args, **kwargs):
399 """__init__(String filename, String encoding=wxPyUTF8String) -> XmlDocument"""
400 newobj = _xrc.new_XmlDocument(*args, **kwargs)
401 self.this = newobj.this
402 self.thisown = 1
403 del newobj.thisown
404 def __del__(self, destroy=_xrc.delete_XmlDocument):
405 """__del__()"""
406 try:
407 if self.thisown: destroy(self)
408 except: pass
409
410 def Load(*args, **kwargs):
411 """Load(String filename, String encoding=wxPyUTF8String) -> bool"""
412 return _xrc.XmlDocument_Load(*args, **kwargs)
413
414 def LoadFromStream(*args, **kwargs):
415 """LoadFromStream(InputStream stream, String encoding=wxPyUTF8String) -> bool"""
416 return _xrc.XmlDocument_LoadFromStream(*args, **kwargs)
417
418 def Save(*args, **kwargs):
419 """Save(String filename) -> bool"""
420 return _xrc.XmlDocument_Save(*args, **kwargs)
421
422 def SaveToStream(*args, **kwargs):
423 """SaveToStream(OutputStream stream) -> bool"""
424 return _xrc.XmlDocument_SaveToStream(*args, **kwargs)
425
426 def IsOk(*args, **kwargs):
427 """IsOk() -> bool"""
428 return _xrc.XmlDocument_IsOk(*args, **kwargs)
429
430 def GetRoot(*args, **kwargs):
431 """GetRoot() -> XmlNode"""
432 return _xrc.XmlDocument_GetRoot(*args, **kwargs)
433
434 def GetVersion(*args, **kwargs):
435 """GetVersion() -> String"""
436 return _xrc.XmlDocument_GetVersion(*args, **kwargs)
437
438 def GetFileEncoding(*args, **kwargs):
439 """GetFileEncoding() -> String"""
440 return _xrc.XmlDocument_GetFileEncoding(*args, **kwargs)
441
442 def SetRoot(*args, **kwargs):
443 """SetRoot(XmlNode node)"""
444 return _xrc.XmlDocument_SetRoot(*args, **kwargs)
445
446 def SetVersion(*args, **kwargs):
447 """SetVersion(String version)"""
448 return _xrc.XmlDocument_SetVersion(*args, **kwargs)
449
450 def SetFileEncoding(*args, **kwargs):
451 """SetFileEncoding(String encoding)"""
452 return _xrc.XmlDocument_SetFileEncoding(*args, **kwargs)
453
454
455class XmlDocumentPtr(XmlDocument):
456 def __init__(self, this):
457 self.this = this
458 if not hasattr(self,"thisown"): self.thisown = 0
459 self.__class__ = XmlDocument
460_xrc.XmlDocument_swigregister(XmlDocumentPtr)
461
462def XmlDocumentFromStream(*args, **kwargs):
463 """XmlDocumentFromStream(InputStream stream, String encoding=wxPyUTF8String) -> XmlDocument"""
464 val = _xrc.new_XmlDocumentFromStream(*args, **kwargs)
465 val.thisown = 1
466 return val
467
468def EmptyXmlDocument(*args, **kwargs):
469 """EmptyXmlDocument() -> XmlDocument"""
470 val = _xrc.new_EmptyXmlDocument(*args, **kwargs)
471 val.thisown = 1
472 return val
473
474#---------------------------------------------------------------------------
475
476class XmlResourceHandler(core.Object):
477 def __repr__(self):
478 return "<%s.%s; proxy of C++ wxPyXmlResourceHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
479 def __init__(self, *args, **kwargs):
480 """__init__() -> XmlResourceHandler"""
481 newobj = _xrc.new_XmlResourceHandler(*args, **kwargs)
482 self.this = newobj.this
483 self.thisown = 1
484 del newobj.thisown
485 self._setCallbackInfo(self, XmlResourceHandler)
486
487 def _setCallbackInfo(*args, **kwargs):
488 """_setCallbackInfo(PyObject self, PyObject _class)"""
489 return _xrc.XmlResourceHandler__setCallbackInfo(*args, **kwargs)
490
491 def CreateResource(*args, **kwargs):
492 """CreateResource(XmlNode node, Object parent, Object instance) -> Object"""
493 return _xrc.XmlResourceHandler_CreateResource(*args, **kwargs)
494
495 def SetParentResource(*args, **kwargs):
496 """SetParentResource(XmlResource res)"""
497 return _xrc.XmlResourceHandler_SetParentResource(*args, **kwargs)
498
499 def GetResource(*args, **kwargs):
500 """GetResource() -> XmlResource"""
501 return _xrc.XmlResourceHandler_GetResource(*args, **kwargs)
502
503 def GetNode(*args, **kwargs):
504 """GetNode() -> XmlNode"""
505 return _xrc.XmlResourceHandler_GetNode(*args, **kwargs)
506
507 def GetClass(*args, **kwargs):
508 """GetClass() -> String"""
509 return _xrc.XmlResourceHandler_GetClass(*args, **kwargs)
510
511 def GetParent(*args, **kwargs):
512 """GetParent() -> Object"""
513 return _xrc.XmlResourceHandler_GetParent(*args, **kwargs)
514
515 def GetInstance(*args, **kwargs):
516 """GetInstance() -> Object"""
517 return _xrc.XmlResourceHandler_GetInstance(*args, **kwargs)
518
519 def GetParentAsWindow(*args, **kwargs):
520 """GetParentAsWindow() -> Window"""
521 return _xrc.XmlResourceHandler_GetParentAsWindow(*args, **kwargs)
522
523 def GetInstanceAsWindow(*args, **kwargs):
524 """GetInstanceAsWindow() -> Window"""
525 return _xrc.XmlResourceHandler_GetInstanceAsWindow(*args, **kwargs)
526
527 def IsOfClass(*args, **kwargs):
528 """IsOfClass(XmlNode node, String classname) -> bool"""
529 return _xrc.XmlResourceHandler_IsOfClass(*args, **kwargs)
530
531 def GetNodeContent(*args, **kwargs):
532 """GetNodeContent(XmlNode node) -> String"""
533 return _xrc.XmlResourceHandler_GetNodeContent(*args, **kwargs)
534
535 def HasParam(*args, **kwargs):
536 """HasParam(String param) -> bool"""
537 return _xrc.XmlResourceHandler_HasParam(*args, **kwargs)
538
539 def GetParamNode(*args, **kwargs):
540 """GetParamNode(String param) -> XmlNode"""
541 return _xrc.XmlResourceHandler_GetParamNode(*args, **kwargs)
542
543 def GetParamValue(*args, **kwargs):
544 """GetParamValue(String param) -> String"""
545 return _xrc.XmlResourceHandler_GetParamValue(*args, **kwargs)
546
547 def AddStyle(*args, **kwargs):
548 """AddStyle(String name, int value)"""
549 return _xrc.XmlResourceHandler_AddStyle(*args, **kwargs)
550
551 def AddWindowStyles(*args, **kwargs):
552 """AddWindowStyles()"""
553 return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs)
554
555 def GetStyle(*args, **kwargs):
556 """GetStyle(String param=wxPyStyleString, int defaults=0) -> int"""
557 return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs)
558
559 def GetText(*args, **kwargs):
560 """GetText(String param, bool translate=True) -> String"""
561 return _xrc.XmlResourceHandler_GetText(*args, **kwargs)
562
563 def GetID(*args, **kwargs):
564 """GetID() -> int"""
565 return _xrc.XmlResourceHandler_GetID(*args, **kwargs)
566
567 def GetName(*args, **kwargs):
568 """GetName() -> String"""
569 return _xrc.XmlResourceHandler_GetName(*args, **kwargs)
570
571 def GetBool(*args, **kwargs):
572 """GetBool(String param, bool defaultv=False) -> bool"""
573 return _xrc.XmlResourceHandler_GetBool(*args, **kwargs)
574
575 def GetLong(*args, **kwargs):
576 """GetLong(String param, long defaultv=0) -> long"""
577 return _xrc.XmlResourceHandler_GetLong(*args, **kwargs)
578
579 def GetColour(*args, **kwargs):
580 """GetColour(String param) -> Colour"""
581 return _xrc.XmlResourceHandler_GetColour(*args, **kwargs)
582
583 def GetSize(*args, **kwargs):
584 """GetSize(String param=wxPySizeString) -> Size"""
585 return _xrc.XmlResourceHandler_GetSize(*args, **kwargs)
586
587 def GetPosition(*args, **kwargs):
588 """GetPosition(String param=wxPyPosString) -> Point"""
589 return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs)
590
591 def GetDimension(*args, **kwargs):
592 """GetDimension(String param, int defaultv=0) -> int"""
593 return _xrc.XmlResourceHandler_GetDimension(*args, **kwargs)
594
595 def GetBitmap(*args, **kwargs):
596 """
597 GetBitmap(String param=wxPyBitmapString, wxArtClient defaultArtClient=wxART_OTHER,
598 Size size=DefaultSize) -> Bitmap
599 """
600 return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs)
601
602 def GetIcon(*args, **kwargs):
603 """
604 GetIcon(String param=wxPyIconString, wxArtClient defaultArtClient=wxART_OTHER,
605 Size size=DefaultSize) -> wxIcon
606 """
607 return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs)
608
609 def GetFont(*args, **kwargs):
610 """GetFont(String param=wxPyFontString) -> Font"""
611 return _xrc.XmlResourceHandler_GetFont(*args, **kwargs)
612
613 def SetupWindow(*args, **kwargs):
614 """SetupWindow(Window wnd)"""
615 return _xrc.XmlResourceHandler_SetupWindow(*args, **kwargs)
616
617 def CreateChildren(*args, **kwargs):
618 """CreateChildren(Object parent, bool this_hnd_only=False)"""
619 return _xrc.XmlResourceHandler_CreateChildren(*args, **kwargs)
620
621 def CreateChildrenPrivately(*args, **kwargs):
622 """CreateChildrenPrivately(Object parent, XmlNode rootnode=None)"""
623 return _xrc.XmlResourceHandler_CreateChildrenPrivately(*args, **kwargs)
624
625 def CreateResFromNode(*args, **kwargs):
626 """CreateResFromNode(XmlNode node, Object parent, Object instance=None) -> Object"""
627 return _xrc.XmlResourceHandler_CreateResFromNode(*args, **kwargs)
628
629 def GetCurFileSystem(*args, **kwargs):
630 """GetCurFileSystem() -> FileSystem"""
631 return _xrc.XmlResourceHandler_GetCurFileSystem(*args, **kwargs)
632
633
634class XmlResourceHandlerPtr(XmlResourceHandler):
635 def __init__(self, this):
636 self.this = this
637 if not hasattr(self,"thisown"): self.thisown = 0
638 self.__class__ = XmlResourceHandler
639_xrc.XmlResourceHandler_swigregister(XmlResourceHandlerPtr)
640
641#----------------------------------------------------------------------------
642# The global was removed in favor of static accessor functions. This is for
643# backwards compatibility:
644
645TheXmlResource = XmlResource_Get()
646
647
648#----------------------------------------------------------------------------
649# Create a factory for handling the subclass property of the object tag.
650
651
652def _my_import(name):
653 mod = __import__(name)
654 components = name.split('.')
655 for comp in components[1:]:
656 mod = getattr(mod, comp)
657 return mod
658
659
660class XmlSubclassFactory_Python(XmlSubclassFactory):
661 def __init__(self):
662 XmlSubclassFactory.__init__(self)
663
664 def Create(self, className):
665 assert className.find('.') != -1, "Module name must be specified!"
666 mname = className[:className.rfind('.')]
667 cname = className[className.rfind('.')+1:]
668 module = _my_import(mname)
669 klass = getattr(module, cname)
670 inst = klass()
671 return inst
672
673
674XmlResource_AddSubclassFactory(XmlSubclassFactory_Python())
675
676#----------------------------------------------------------------------------
677
678