2 % automatically generated by HelpGen $Revision$ from
3 % xmlres.h at 22/Jan/02 23:08:28
6 \section{\class{wxXmlResourceHandler
}}\label{wxxmlresourcehandler
}
8 wxXmlResourceHandler is an abstract base class for resource handlers
9 capable of creating a control from an XML node.
11 See
\helpref{XML-based resource system overview
}{xrcoverview
} for details.
13 {\bf NOTE:
} XRC is not yet a part of the core wxWindows library, so
14 please see the overview for how to compile and link it. Otherwise if you
15 try to use it, you will get link errors.
17 \wxheading{Derived from
}
19 \helpref{wxObject
}{wxobject
}
21 \wxheading{Include files
}
25 \latexignore{\rtfignore{\wxheading{Members
}}}
27 \membersection{wxXmlResourceHandler::wxXmlResourceHandler
}\label{wxxmlresourcehandlerwxxmlresourcehandler
}
29 \func{}{wxXmlResourceHandler
}{\void}
33 \membersection{wxXmlResourceHandler::
\destruct{wxXmlResourceHandler
}}\label{wxxmlresourcehandlerdtor
}
35 \func{}{\destruct{wxXmlResourceHandler
}}{\void}
39 \membersection{wxXmlResourceHandler::AddStyle
}\label{wxxmlresourcehandleraddstyle
}
41 \func{void
}{AddStyle
}{\param{const wxString\&
}{name
},
\param{int
}{value
}}
43 Add a style flag (e.g. wxMB
\_DOCKABLE) to the list of flags
44 understood by this handler.
46 \membersection{wxXmlResourceHandler::AddWindowStyles
}\label{wxxmlresourcehandleraddwindowstyles
}
48 \func{void
}{AddWindowStyles
}{\void}
50 Add styles common to all wxWindow-derived classes.
52 \membersection{wxXmlResourceHandler::CanHandle
}\label{wxxmlresourcehandlercanhandle
}
54 \func{bool
}{CanHandle
}{\param{wxXmlNode*
}{node
}}
56 Returns TRUE if it understands this node and can create
57 a resource from it, FALSE otherwise.
59 \membersection{wxXmlResourceHandler::CreateChildren
}\label{wxxmlresourcehandlercreatechildren
}
61 \func{void
}{CreateChildren
}{\param{wxObject*
}{parent
},
\param{bool
}{this
\_hnd\_only = FALSE
}}
65 \membersection{wxXmlResourceHandler::CreateChildrenPrivately
}\label{wxxmlresourcehandlercreatechildrenprivately
}
67 \func{void
}{CreateChildrenPrivately
}{\param{wxObject*
}{parent
},
\param{wxXmlNode*
}{rootnode = NULL
}}
71 \membersection{wxXmlResourceHandler::CreateResFromNode
}\label{wxxmlresourcehandlercreateresfromnode
}
73 \func{wxObject*
}{CreateResFromNode
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance = NULL
}}
75 Creates a resource from a node.
77 \membersection{wxXmlResourceHandler::CreateResource
}\label{wxxmlresourcehandlercreateresource
}
79 \func{wxObject*
}{CreateResource
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance
}}
81 Creates an object (menu, dialog, control, ...) from an XML node.
82 Should check for validity.
{\it parent
} is a higher-level object (usually window, dialog or panel)
83 that is often neccessary to create the resource.
84 If
{\bf instance
} is non-NULL it should not create a new instance via 'new' but
85 should rather use this one, and call its Create method.
87 \membersection{wxXmlResourceHandler::DoCreateResource
}\label{wxxmlresourcehandlerdocreateresource
}
89 \func{wxObject*
}{DoCreateResource
}{\void}
91 Called from CreateResource after variables
94 \membersection{wxXmlResourceHandler::GetBitmap
}\label{wxxmlresourcehandlergetbitmap
}
96 \func{wxBitmap
}{GetBitmap
}{\param{const wxString\&
}{param = wxT("bitmap")
},
\param{wxSize
}{size = wxDefaultSize
}}
100 \membersection{wxXmlResourceHandler::GetBool
}\label{wxxmlresourcehandlergetbool
}
102 \func{bool
}{GetBool
}{\param{const wxString\&
}{param
},
\param{bool
}{defaultv = FALSE
}}
104 Gets a bool flag (
1, t, yes, on, true are TRUE, everything else is FALSE).
106 \membersection{wxXmlResourceHandler::GetColour
}\label{wxxmlresourcehandlergetcolour
}
108 \func{wxColour
}{GetColour
}{\param{const wxString\&
}{param
}}
110 Gets colour in HTML syntax (\#RRGGBB).
112 \membersection{wxXmlResourceHandler::GetCurFileSystem
}\label{wxxmlresourcehandlergetcurfilesystem
}
114 \func{wxFileSystem\&
}{GetCurFileSystem
}{\void}
116 Returns the current file system.
118 \membersection{wxXmlResourceHandler::GetDimension
}\label{wxxmlresourcehandlergetdimension
}
120 \func{wxCoord
}{GetDimension
}{\param{const wxString\&
}{param
},
\param{wxCoord
}{defaultv =
0}}
122 Gets a dimension (may be in dialog units).
124 \membersection{wxXmlResourceHandler::GetFont
}\label{wxxmlresourcehandlergetfont
}
126 \func{wxFont
}{GetFont
}{\param{const wxString\&
}{param = wxT("font")
}}
130 \membersection{wxXmlResourceHandler::GetID
}\label{wxxmlresourcehandlergetid
}
132 \func{int
}{GetID
}{\void}
136 \membersection{wxXmlResourceHandler::GetIcon
}\label{wxxmlresourcehandlergeticon
}
138 \func{wxIcon
}{GetIcon
}{\param{const wxString\&
}{param = wxT("icon")
},
\param{wxSize
}{size = wxDefaultSize
}}
142 \membersection{wxXmlResourceHandler::GetLong
}\label{wxxmlresourcehandlergetlong
}
144 \func{long
}{GetLong
}{\param{const wxString\&
}{param
},
\param{long
}{defaultv =
0}}
146 Gets the integer value from the parameter.
148 \membersection{wxXmlResourceHandler::GetName
}\label{wxxmlresourcehandlergetname
}
150 \func{wxString
}{GetName
}{\void}
152 Returns the resource name.
154 \membersection{wxXmlResourceHandler::GetNodeContent
}\label{wxxmlresourcehandlergetnodecontent
}
156 \func{wxString
}{GetNodeContent
}{\param{wxXmlNode*
}{node
}}
158 Gets node content from wxXML
\_ENTITY\_NODE.
160 \membersection{wxXmlResourceHandler::GetParamNode
}\label{wxxmlresourcehandlergetparamnode
}
162 \func{wxXmlNode*
}{GetParamNode
}{\param{const wxString\&
}{param
}}
164 Finds the node or returns NULL.
166 \membersection{wxXmlResourceHandler::GetParamValue
}\label{wxxmlresourcehandlergetparamvalue
}
168 \func{wxString
}{GetParamValue
}{\param{const wxString\&
}{param
}}
170 Finds the parameter value or returns the empty string.
172 \membersection{wxXmlResourceHandler::GetPosition
}\label{wxxmlresourcehandlergetposition
}
174 \func{wxPoint
}{GetPosition
}{\param{const wxString\&
}{param = wxT("pos")
}}
176 Gets the position (may be in dialog units).
178 \membersection{wxXmlResourceHandler::GetSize
}\label{wxxmlresourcehandlergetsize
}
180 \func{wxSize
}{GetSize
}{\param{const wxString\&
}{param = wxT("size")
}}
182 Gets the size (may be in dialog units).
184 \membersection{wxXmlResourceHandler::GetStyle
}\label{wxxmlresourcehandlergetstyle
}
186 \func{int
}{GetStyle
}{\param{const wxString\&
}{param = wxT("style")
},
\param{int
}{defaults =
0}}
188 Gets style flags from text in form "flag | flag2| flag3 |..."
189 Only understands flags added with AddStyle.
191 \membersection{wxXmlResourceHandler::GetText
}\label{wxxmlresourcehandlergettext
}
193 \func{wxString
}{GetText
}{\param{const wxString\&
}{param
}}
195 Gets text from param and does some conversions:
197 \begin{itemize
}\itemsep=
0pt
198 \item replaces $
\backslash$n, $
\backslash$r, $
\backslash$t by respective characters (according to C syntax)
199 \item replaces
\verb+$+ by
\verb+\&+ and
\verb+\$\$+ by
\verb+\$+ (needed for
\verb+_File+ to
\verb+\&File+
200 translation because of XML syntax)
201 \item calls wxGetTranslations (unless disabled in wxXmlResource)
204 \membersection{wxXmlResourceHandler::HasParam
}\label{wxxmlresourcehandlerhasparam
}
206 \func{bool
}{HasParam
}{\param{const wxString\&
}{param
}}
208 Check to see if a parameter exists.
210 \membersection{wxXmlResourceHandler::IsOfClass
}\label{wxxmlresourcehandlerisofclass
}
212 \func{bool
}{IsOfClass
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{classname
}}
214 Convenience function. Returns true if the node has a property class equal to classname,
215 e.g. <object class="wxDialog">.
217 \membersection{wxXmlResourceHandler::SetParentResource
}\label{wxxmlresourcehandlersetparentresource
}
219 \func{void
}{SetParentResource
}{\param{wxXmlResource*
}{res
}}
221 Sets the parent resource.
223 \membersection{wxXmlResourceHandler::SetupWindow
}\label{wxxmlresourcehandlersetupwindow
}
225 \func{void
}{SetupWindow
}{\param{wxWindow*
}{wnd
}}
227 Sets common window options.