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