]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/xmlresh.tex
Applied patch [ 589484 ] wxGenericListCtrl, fix for direct use.
[wxWidgets.git] / docs / latex / wx / xmlresh.tex
CommitLineData
d958c9bd
JS
1%
2% automatically generated by HelpGen $Revision$ from
3% xmlres.h at 22/Jan/02 23:08:28
4%
5
6\section{\class{wxXmlResourceHandler}}\label{wxxmlresourcehandler}
7
8wxXmlResourceHandler is an abstract base class for resource handlers
9capable of creating a control from an XML node.
10
bd330a69
JS
11See \helpref{XML-based resource system overview}{xrcoverview} for details.
12
13{\bf NOTE:} XRC is not yet a part of the core wxWindows library, so
14please see the overview for how to compile and link it. Otherwise if you
15try to use it, you will get link errors.
16
d958c9bd
JS
17\wxheading{Derived from}
18
19\helpref{wxObject}{wxobject}
20
21\wxheading{Include files}
22
23<wx/xrc/xmlres.h>
24
d958c9bd
JS
25\latexignore{\rtfignore{\wxheading{Members}}}
26
d958c9bd
JS
27\membersection{wxXmlResourceHandler::wxXmlResourceHandler}\label{wxxmlresourcehandlerwxxmlresourcehandler}
28
29\func{}{wxXmlResourceHandler}{\void}
30
bd330a69 31Default constructor.
d958c9bd
JS
32
33\membersection{wxXmlResourceHandler::\destruct{wxXmlResourceHandler}}\label{wxxmlresourcehandlerdtor}
34
35\func{}{\destruct{wxXmlResourceHandler}}{\void}
36
37Destructor.
38
d958c9bd
JS
39\membersection{wxXmlResourceHandler::AddStyle}\label{wxxmlresourcehandleraddstyle}
40
41\func{void}{AddStyle}{\param{const wxString\& }{name}, \param{int }{value}}
42
43Add a style flag (e.g. wxMB\_DOCKABLE) to the list of flags
44understood by this handler.
45
d958c9bd
JS
46\membersection{wxXmlResourceHandler::AddWindowStyles}\label{wxxmlresourcehandleraddwindowstyles}
47
48\func{void}{AddWindowStyles}{\void}
49
50Add styles common to all wxWindow-derived classes.
51
d958c9bd
JS
52\membersection{wxXmlResourceHandler::CanHandle}\label{wxxmlresourcehandlercanhandle}
53
54\func{bool}{CanHandle}{\param{wxXmlNode* }{node}}
55
56Returns TRUE if it understands this node and can create
57a resource from it, FALSE otherwise.
58
d958c9bd
JS
59\membersection{wxXmlResourceHandler::CreateChildren}\label{wxxmlresourcehandlercreatechildren}
60
61\func{void}{CreateChildren}{\param{wxObject* }{parent}, \param{bool }{this\_hnd\_only = FALSE}}
62
63Creates children.
64
d958c9bd
JS
65\membersection{wxXmlResourceHandler::CreateChildrenPrivately}\label{wxxmlresourcehandlercreatechildrenprivately}
66
67\func{void}{CreateChildrenPrivately}{\param{wxObject* }{parent}, \param{wxXmlNode* }{rootnode = NULL}}
68
69Helper function.
70
d958c9bd
JS
71\membersection{wxXmlResourceHandler::CreateResFromNode}\label{wxxmlresourcehandlercreateresfromnode}
72
73\func{wxObject*}{CreateResFromNode}{\param{wxXmlNode* }{node}, \param{wxObject* }{parent}, \param{wxObject* }{instance = NULL}}
74
75Creates a resource from a node.
76
d958c9bd
JS
77\membersection{wxXmlResourceHandler::CreateResource}\label{wxxmlresourcehandlercreateresource}
78
79\func{wxObject*}{CreateResource}{\param{wxXmlNode* }{node}, \param{wxObject* }{parent}, \param{wxObject* }{instance}}
80
81Creates an object (menu, dialog, control, ...) from an XML node.
bd330a69 82Should check for validity. {\it parent} is a higher-level object (usually window, dialog or panel)
2edb0bde 83that is often necessary to create the resource.
bd330a69 84If {\bf instance} is non-NULL it should not create a new instance via 'new' but
d958c9bd
JS
85should rather use this one, and call its Create method.
86
d958c9bd
JS
87\membersection{wxXmlResourceHandler::DoCreateResource}\label{wxxmlresourcehandlerdocreateresource}
88
89\func{wxObject*}{DoCreateResource}{\void}
90
bd330a69 91Called from CreateResource after variables
d958c9bd
JS
92were filled.
93
d958c9bd
JS
94\membersection{wxXmlResourceHandler::GetBitmap}\label{wxxmlresourcehandlergetbitmap}
95
96\func{wxBitmap}{GetBitmap}{\param{const wxString\& }{param = wxT("bitmap")}, \param{wxSize }{size = wxDefaultSize}}
97
98Gets a bitmap.
99
d958c9bd
JS
100\membersection{wxXmlResourceHandler::GetBool}\label{wxxmlresourcehandlergetbool}
101
102\func{bool}{GetBool}{\param{const wxString\& }{param}, \param{bool }{defaultv = FALSE}}
103
104Gets a bool flag (1, t, yes, on, true are TRUE, everything else is FALSE).
105
d958c9bd
JS
106\membersection{wxXmlResourceHandler::GetColour}\label{wxxmlresourcehandlergetcolour}
107
108\func{wxColour}{GetColour}{\param{const wxString\& }{param}}
109
110Gets colour in HTML syntax (\#RRGGBB).
111
d958c9bd
JS
112\membersection{wxXmlResourceHandler::GetCurFileSystem}\label{wxxmlresourcehandlergetcurfilesystem}
113
114\func{wxFileSystem\&}{GetCurFileSystem}{\void}
115
bd330a69 116Returns the current file system.
d958c9bd
JS
117
118\membersection{wxXmlResourceHandler::GetDimension}\label{wxxmlresourcehandlergetdimension}
119
120\func{wxCoord}{GetDimension}{\param{const wxString\& }{param}, \param{wxCoord }{defaultv = 0}}
121
122Gets a dimension (may be in dialog units).
123
d958c9bd
JS
124\membersection{wxXmlResourceHandler::GetFont}\label{wxxmlresourcehandlergetfont}
125
126\func{wxFont}{GetFont}{\param{const wxString\& }{param = wxT("font")}}
127
128Gets a font.
129
d958c9bd
JS
130\membersection{wxXmlResourceHandler::GetID}\label{wxxmlresourcehandlergetid}
131
132\func{int}{GetID}{\void}
133
094eb71a 134Returns the XRCID.
d958c9bd 135
d958c9bd
JS
136\membersection{wxXmlResourceHandler::GetIcon}\label{wxxmlresourcehandlergeticon}
137
138\func{wxIcon}{GetIcon}{\param{const wxString\& }{param = wxT("icon")}, \param{wxSize }{size = wxDefaultSize}}
139
bd330a69 140Returns an icon.
d958c9bd
JS
141
142\membersection{wxXmlResourceHandler::GetLong}\label{wxxmlresourcehandlergetlong}
143
144\func{long}{GetLong}{\param{const wxString\& }{param}, \param{long }{defaultv = 0}}
145
146Gets the integer value from the parameter.
147
d958c9bd
JS
148\membersection{wxXmlResourceHandler::GetName}\label{wxxmlresourcehandlergetname}
149
150\func{wxString}{GetName}{\void}
151
152Returns the resource name.
153
d958c9bd
JS
154\membersection{wxXmlResourceHandler::GetNodeContent}\label{wxxmlresourcehandlergetnodecontent}
155
156\func{wxString}{GetNodeContent}{\param{wxXmlNode* }{node}}
157
bd330a69 158Gets node content from wxXML\_ENTITY\_NODE.
d958c9bd
JS
159
160\membersection{wxXmlResourceHandler::GetParamNode}\label{wxxmlresourcehandlergetparamnode}
161
162\func{wxXmlNode*}{GetParamNode}{\param{const wxString\& }{param}}
163
164Finds the node or returns NULL.
165
d958c9bd
JS
166\membersection{wxXmlResourceHandler::GetParamValue}\label{wxxmlresourcehandlergetparamvalue}
167
168\func{wxString}{GetParamValue}{\param{const wxString\& }{param}}
169
170Finds the parameter value or returns the empty string.
171
d958c9bd
JS
172\membersection{wxXmlResourceHandler::GetPosition}\label{wxxmlresourcehandlergetposition}
173
174\func{wxPoint}{GetPosition}{\param{const wxString\& }{param = wxT("pos")}}
175
176Gets the position (may be in dialog units).
177
d958c9bd
JS
178\membersection{wxXmlResourceHandler::GetSize}\label{wxxmlresourcehandlergetsize}
179
180\func{wxSize}{GetSize}{\param{const wxString\& }{param = wxT("size")}}
181
182Gets the size (may be in dialog units).
183
d958c9bd
JS
184\membersection{wxXmlResourceHandler::GetStyle}\label{wxxmlresourcehandlergetstyle}
185
186\func{int}{GetStyle}{\param{const wxString\& }{param = wxT("style")}, \param{int }{defaults = 0}}
187
188Gets style flags from text in form "flag | flag2| flag3 |..."
bd330a69 189Only understands flags added with AddStyle.
d958c9bd
JS
190
191\membersection{wxXmlResourceHandler::GetText}\label{wxxmlresourcehandlergettext}
192
193\func{wxString}{GetText}{\param{const wxString\& }{param}}
194
195Gets text from param and does some conversions:
196
197\begin{itemize}\itemsep=0pt
198\item replaces $\backslash$n, $\backslash$r, $\backslash$t by respective characters (according to C syntax)
7af3ca16 199\item replaces {\tt\$} by {\tt\&} and {\tt\$\$} by {\tt\$} (needed for {\tt\_File} to {\tt\&File}
d958c9bd
JS
200translation because of XML syntax)
201\item calls wxGetTranslations (unless disabled in wxXmlResource)
202\end{itemize}
203
204\membersection{wxXmlResourceHandler::HasParam}\label{wxxmlresourcehandlerhasparam}
205
206\func{bool}{HasParam}{\param{const wxString\& }{param}}
207
208Check to see if a parameter exists.
209
d958c9bd
JS
210\membersection{wxXmlResourceHandler::IsOfClass}\label{wxxmlresourcehandlerisofclass}
211
212\func{bool}{IsOfClass}{\param{wxXmlNode* }{node}, \param{const wxString\& }{classname}}
213
214Convenience function. Returns true if the node has a property class equal to classname,
215e.g. <object class="wxDialog">.
216
d958c9bd
JS
217\membersection{wxXmlResourceHandler::SetParentResource}\label{wxxmlresourcehandlersetparentresource}
218
219\func{void}{SetParentResource}{\param{wxXmlResource* }{res}}
220
221Sets the parent resource.
222
d958c9bd
JS
223\membersection{wxXmlResourceHandler::SetupWindow}\label{wxxmlresourcehandlersetupwindow}
224
225\func{void}{SetupWindow}{\param{wxWindow* }{wnd}}
226
227Sets common window options.
228