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