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