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