]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: xrc.i | |
3 | // Purpose: Wrappers for the XML based Resource system | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 4-June-2001 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 2001 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | %define DOCSTRING | |
14 | "The `XmlResource` class allows program resources defining menus, layout of | |
15 | controls on a panel, etc. to be loaded from an XML file." | |
16 | %enddef | |
17 | ||
18 | %module(package="wx", docstring=DOCSTRING) xrc | |
19 | ||
20 | ||
21 | %{ | |
22 | #include "wx/wxPython/wxPython.h" | |
23 | #include "wx/wxPython/pyclasses.h" | |
24 | #include "wx/wxPython/pyistream.h" | |
25 | ||
26 | #include <wx/xml/xml.h> | |
27 | #include <wx/xrc/xmlres.h> | |
28 | %} | |
29 | ||
30 | //--------------------------------------------------------------------------- | |
31 | ||
32 | %import core.i | |
33 | %pythoncode { wx = _core } | |
34 | %pythoncode { __docfilter__ = wx.__DocFilter(globals()) } | |
35 | ||
36 | ||
37 | MAKE_CONST_WXSTRING_NOSWIG(EmptyString); | |
38 | MAKE_CONST_WXSTRING2(UTF8String, wxT("UTF-8")); | |
39 | MAKE_CONST_WXSTRING2(StyleString, wxT("style")); | |
40 | MAKE_CONST_WXSTRING2(SizeString, wxT("size")); | |
41 | MAKE_CONST_WXSTRING2(PosString, wxT("pos")); | |
42 | MAKE_CONST_WXSTRING2(BitmapString, wxT("bitmap")); | |
43 | MAKE_CONST_WXSTRING2(IconString, wxT("icon")); | |
44 | MAKE_CONST_WXSTRING2(FontString, wxT("font")); | |
45 | MAKE_CONST_WXSTRING2(AnimationString, wxT("animation")); | |
46 | ||
47 | ||
48 | // Include all the files that make up this module | |
49 | %include _xmlres.i | |
50 | %include _xmlsub.i | |
51 | %include _xml.i | |
52 | %include _xmlhandler.i | |
53 | ||
54 | ||
55 | ||
56 | //--------------------------------------------------------------------------- | |
57 | ||
58 | %init %{ | |
59 | ||
60 | wxXmlInitResourceModule(); | |
61 | wxXmlResource::Get()->InitAllHandlers(); | |
62 | ||
63 | %} | |
64 | ||
65 | ||
66 | %pythoncode "_xrc_ex.py"; | |
67 | ||
68 | ||
69 | //--------------------------------------------------------------------------- |