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