2002-01-23 10:17:44 -05:00
|
|
|
%
|
|
|
|
% automatically generated by HelpGen $Revision$ 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.
|
|
|
|
|
2002-01-23 17:10:02 -05:00
|
|
|
See \helpref{XML-based resource system overview}{xrcoverview} for details.
|
|
|
|
|
2002-01-23 10:17:44 -05:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/xrc/xmlres.h>
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-21 09:24:41 -04:00
|
|
|
\membersection{wxXmlResourceHandler::wxXmlResourceHandler}\label{wxxmlresourcehandlerctor}
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\func{}{wxXmlResourceHandler}{\void}
|
|
|
|
|
2002-01-23 17:10:02 -05:00
|
|
|
Default constructor.
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\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}}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns true if it understands this node and can create
|
|
|
|
a resource from it, false otherwise.
|
2002-01-23 10:17:44 -05:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
\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.
|
|
|
|
|
2002-01-23 10:17:44 -05:00
|
|
|
\membersection{wxXmlResourceHandler::CreateChildren}\label{wxxmlresourcehandlercreatechildren}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
\func{void}{CreateChildren}{\param{wxObject* }{parent}, \param{bool }{this\_hnd\_only = false}}
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
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.
|
2002-01-23 17:10:02 -05:00
|
|
|
Should check for validity. {\it parent} is a higher-level object (usually window, dialog or panel)
|
2002-06-07 16:15:28 -04:00
|
|
|
that is often necessary to create the resource.
|
2002-01-23 17:10:02 -05:00
|
|
|
If {\bf instance} is non-NULL it should not create a new instance via 'new' but
|
2002-01-23 10:17:44 -05:00
|
|
|
should rather use this one, and call its Create method.
|
|
|
|
|
|
|
|
\membersection{wxXmlResourceHandler::DoCreateResource}\label{wxxmlresourcehandlerdocreateresource}
|
|
|
|
|
|
|
|
\func{wxObject*}{DoCreateResource}{\void}
|
|
|
|
|
2002-01-23 17:10:02 -05:00
|
|
|
Called from CreateResource after variables
|
2002-01-23 10:17:44 -05:00
|
|
|
were filled.
|
|
|
|
|
2007-04-07 11:45:26 -04:00
|
|
|
\membersection{wxXmlResourceHandler::GetAnimation}\label{wxxmlresourcehandlergetanimation}
|
|
|
|
|
|
|
|
\func{wxAnimation}{GetAnimation}{\param{const wxString\& }{param = wxT("animation")}}
|
|
|
|
|
|
|
|
Creates a \helpref{animation}{wxanimation} from the filename specified in \arg{param}.
|
|
|
|
|
2002-01-23 10:17:44 -05:00
|
|
|
\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}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
\func{bool}{GetBool}{\param{const wxString\& }{param}, \param{bool }{defaultv = false}}
|
2002-01-23 10:17:44 -05:00
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Gets a bool flag (1, t, yes, on, true are true, everything else is false).
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\membersection{wxXmlResourceHandler::GetColour}\label{wxxmlresourcehandlergetcolour}
|
|
|
|
|
2006-07-15 11:32:57 -04:00
|
|
|
\func{wxColour}{GetColour}{\param{const wxString\& }{param}, \param{const wxColour\& }{default = wxNullColour}}
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
Gets colour in HTML syntax (\#RRGGBB).
|
|
|
|
|
|
|
|
\membersection{wxXmlResourceHandler::GetCurFileSystem}\label{wxxmlresourcehandlergetcurfilesystem}
|
|
|
|
|
|
|
|
\func{wxFileSystem\&}{GetCurFileSystem}{\void}
|
|
|
|
|
2002-01-23 17:10:02 -05:00
|
|
|
Returns the current file system.
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\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}
|
|
|
|
|
2002-01-27 18:51:05 -05:00
|
|
|
Returns the XRCID.
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\membersection{wxXmlResourceHandler::GetIcon}\label{wxxmlresourcehandlergeticon}
|
|
|
|
|
|
|
|
\func{wxIcon}{GetIcon}{\param{const wxString\& }{param = wxT("icon")}, \param{wxSize }{size = wxDefaultSize}}
|
|
|
|
|
2002-01-23 17:10:02 -05:00
|
|
|
Returns an icon.
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\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}}
|
|
|
|
|
2002-01-23 17:10:02 -05:00
|
|
|
Gets node content from wxXML\_ENTITY\_NODE.
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\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 |..."
|
2002-01-23 17:10:02 -05:00
|
|
|
Only understands flags added with AddStyle.
|
2002-01-23 10:17:44 -05:00
|
|
|
|
|
|
|
\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)
|
2002-05-05 10:24:07 -04:00
|
|
|
\item replaces {\tt\$} by {\tt\&} and {\tt\$\$} by {\tt\$} (needed for {\tt\_File} to {\tt\&File}
|
2002-01-23 10:17:44 -05:00
|
|
|
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.
|
|
|
|
|