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