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