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