]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/xmlres.tex
Typo.
[wxWidgets.git] / docs / latex / wx / xmlres.tex
... / ...
CommitLineData
1%
2% automatically generated by HelpGen $Revision$ from
3% xmlres.h at 22/Jan/02 23:08:28
4%
5
6\section{\class{wxXmlResource}}\label{wxxmlresource}
7
8This is the main class for interacting with the XML-based resource system.
9
10The class holds XML resources from one or more .xml files, binary files or zip archive files.
11
12See \helpref{XML-based resource system overview}{xrcoverview} for details.
13
14\wxheading{Derived from}
15
16\helpref{wxObject}{wxobject}
17
18\wxheading{Include files}
19
20<wx/xrc/xmlres.h>
21
22\wxheading{Data structures}
23
24\begin{verbatim}
25enum wxXmlResourceFlags
26{
27 wxXRC_USE_LOCALE = 1,
28 wxXRC_NO_SUBCLASSING = 2
29};
30\end{verbatim}
31
32\latexignore{\rtfignore{\wxheading{Members}}}
33
34\membersection{wxXmlResource::wxXmlResource}\label{wxxmlresourcector}
35
36\func{}{wxXmlResource}{\param{const wxString\& }{filemask}, \param{int }{flags = wxXRC\_USE\_LOCALE}}
37
38Constructor.
39
40\docparam{filemask}{The XRC file, archive file, or wildcard specification that will be used to
41load all resource files inside a zip archive.}
42
43\docparam{flags}{wxXRC\_USE\_LOCALE: translatable strings will be translated via \_().
44wxXRC\_NO\_SUBCLASSING: subclass property of object nodes will be ignored
45(useful for previews in XRC editors).}
46
47\func{}{wxXmlResource}{\param{int }{flags = wxXRC\_USE\_LOCALE}}
48
49Constructor.
50
51\docparam{flags}{wxXRC\_USE\_LOCALE: translatable strings will be translated via \_().
52wxXRC\_NO\_SUBCLASSING: subclass property of object nodes will be ignored
53(useful for previews in XRC editors).}
54
55\membersection{wxXmlResource::\destruct{wxXmlResource}}\label{wxxmlresourcedtor}
56
57\func{}{\destruct{wxXmlResource}}{\void}
58
59Destructor.
60
61\membersection{wxXmlResource::AddHandler}\label{wxxmlresourceaddhandler}
62
63\func{void}{AddHandler}{\param{wxXmlResourceHandler* }{handler}}
64
65Initializes only a specific handler (or custom handler). Convention says
66that the handler name is equal to the control's name plus 'XmlHandler', for example
67wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. The XML resource compiler
68(wxxrc) can create include file that contains initialization code for
69all controls used within the resource.
70
71\membersection{wxXmlResource::AttachUnknownControl}\label{wxxmlresourceattachunknowncontrol}
72
73\func{bool}{AttachUnknownControl}{\param{const wxString\& }{name}, \param{wxWindow* }{control}, \param{wxWindow* }{parent = NULL}}
74
75Attaches an unknown control to the given panel/window/dialog.
76Unknown controls are used in conjunction with <object class="unknown">.
77
78\membersection{wxXmlResource::ClearHandlers}\label{wxxmlresourceclearhandlers}
79
80\func{void}{ClearHandlers}{\void}
81
82Removes all handlers.
83
84\membersection{wxXmlResource::CompareVersion}\label{wxxmlresourcecompareversion}
85
86\constfunc{int}{CompareVersion}{\param{int }{major}, \param{int }{minor}, \param{int }{release}, \param{int }{revision}}
87
88Compares the XRC version to the argument. Returns -1 if the XRC version
89is less than the argument, +1 if greater, and 0 if they equal.
90
91\membersection{wxXmlResource::Get}\label{wxxmlresourceget}
92
93\func{wxXmlResource*}{Get}{\void}
94
95Gets the global resources object or creates one if none exists.
96
97\membersection{wxXmlResource::GetFlags}\label{wxxmlresourcegetflags}
98
99\func{int}{GetFlags}{\void}
100
101Returns flags, which may be a bitlist of wxXRC\_USE\_LOCALE and wxXRC\_NO\_SUBCLASSING.
102
103\membersection{wxXmlResource::GetVersion}\label{wxxmlresourcegetversion}
104
105\constfunc{long}{GetVersion}{\void}
106
107Returns version information (a.b.c.d = d+ 256*c + 256\textasciicircum2*b + 256\textasciitilde3*a).
108
109\membersection{wxXmlResource::GetXRCID}\label{wxxmlresourcegetxmlid}
110
111\func{int}{GetXRCID}{\param{const wxChar* }{str\_id}}
112
113Returns a numeric ID that is equivalent to the string ID used in an XML
114resource. To be used in event tables.
115The macro {\tt XRCID(name)} is provided for convenience.
116
117\membersection{wxXmlResource::InitAllHandlers}\label{wxxmlresourceinitallhandlers}
118
119\func{void}{InitAllHandlers}{\void}
120
121Initializes handlers for all supported controls/windows. This will
122make the executable quite big because it forces linking against
123most of the wxWidgets library.
124
125\membersection{wxXmlResource::Load}\label{wxxmlresourceload}
126
127\func{bool}{Load}{\param{const wxString\& }{filemask}}
128
129Loads resources from XML files that match given filemask.
130This method understands VFS (see filesys.h).
131
132\membersection{wxXmlResource::LoadBitmap}\label{wxxmlresourceloadbitmap}
133
134\func{wxBitmap}{LoadBitmap}{\param{const wxString\& }{name}}
135
136Loads a bitmap resource from a file.
137
138\membersection{wxXmlResource::LoadDialog}\label{wxxmlresourceloaddialog}
139
140\func{wxDialog*}{LoadDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
141
142Loads a dialog. {\it dlg} points to a parent window (if any).
143
144\func{bool}{LoadDialog}{\param{wxDialog* }{dlg}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
145
146Loads a dialog. {\it dlg} points to parent window (if any).
147
148This form is used to finish creation of an already existing instance (the main reason
149for this is that you may want to use derived class with a new event table).
150
151Example:
152
153\begin{verbatim}
154 MyDialog dlg;
155 wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
156 dlg->ShowModal();
157\end{verbatim}
158
159\membersection{wxXmlResource::LoadFrame}\label{wxxmlresourceloadframe}
160
161\func{bool}{LoadFrame}{\param{wxFrame* }{frame}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
162
163Loads a frame.
164
165\membersection{wxXmlResource::LoadIcon}\label{wxxmlresourceloadicon}
166
167\func{wxIcon}{LoadIcon}{\param{const wxString\& }{name}}
168
169Loads an icon resource from a file.
170
171\membersection{wxXmlResource::LoadMenu}\label{wxxmlresourceloadmenu}
172
173\func{wxMenu*}{LoadMenu}{\param{const wxString\& }{name}}
174
175Loads menu from resource. Returns NULL on failure.
176
177\membersection{wxXmlResource::LoadMenuBar}\label{wxxmlresourceloadmenubar}
178
179\func{wxMenuBar*}{LoadMenuBar}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
180
181Loads a menubar from resource. Returns NULL on failure.
182
183\func{wxMenuBar*}{LoadMenuBar}{\param{const wxString\& }{name}}
184
185Loads a menubar from resource. Returns NULL on failure.
186
187\membersection{wxXmlResource::LoadPanel}\label{wxxmlresourceloadpanel}
188
189\func{wxPanel*}{LoadPanel}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
190
191Loads a panel. {\it panel} points to parent window (if any).
192
193\func{bool}{LoadPanel}{\param{wxPanel* }{panel}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
194
195Loads a panel. {\it panel} points to parent window (if any). This form
196is used to finish creation of an already existing instance.
197
198\membersection{wxXmlResource::LoadToolBar}\label{wxxmlresourceloadtoolbar}
199
200\func{wxToolBar*}{LoadToolBar}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
201
202Loads a toolbar.
203
204\membersection{wxXmlResource::Set}\label{wxxmlresourceset}
205
206\func{wxXmlResource*}{Set}{\param{wxXmlResource* }{res}}
207
208Sets the global resources object and returns a pointer to the previous one (may be NULL).
209
210\membersection{wxXmlResource::SetFlags}\label{wxxmlresourcesetflags}
211
212\func{void}{SetFlags}{\param{int }{flags}}
213
214Sets flags (bitlist of wxXRC\_USE\_LOCALE and wxXRC\_NO\_SUBCLASSING).
215