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