]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/xmlres.tex
more LaTeX error fixes
[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{Library}
23
24\helpref{wxXrc}{librarieslist}
25
26\wxheading{Constants}
27
28\begin{verbatim}
29enum wxXmlResourceFlags
30{
31 wxXRC_USE_LOCALE = 1,
32 wxXRC_NO_SUBCLASSING = 2,
33 wxXRC_NO_RELOADING = 4
34};
35\end{verbatim}
36
37\latexignore{\rtfignore{\wxheading{Members}}}
38
39
40\membersection{wxXmlResource::wxXmlResource}\label{wxxmlresourcector}
41
42\func{}{wxXmlResource}{\param{const wxString\& }{filemask},
43 \param{int }{flags = wxXRC\_USE\_LOCALE},
44 \param{const wxString& }{domain = wxEmptyString}}
45
46Constructor.
47
48\docparam{filemask}{The XRC file, archive file, or wildcard specification that will be used to
49load all resource files inside a zip archive.}
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\docparam{domain}{The name of the gettext catalog to search for
56 translatable strings. By default all loaded catalogs will be
57 searched. This provides a way to allow the strings to only come
58 from a specific catalog.}
59
60\func{}{wxXmlResource}{\param{int }{flags = wxXRC\_USE\_LOCALE},
61 \param{const wxString& }{domain = wxEmptyString}}
62
63Constructor.
64
65\docparam{flags}{wxXRC\_USE\_LOCALE: translatable strings will be translated via \_().
66wxXRC\_NO\_SUBCLASSING: subclass property of object nodes will be ignored
67(useful for previews in XRC editors). wxXRC\_NO\_RELOADING will prevent the
68XRC files from being reloaded from disk in case they have been modified there
69since being last loaded (may slightly speed up loading them).}
70
71\docparam{domain}{The name of the gettext catalog to search for
72 translatable strings. By default all loaded catalogs will be
73 searched. This provides a way to allow the strings to only come
74 from a specific catalog.}
75
76
77\membersection{wxXmlResource::\destruct{wxXmlResource}}\label{wxxmlresourcedtor}
78
79\func{}{\destruct{wxXmlResource}}{\void}
80
81Destructor.
82
83
84\membersection{wxXmlResource::AddHandler}\label{wxxmlresourceaddhandler}
85
86\func{void}{AddHandler}{\param{wxXmlResourceHandler* }{handler}}
87
88Initializes only a specific handler (or custom handler). Convention says
89that the handler name is equal to the control's name plus 'XmlHandler', for example
90wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. The XML resource compiler
91(wxxrc) can create include file that contains initialization code for
92all controls used within the resource. Note that this handler should be
93allocated on the heap, since it will be delete by
94\helpref{ClearHandlers}{wxxmlresourceclearhandlers} later.
95
96
97\membersection{wxXmlResource::AttachUnknownControl}\label{wxxmlresourceattachunknowncontrol}
98
99\func{bool}{AttachUnknownControl}{\param{const wxString\& }{name}, \param{wxWindow* }{control}, \param{wxWindow* }{parent = NULL}}
100
101Attaches an unknown control to the given panel/window/dialog.
102Unknown controls are used in conjunction with <object class="unknown">.
103
104
105\membersection{wxXmlResource::ClearHandlers}\label{wxxmlresourceclearhandlers}
106
107\func{void}{ClearHandlers}{\void}
108
109Removes all handlers and deletes them (this means that any handlers added using
110\helpref{AddHandler}{wxxmlresourceaddhandler} must be allocated on the heap).
111
112
113\membersection{wxXmlResource::CompareVersion}\label{wxxmlresourcecompareversion}
114
115\constfunc{int}{CompareVersion}{\param{int }{major}, \param{int }{minor}, \param{int }{release}, \param{int }{revision}}
116
117Compares the XRC version to the argument. Returns -1 if the XRC version
118is less than the argument, +1 if greater, and 0 if they equal.
119
120
121\membersection{wxXmlResource::Get}\label{wxxmlresourceget}
122
123\func{wxXmlResource*}{Get}{\void}
124
125Gets the global resources object or creates one if none exists.
126
127
128\membersection{wxXmlResource::GetFlags}\label{wxxmlresourcegetflags}
129
130\func{int}{GetFlags}{\void}
131
132Returns flags, which may be a bitlist of wxXRC\_USE\_LOCALE and wxXRC\_NO\_SUBCLASSING.
133
134
135\membersection{wxXmlResource::GetVersion}\label{wxxmlresourcegetversion}
136
137\constfunc{long}{GetVersion}{\void}
138
139Returns version information (a.b.c.d = d+ 256*c + 256\textasciicircum2*b + 256\textasciitilde3*a).
140
141
142\membersection{wxXmlResource::GetXRCID}\label{wxxmlresourcegetxmlid}
143
144\func{int}{GetXRCID}{\param{const wxString\& }{str\_id}, \param{int }{value\_if\_not\_found = -2}}
145
146Returns a numeric ID that is equivalent to the string ID used in an XML
147resource. If an unknown \arg{str\_id} is requested (i.e. other than wxID\_XXX
148or integer), a new record is created which associates the given string with
149a number. If \arg{value\_if\_not\_found} is \texttt{wxID\_NONE}, the number is obtained via
150\helpref{wxNewId()}{wxnewid}. Otherwise \arg{value\_if\_not\_found} is used.
151Macro {\tt XRCID(name)} is provided for convenient use in event tables.
152
153\membersection{wxXmlResource::InitAllHandlers}\label{wxxmlresourceinitallhandlers}
154
155\func{void}{InitAllHandlers}{\void}
156
157Initializes handlers for all supported controls/windows. This will
158make the executable quite big because it forces linking against
159most of the wxWidgets library.
160
161
162\membersection{wxXmlResource::Load}\label{wxxmlresourceload}
163
164\func{bool}{Load}{\param{const wxString\& }{filemask}}
165
166Loads resources from XML files that match given filemask.
167This method understands VFS (see filesys.h).
168
169
170\membersection{wxXmlResource::LoadBitmap}\label{wxxmlresourceloadbitmap}
171
172\func{wxBitmap}{LoadBitmap}{\param{const wxString\& }{name}}
173
174Loads a bitmap resource from a file.
175
176
177\membersection{wxXmlResource::LoadDialog}\label{wxxmlresourceloaddialog}
178
179\func{wxDialog*}{LoadDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
180
181Loads a dialog. {\it dlg} points to a parent window (if any).
182
183\func{bool}{LoadDialog}{\param{wxDialog* }{dlg}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
184
185Loads a dialog. {\it dlg} points to parent window (if any).
186
187This form is used to finish creation of an already existing instance (the main reason
188for this is that you may want to use derived class with a new event table).
189
190Example:
191
192\begin{verbatim}
193 MyDialog dlg;
194 wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
195 dlg.ShowModal();
196\end{verbatim}
197
198
199\membersection{wxXmlResource::LoadFrame}\label{wxxmlresourceloadframe}
200
201\func{bool}{LoadFrame}{\param{wxFrame* }{frame}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
202
203Loads a frame.
204
205
206\membersection{wxXmlResource::LoadIcon}\label{wxxmlresourceloadicon}
207
208\func{wxIcon}{LoadIcon}{\param{const wxString\& }{name}}
209
210Loads an icon resource from a file.
211
212
213\membersection{wxXmlResource::LoadMenu}\label{wxxmlresourceloadmenu}
214
215\func{wxMenu*}{LoadMenu}{\param{const wxString\& }{name}}
216
217Loads menu from resource. Returns NULL on failure.
218
219
220\membersection{wxXmlResource::LoadMenuBar}\label{wxxmlresourceloadmenubar}
221
222\func{wxMenuBar*}{LoadMenuBar}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
223
224Loads a menubar from resource. Returns NULL on failure.
225
226\func{wxMenuBar*}{LoadMenuBar}{\param{const wxString\& }{name}}
227
228Loads a menubar from resource. Returns NULL on failure.
229
230
231\membersection{wxXmlResource::LoadPanel}\label{wxxmlresourceloadpanel}
232
233\func{wxPanel*}{LoadPanel}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
234
235Loads a panel. {\it panel} points to parent window (if any).
236
237\func{bool}{LoadPanel}{\param{wxPanel* }{panel}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
238
239Loads a panel. {\it panel} points to parent window (if any). This form
240is used to finish creation of an already existing instance.
241
242
243\membersection{wxXmlResource::LoadToolBar}\label{wxxmlresourceloadtoolbar}
244
245\func{wxToolBar*}{LoadToolBar}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
246
247Loads a toolbar.
248
249
250\membersection{wxXmlResource::Set}\label{wxxmlresourceset}
251
252\func{wxXmlResource*}{Set}{\param{wxXmlResource* }{res}}
253
254Sets the global resources object and returns a pointer to the previous one (may be NULL).
255
256
257\membersection{wxXmlResource::SetFlags}\label{wxxmlresourcesetflags}
258
259\func{void}{SetFlags}{\param{int }{flags}}
260
261Sets flags (bitlist of wxXRC\_USE\_LOCALE and wxXRC\_NO\_SUBCLASSING).
262
263
264\membersection{wxXmlResource::Unload}\label{wxxmlresourceunload}
265
266\func{bool}{Unload}{\param{const wxString\& }{filename}}
267
268This function unloads a resource previously loaded by
269\helpref{Load()}{wxxmlresourceload}.
270
271Returns \true if the resource was successfully unloaded and \false if it hasn't
272been found in the list of loaded resources.
273
274
275
276\membersection{wxXmlResource::GetDomain}\label{wxxmlresourcegetdomain}
277
278\func{wxChar*}{GetDomain}{}
279
280Returns the domain (message catalog) that will be used to load
281translatable strings in the XRC.
282
283
284\membersection{wxXmlResource::SetDomain}\label{wxxmlresourcesetdomain}
285
286\func{wxChar*}{SetDomain}{\param{const wxChar* }{domain}}
287
288Sets the domain (message catalog) that will be used to load
289translatable strings in the XRC.
290