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