]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/xrc/msw/xrc.py
reSWIGged
[wxWidgets.git] / wxPython / contrib / xrc / msw / xrc.py
CommitLineData
cfe5e918
RD
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
caef1a4d
RD
4"""
5The `XmlResource` class allows program resources defining menus, layout of
a07a67e6 6controls on a panel, etc. to be loaded from an XML file.
caef1a4d
RD
7"""
8
cfe5e918
RD
9import _xrc
10
d55e5bfc
RD
11import _core
12wx = _core
c24da6d6 13__docfilter__ = wx.__DocFilter(globals())
cfe5e918
RD
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
d55e5bfc 22class XmlResource(_core.Object):
cfe5e918
RD
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):
a95a7133 26 """__init__(self, String filemask, int flags=XRC_USE_LOCALE) -> XmlResource"""
cfe5e918
RD
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):
a95a7133 34 """__del__(self)"""
cfe5e918
RD
35 try:
36 if self.thisown: destroy(self)
37 except: pass
38
39 def Load(*args, **kwargs):
a95a7133 40 """Load(self, String filemask) -> bool"""
cfe5e918
RD
41 return _xrc.XmlResource_Load(*args, **kwargs)
42
43 def LoadFromString(*args, **kwargs):
a95a7133 44 """LoadFromString(self, String data) -> bool"""
cfe5e918
RD
45 return _xrc.XmlResource_LoadFromString(*args, **kwargs)
46
47 def InitAllHandlers(*args, **kwargs):
a95a7133 48 """InitAllHandlers(self)"""
cfe5e918
RD
49 return _xrc.XmlResource_InitAllHandlers(*args, **kwargs)
50
51 def AddHandler(*args, **kwargs):
a95a7133 52 """AddHandler(self, XmlResourceHandler handler)"""
cfe5e918
RD
53 return _xrc.XmlResource_AddHandler(*args, **kwargs)
54
55 def InsertHandler(*args, **kwargs):
a95a7133 56 """InsertHandler(self, XmlResourceHandler handler)"""
cfe5e918
RD
57 return _xrc.XmlResource_InsertHandler(*args, **kwargs)
58
59 def ClearHandlers(*args, **kwargs):
a95a7133 60 """ClearHandlers(self)"""
cfe5e918
RD
61 return _xrc.XmlResource_ClearHandlers(*args, **kwargs)
62
63 def AddSubclassFactory(*args, **kwargs):
c24da6d6 64 """AddSubclassFactory(XmlSubclassFactory factory)"""
cfe5e918
RD
65 return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
66
67 AddSubclassFactory = staticmethod(AddSubclassFactory)
68 def LoadMenu(*args, **kwargs):
a95a7133 69 """LoadMenu(self, String name) -> Menu"""
cfe5e918
RD
70 return _xrc.XmlResource_LoadMenu(*args, **kwargs)
71
72 def LoadMenuBar(*args, **kwargs):
a95a7133 73 """LoadMenuBar(self, String name) -> MenuBar"""
cfe5e918
RD
74 return _xrc.XmlResource_LoadMenuBar(*args, **kwargs)
75
76 def LoadMenuBarOnFrame(*args, **kwargs):
a95a7133 77 """LoadMenuBarOnFrame(self, Window parent, String name) -> MenuBar"""
cfe5e918
RD
78 return _xrc.XmlResource_LoadMenuBarOnFrame(*args, **kwargs)
79
80 def LoadToolBar(*args, **kwargs):
a95a7133 81 """LoadToolBar(self, Window parent, String name) -> wxToolBar"""
cfe5e918
RD
82 return _xrc.XmlResource_LoadToolBar(*args, **kwargs)
83
84 def LoadDialog(*args, **kwargs):
a95a7133 85 """LoadDialog(self, Window parent, String name) -> wxDialog"""
cfe5e918
RD
86 return _xrc.XmlResource_LoadDialog(*args, **kwargs)
87
88 def LoadOnDialog(*args, **kwargs):
a95a7133 89 """LoadOnDialog(self, wxDialog dlg, Window parent, String name) -> bool"""
cfe5e918
RD
90 return _xrc.XmlResource_LoadOnDialog(*args, **kwargs)
91
92 def LoadPanel(*args, **kwargs):
a95a7133 93 """LoadPanel(self, Window parent, String name) -> wxPanel"""
cfe5e918
RD
94 return _xrc.XmlResource_LoadPanel(*args, **kwargs)
95
96 def LoadOnPanel(*args, **kwargs):
a95a7133 97 """LoadOnPanel(self, wxPanel panel, Window parent, String name) -> bool"""
cfe5e918
RD
98 return _xrc.XmlResource_LoadOnPanel(*args, **kwargs)
99
100 def LoadFrame(*args, **kwargs):
a95a7133 101 """LoadFrame(self, Window parent, String name) -> wxFrame"""
cfe5e918
RD
102 return _xrc.XmlResource_LoadFrame(*args, **kwargs)
103
104 def LoadOnFrame(*args, **kwargs):
a95a7133 105 """LoadOnFrame(self, wxFrame frame, Window parent, String name) -> bool"""
cfe5e918
RD
106 return _xrc.XmlResource_LoadOnFrame(*args, **kwargs)
107
108 def LoadObject(*args, **kwargs):
a95a7133 109 """LoadObject(self, Window parent, String name, String classname) -> Object"""
cfe5e918
RD
110 return _xrc.XmlResource_LoadObject(*args, **kwargs)
111
112 def LoadOnObject(*args, **kwargs):
a95a7133 113 """LoadOnObject(self, Object instance, Window parent, String name, String classname) -> bool"""
cfe5e918
RD
114 return _xrc.XmlResource_LoadOnObject(*args, **kwargs)
115
116 def LoadBitmap(*args, **kwargs):
a95a7133 117 """LoadBitmap(self, String name) -> Bitmap"""
cfe5e918
RD
118 return _xrc.XmlResource_LoadBitmap(*args, **kwargs)
119
120 def LoadIcon(*args, **kwargs):
a95a7133 121 """LoadIcon(self, String name) -> Icon"""
cfe5e918
RD
122 return _xrc.XmlResource_LoadIcon(*args, **kwargs)
123
124 def AttachUnknownControl(*args, **kwargs):
a95a7133 125 """AttachUnknownControl(self, String name, Window control, Window parent=None) -> bool"""
cfe5e918
RD
126 return _xrc.XmlResource_AttachUnknownControl(*args, **kwargs)
127
128 def GetXRCID(*args, **kwargs):
c24da6d6 129 """GetXRCID(String str_id) -> int"""
cfe5e918
RD
130 return _xrc.XmlResource_GetXRCID(*args, **kwargs)
131
132 GetXRCID = staticmethod(GetXRCID)
133 def GetVersion(*args, **kwargs):
a95a7133 134 """GetVersion(self) -> long"""
cfe5e918
RD
135 return _xrc.XmlResource_GetVersion(*args, **kwargs)
136
137 def CompareVersion(*args, **kwargs):
a95a7133 138 """CompareVersion(self, int major, int minor, int release, int revision) -> int"""
cfe5e918
RD
139 return _xrc.XmlResource_CompareVersion(*args, **kwargs)
140
141 def Get(*args, **kwargs):
c24da6d6 142 """Get() -> XmlResource"""
cfe5e918
RD
143 return _xrc.XmlResource_Get(*args, **kwargs)
144
145 Get = staticmethod(Get)
146 def Set(*args, **kwargs):
c24da6d6 147 """Set(XmlResource res) -> XmlResource"""
cfe5e918
RD
148 return _xrc.XmlResource_Set(*args, **kwargs)
149
150 Set = staticmethod(Set)
151 def GetFlags(*args, **kwargs):
a95a7133 152 """GetFlags(self) -> int"""
cfe5e918
RD
153 return _xrc.XmlResource_GetFlags(*args, **kwargs)
154
155 def SetFlags(*args, **kwargs):
a95a7133 156 """SetFlags(self, int flags)"""
cfe5e918
RD
157 return _xrc.XmlResource_SetFlags(*args, **kwargs)
158
159
160class 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)
166cvar = _xrc.cvar
167UTF8String = cvar.UTF8String
168StyleString = cvar.StyleString
169SizeString = cvar.SizeString
170PosString = cvar.PosString
171BitmapString = cvar.BitmapString
172IconString = cvar.IconString
173FontString = cvar.FontString
174
175def 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
182def XmlResource_AddSubclassFactory(*args, **kwargs):
183 """XmlResource_AddSubclassFactory(XmlSubclassFactory factory)"""
184 return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
185
186def XmlResource_GetXRCID(*args, **kwargs):
187 """XmlResource_GetXRCID(String str_id) -> int"""
188 return _xrc.XmlResource_GetXRCID(*args, **kwargs)
189
190def XmlResource_Get(*args, **kwargs):
191 """XmlResource_Get() -> XmlResource"""
192 return _xrc.XmlResource_Get(*args, **kwargs)
193
194def XmlResource_Set(*args, **kwargs):
195 """XmlResource_Set(XmlResource res) -> XmlResource"""
196 return _xrc.XmlResource_Set(*args, **kwargs)
197
198def XRCID(str_id):
199 return XmlResource_GetXRCID(str_id)
200
201def XRCCTRL(window, str_id, *ignoreargs):
202 return window.FindWindowById(XRCID(str_id))
203
204#---------------------------------------------------------------------------
205
206class 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):
a95a7133 210 """__init__(self) -> XmlSubclassFactory"""
cfe5e918
RD
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):
a95a7133 218 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
cfe5e918
RD
219 return _xrc.XmlSubclassFactory__setCallbackInfo(*args, **kwargs)
220
221
222class 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
231XML_ELEMENT_NODE = _xrc.XML_ELEMENT_NODE
232XML_ATTRIBUTE_NODE = _xrc.XML_ATTRIBUTE_NODE
233XML_TEXT_NODE = _xrc.XML_TEXT_NODE
234XML_CDATA_SECTION_NODE = _xrc.XML_CDATA_SECTION_NODE
235XML_ENTITY_REF_NODE = _xrc.XML_ENTITY_REF_NODE
236XML_ENTITY_NODE = _xrc.XML_ENTITY_NODE
237XML_PI_NODE = _xrc.XML_PI_NODE
238XML_COMMENT_NODE = _xrc.XML_COMMENT_NODE
239XML_DOCUMENT_NODE = _xrc.XML_DOCUMENT_NODE
240XML_DOCUMENT_TYPE_NODE = _xrc.XML_DOCUMENT_TYPE_NODE
241XML_DOCUMENT_FRAG_NODE = _xrc.XML_DOCUMENT_FRAG_NODE
242XML_NOTATION_NODE = _xrc.XML_NOTATION_NODE
243XML_HTML_DOCUMENT_NODE = _xrc.XML_HTML_DOCUMENT_NODE
244class 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 """
a95a7133 249 __init__(self, String name=EmptyString, String value=EmptyString,
cfe5e918
RD
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):
a95a7133 257 """GetName(self) -> String"""
cfe5e918
RD
258 return _xrc.XmlProperty_GetName(*args, **kwargs)
259
260 def GetValue(*args, **kwargs):
a95a7133 261 """GetValue(self) -> String"""
cfe5e918
RD
262 return _xrc.XmlProperty_GetValue(*args, **kwargs)
263
264 def GetNext(*args, **kwargs):
a95a7133 265 """GetNext(self) -> XmlProperty"""
cfe5e918
RD
266 return _xrc.XmlProperty_GetNext(*args, **kwargs)
267
268 def SetName(*args, **kwargs):
a95a7133 269 """SetName(self, String name)"""
cfe5e918
RD
270 return _xrc.XmlProperty_SetName(*args, **kwargs)
271
272 def SetValue(*args, **kwargs):
a95a7133 273 """SetValue(self, String value)"""
cfe5e918
RD
274 return _xrc.XmlProperty_SetValue(*args, **kwargs)
275
276 def SetNext(*args, **kwargs):
a95a7133 277 """SetNext(self, XmlProperty next)"""
cfe5e918
RD
278 return _xrc.XmlProperty_SetNext(*args, **kwargs)
279
280
281class 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
288class 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 """
a95a7133 293 __init__(self, XmlNode parent=None, int type=0, String name=EmptyString,
cfe5e918
RD
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):
a95a7133 302 """__del__(self)"""
cfe5e918
RD
303 try:
304 if self.thisown: destroy(self)
305 except: pass
306
307 def AddChild(*args, **kwargs):
a95a7133 308 """AddChild(self, XmlNode child)"""
cfe5e918
RD
309 return _xrc.XmlNode_AddChild(*args, **kwargs)
310
311 def InsertChild(*args, **kwargs):
a95a7133 312 """InsertChild(self, XmlNode child, XmlNode before_node)"""
cfe5e918
RD
313 return _xrc.XmlNode_InsertChild(*args, **kwargs)
314
315 def RemoveChild(*args, **kwargs):
a95a7133 316 """RemoveChild(self, XmlNode child) -> bool"""
cfe5e918
RD
317 return _xrc.XmlNode_RemoveChild(*args, **kwargs)
318
319 def AddProperty(*args, **kwargs):
a95a7133 320 """AddProperty(self, XmlProperty prop)"""
cfe5e918
RD
321 return _xrc.XmlNode_AddProperty(*args, **kwargs)
322
323 def AddPropertyName(*args, **kwargs):
a95a7133 324 """AddPropertyName(self, String name, String value)"""
cfe5e918
RD
325 return _xrc.XmlNode_AddPropertyName(*args, **kwargs)
326
327 def DeleteProperty(*args, **kwargs):
a95a7133 328 """DeleteProperty(self, String name) -> bool"""
cfe5e918
RD
329 return _xrc.XmlNode_DeleteProperty(*args, **kwargs)
330
331 def GetType(*args, **kwargs):
a95a7133 332 """GetType(self) -> int"""
cfe5e918
RD
333 return _xrc.XmlNode_GetType(*args, **kwargs)
334
335 def GetName(*args, **kwargs):
a95a7133 336 """GetName(self) -> String"""
cfe5e918
RD
337 return _xrc.XmlNode_GetName(*args, **kwargs)
338
339 def GetContent(*args, **kwargs):
a95a7133 340 """GetContent(self) -> String"""
cfe5e918
RD
341 return _xrc.XmlNode_GetContent(*args, **kwargs)
342
343 def GetParent(*args, **kwargs):
a95a7133 344 """GetParent(self) -> XmlNode"""
cfe5e918
RD
345 return _xrc.XmlNode_GetParent(*args, **kwargs)
346
347 def GetNext(*args, **kwargs):
a95a7133 348 """GetNext(self) -> XmlNode"""
cfe5e918
RD
349 return _xrc.XmlNode_GetNext(*args, **kwargs)
350
351 def GetChildren(*args, **kwargs):
a95a7133 352 """GetChildren(self) -> XmlNode"""
cfe5e918
RD
353 return _xrc.XmlNode_GetChildren(*args, **kwargs)
354
355 def GetProperties(*args, **kwargs):
a95a7133 356 """GetProperties(self) -> XmlProperty"""
cfe5e918
RD
357 return _xrc.XmlNode_GetProperties(*args, **kwargs)
358
359 def GetPropVal(*args, **kwargs):
a95a7133 360 """GetPropVal(self, String propName, String defaultVal) -> String"""
cfe5e918
RD
361 return _xrc.XmlNode_GetPropVal(*args, **kwargs)
362
363 def HasProp(*args, **kwargs):
a95a7133 364 """HasProp(self, String propName) -> bool"""
cfe5e918
RD
365 return _xrc.XmlNode_HasProp(*args, **kwargs)
366
367 def SetType(*args, **kwargs):
a95a7133 368 """SetType(self, int type)"""
cfe5e918
RD
369 return _xrc.XmlNode_SetType(*args, **kwargs)
370
371 def SetName(*args, **kwargs):
a95a7133 372 """SetName(self, String name)"""
cfe5e918
RD
373 return _xrc.XmlNode_SetName(*args, **kwargs)
374
375 def SetContent(*args, **kwargs):
a95a7133 376 """SetContent(self, String con)"""
cfe5e918
RD
377 return _xrc.XmlNode_SetContent(*args, **kwargs)
378
379 def SetParent(*args, **kwargs):
a95a7133 380 """SetParent(self, XmlNode parent)"""
cfe5e918
RD
381 return _xrc.XmlNode_SetParent(*args, **kwargs)
382
383 def SetNext(*args, **kwargs):
a95a7133 384 """SetNext(self, XmlNode next)"""
cfe5e918
RD
385 return _xrc.XmlNode_SetNext(*args, **kwargs)
386
387 def SetChildren(*args, **kwargs):
a95a7133 388 """SetChildren(self, XmlNode child)"""
cfe5e918
RD
389 return _xrc.XmlNode_SetChildren(*args, **kwargs)
390
391 def SetProperties(*args, **kwargs):
a95a7133 392 """SetProperties(self, XmlProperty prop)"""
cfe5e918
RD
393 return _xrc.XmlNode_SetProperties(*args, **kwargs)
394
395
396class 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
403def 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
d55e5bfc 409class XmlDocument(_core.Object):
cfe5e918
RD
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):
a95a7133 413 """__init__(self, String filename, String encoding=UTF8String) -> XmlDocument"""
cfe5e918
RD
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):
a95a7133 419 """__del__(self)"""
cfe5e918
RD
420 try:
421 if self.thisown: destroy(self)
422 except: pass
423
424 def Load(*args, **kwargs):
a95a7133 425 """Load(self, String filename, String encoding=UTF8String) -> bool"""
cfe5e918
RD
426 return _xrc.XmlDocument_Load(*args, **kwargs)
427
428 def LoadFromStream(*args, **kwargs):
a95a7133 429 """LoadFromStream(self, InputStream stream, String encoding=UTF8String) -> bool"""
cfe5e918
RD
430 return _xrc.XmlDocument_LoadFromStream(*args, **kwargs)
431
432 def Save(*args, **kwargs):
a95a7133 433 """Save(self, String filename) -> bool"""
cfe5e918
RD
434 return _xrc.XmlDocument_Save(*args, **kwargs)
435
436 def SaveToStream(*args, **kwargs):
a95a7133 437 """SaveToStream(self, OutputStream stream) -> bool"""
cfe5e918
RD
438 return _xrc.XmlDocument_SaveToStream(*args, **kwargs)
439
440 def IsOk(*args, **kwargs):
a95a7133 441 """IsOk(self) -> bool"""
cfe5e918
RD
442 return _xrc.XmlDocument_IsOk(*args, **kwargs)
443
444 def GetRoot(*args, **kwargs):
a95a7133 445 """GetRoot(self) -> XmlNode"""
cfe5e918
RD
446 return _xrc.XmlDocument_GetRoot(*args, **kwargs)
447
448 def GetVersion(*args, **kwargs):
a95a7133 449 """GetVersion(self) -> String"""
cfe5e918
RD
450 return _xrc.XmlDocument_GetVersion(*args, **kwargs)
451
452 def GetFileEncoding(*args, **kwargs):
a95a7133 453 """GetFileEncoding(self) -> String"""
cfe5e918
RD
454 return _xrc.XmlDocument_GetFileEncoding(*args, **kwargs)
455
456 def SetRoot(*args, **kwargs):
a95a7133 457 """SetRoot(self, XmlNode node)"""
cfe5e918
RD
458 return _xrc.XmlDocument_SetRoot(*args, **kwargs)
459
460 def SetVersion(*args, **kwargs):
a95a7133 461 """SetVersion(self, String version)"""
cfe5e918
RD
462 return _xrc.XmlDocument_SetVersion(*args, **kwargs)
463
464 def SetFileEncoding(*args, **kwargs):
a95a7133 465 """SetFileEncoding(self, String encoding)"""
cfe5e918
RD
466 return _xrc.XmlDocument_SetFileEncoding(*args, **kwargs)
467
468
469class 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
476def 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
482def EmptyXmlDocument(*args, **kwargs):
483 """EmptyXmlDocument() -> XmlDocument"""
484 val = _xrc.new_EmptyXmlDocument(*args, **kwargs)
485 val.thisown = 1
486 return val
487
488#---------------------------------------------------------------------------
489
d55e5bfc 490class XmlResourceHandler(_core.Object):
cfe5e918
RD
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):
a95a7133 494 """__init__(self) -> XmlResourceHandler"""
cfe5e918
RD
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):
a95a7133 502 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
cfe5e918
RD
503 return _xrc.XmlResourceHandler__setCallbackInfo(*args, **kwargs)
504
505 def CreateResource(*args, **kwargs):
a95a7133 506 """CreateResource(self, XmlNode node, Object parent, Object instance) -> Object"""
cfe5e918
RD
507 return _xrc.XmlResourceHandler_CreateResource(*args, **kwargs)
508
509 def SetParentResource(*args, **kwargs):
a95a7133 510 """SetParentResource(self, XmlResource res)"""
cfe5e918
RD
511 return _xrc.XmlResourceHandler_SetParentResource(*args, **kwargs)
512
513 def GetResource(*args, **kwargs):
a95a7133 514 """GetResource(self) -> XmlResource"""
cfe5e918
RD
515 return _xrc.XmlResourceHandler_GetResource(*args, **kwargs)
516
517 def GetNode(*args, **kwargs):
a95a7133 518 """GetNode(self) -> XmlNode"""
cfe5e918
RD
519 return _xrc.XmlResourceHandler_GetNode(*args, **kwargs)
520
521 def GetClass(*args, **kwargs):
a95a7133 522 """GetClass(self) -> String"""
cfe5e918
RD
523 return _xrc.XmlResourceHandler_GetClass(*args, **kwargs)
524
525 def GetParent(*args, **kwargs):
a95a7133 526 """GetParent(self) -> Object"""
cfe5e918
RD
527 return _xrc.XmlResourceHandler_GetParent(*args, **kwargs)
528
529 def GetInstance(*args, **kwargs):
a95a7133 530 """GetInstance(self) -> Object"""
cfe5e918
RD
531 return _xrc.XmlResourceHandler_GetInstance(*args, **kwargs)
532
533 def GetParentAsWindow(*args, **kwargs):
a95a7133 534 """GetParentAsWindow(self) -> Window"""
cfe5e918
RD
535 return _xrc.XmlResourceHandler_GetParentAsWindow(*args, **kwargs)
536
537 def GetInstanceAsWindow(*args, **kwargs):
a95a7133 538 """GetInstanceAsWindow(self) -> Window"""
cfe5e918
RD
539 return _xrc.XmlResourceHandler_GetInstanceAsWindow(*args, **kwargs)
540
541 def IsOfClass(*args, **kwargs):
a95a7133 542 """IsOfClass(self, XmlNode node, String classname) -> bool"""
cfe5e918
RD
543 return _xrc.XmlResourceHandler_IsOfClass(*args, **kwargs)
544
545 def GetNodeContent(*args, **kwargs):
a95a7133 546 """GetNodeContent(self, XmlNode node) -> String"""
cfe5e918
RD
547 return _xrc.XmlResourceHandler_GetNodeContent(*args, **kwargs)
548
549 def HasParam(*args, **kwargs):
a95a7133 550 """HasParam(self, String param) -> bool"""
cfe5e918
RD
551 return _xrc.XmlResourceHandler_HasParam(*args, **kwargs)
552
553 def GetParamNode(*args, **kwargs):
a95a7133 554 """GetParamNode(self, String param) -> XmlNode"""
cfe5e918
RD
555 return _xrc.XmlResourceHandler_GetParamNode(*args, **kwargs)
556
557 def GetParamValue(*args, **kwargs):
a95a7133 558 """GetParamValue(self, String param) -> String"""
cfe5e918
RD
559 return _xrc.XmlResourceHandler_GetParamValue(*args, **kwargs)
560
561 def AddStyle(*args, **kwargs):
a95a7133 562 """AddStyle(self, String name, int value)"""
cfe5e918
RD
563 return _xrc.XmlResourceHandler_AddStyle(*args, **kwargs)
564
565 def AddWindowStyles(*args, **kwargs):
a95a7133 566 """AddWindowStyles(self)"""
cfe5e918
RD
567 return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs)
568
569 def GetStyle(*args, **kwargs):
a95a7133 570 """GetStyle(self, String param=StyleString, int defaults=0) -> int"""
cfe5e918
RD
571 return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs)
572
573 def GetText(*args, **kwargs):
a95a7133 574 """GetText(self, String param, bool translate=True) -> String"""
cfe5e918
RD
575 return _xrc.XmlResourceHandler_GetText(*args, **kwargs)
576
577 def GetID(*args, **kwargs):
a95a7133 578 """GetID(self) -> int"""
cfe5e918
RD
579 return _xrc.XmlResourceHandler_GetID(*args, **kwargs)
580
581 def GetName(*args, **kwargs):
a95a7133 582 """GetName(self) -> String"""
cfe5e918
RD
583 return _xrc.XmlResourceHandler_GetName(*args, **kwargs)
584
585 def GetBool(*args, **kwargs):
a95a7133 586 """GetBool(self, String param, bool defaultv=False) -> bool"""
cfe5e918
RD
587 return _xrc.XmlResourceHandler_GetBool(*args, **kwargs)
588
589 def GetLong(*args, **kwargs):
a95a7133 590 """GetLong(self, String param, long defaultv=0) -> long"""
cfe5e918
RD
591 return _xrc.XmlResourceHandler_GetLong(*args, **kwargs)
592
593 def GetColour(*args, **kwargs):
a95a7133 594 """GetColour(self, String param) -> Colour"""
cfe5e918
RD
595 return _xrc.XmlResourceHandler_GetColour(*args, **kwargs)
596
597 def GetSize(*args, **kwargs):
a95a7133 598 """GetSize(self, String param=SizeString) -> Size"""
cfe5e918
RD
599 return _xrc.XmlResourceHandler_GetSize(*args, **kwargs)
600
601 def GetPosition(*args, **kwargs):
a95a7133 602 """GetPosition(self, String param=PosString) -> Point"""
cfe5e918
RD
603 return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs)
604
605 def GetDimension(*args, **kwargs):
a95a7133 606 """GetDimension(self, String param, int defaultv=0) -> int"""
cfe5e918
RD
607 return _xrc.XmlResourceHandler_GetDimension(*args, **kwargs)
608
609 def GetBitmap(*args, **kwargs):
610 """
a95a7133 611 GetBitmap(self, String param=BitmapString, wxArtClient defaultArtClient=wxART_OTHER,
cfe5e918
RD
612 Size size=DefaultSize) -> Bitmap
613 """
614 return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs)
615
616 def GetIcon(*args, **kwargs):
617 """
a95a7133 618 GetIcon(self, String param=IconString, wxArtClient defaultArtClient=wxART_OTHER,
cfe5e918
RD
619 Size size=DefaultSize) -> Icon
620 """
621 return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs)
622
623 def GetFont(*args, **kwargs):
a95a7133 624 """GetFont(self, String param=FontString) -> Font"""
cfe5e918
RD
625 return _xrc.XmlResourceHandler_GetFont(*args, **kwargs)
626
627 def SetupWindow(*args, **kwargs):
a95a7133 628 """SetupWindow(self, Window wnd)"""
cfe5e918
RD
629 return _xrc.XmlResourceHandler_SetupWindow(*args, **kwargs)
630
631 def CreateChildren(*args, **kwargs):
a95a7133 632 """CreateChildren(self, Object parent, bool this_hnd_only=False)"""
cfe5e918
RD
633 return _xrc.XmlResourceHandler_CreateChildren(*args, **kwargs)
634
635 def CreateChildrenPrivately(*args, **kwargs):
a95a7133 636 """CreateChildrenPrivately(self, Object parent, XmlNode rootnode=None)"""
cfe5e918
RD
637 return _xrc.XmlResourceHandler_CreateChildrenPrivately(*args, **kwargs)
638
639 def CreateResFromNode(*args, **kwargs):
a95a7133 640 """CreateResFromNode(self, XmlNode node, Object parent, Object instance=None) -> Object"""
cfe5e918
RD
641 return _xrc.XmlResourceHandler_CreateResFromNode(*args, **kwargs)
642
643 def GetCurFileSystem(*args, **kwargs):
a95a7133 644 """GetCurFileSystem(self) -> FileSystem"""
cfe5e918
RD
645 return _xrc.XmlResourceHandler_GetCurFileSystem(*args, **kwargs)
646
647
648class 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
659TheXmlResource = XmlResource_Get()
660
661
662#----------------------------------------------------------------------------
663# Create a factory for handling the subclass property of the object tag.
664
665
666def _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
674class 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
688XmlResource_AddSubclassFactory(XmlSubclassFactory_Python())
689
690#----------------------------------------------------------------------------
691
692