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 \wxheading{Derived from
}
13 \helpref{wxObject
}{wxobject
}
15 \wxheading{Include files
}
19 \wxheading{Data structures
}
21 \latexignore{\rtfignore{\wxheading{Members
}}}
24 \membersection{wxXmlResourceHandler::wxXmlResourceHandler
}\label{wxxmlresourcehandlerwxxmlresourcehandler
}
26 \func{}{wxXmlResourceHandler
}{\void}
31 \membersection{wxXmlResourceHandler::
\destruct{wxXmlResourceHandler
}}\label{wxxmlresourcehandlerdtor
}
33 \func{}{\destruct{wxXmlResourceHandler
}}{\void}
38 \membersection{wxXmlResourceHandler::AddStyle
}\label{wxxmlresourcehandleraddstyle
}
40 \func{void
}{AddStyle
}{\param{const wxString\&
}{name
},
\param{int
}{value
}}
42 Add a style flag (e.g. wxMB
\_DOCKABLE) to the list of flags
43 understood by this handler.
46 \membersection{wxXmlResourceHandler::AddWindowStyles
}\label{wxxmlresourcehandleraddwindowstyles
}
48 \func{void
}{AddWindowStyles
}{\void}
50 Add styles common to all wxWindow-derived classes.
53 \membersection{wxXmlResourceHandler::CanHandle
}\label{wxxmlresourcehandlercanhandle
}
55 \func{bool
}{CanHandle
}{\param{wxXmlNode*
}{node
}}
57 Returns TRUE if it understands this node and can create
58 a resource from it, FALSE otherwise.
61 \membersection{wxXmlResourceHandler::CreateChildren
}\label{wxxmlresourcehandlercreatechildren
}
63 \func{void
}{CreateChildren
}{\param{wxObject*
}{parent
},
\param{bool
}{this
\_hnd\_only = FALSE
}}
68 \membersection{wxXmlResourceHandler::CreateChildrenPrivately
}\label{wxxmlresourcehandlercreatechildrenprivately
}
70 \func{void
}{CreateChildrenPrivately
}{\param{wxObject*
}{parent
},
\param{wxXmlNode*
}{rootnode = NULL
}}
75 \membersection{wxXmlResourceHandler::CreateResFromNode
}\label{wxxmlresourcehandlercreateresfromnode
}
77 \func{wxObject*
}{CreateResFromNode
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance = NULL
}}
79 Creates a resource from a node.
82 \membersection{wxXmlResourceHandler::CreateResource
}\label{wxxmlresourcehandlercreateresource
}
84 \func{wxObject*
}{CreateResource
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance
}}
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.
94 \membersection{wxXmlResourceHandler::DoCreateResource
}\label{wxxmlresourcehandlerdocreateresource
}
96 \func{wxObject*
}{DoCreateResource
}{\void}
98 This one is called from CreateResource after variables
102 \membersection{wxXmlResourceHandler::GetBitmap
}\label{wxxmlresourcehandlergetbitmap
}
104 \func{wxBitmap
}{GetBitmap
}{\param{const wxString\&
}{param = wxT("bitmap")
},
\param{wxSize
}{size = wxDefaultSize
}}
109 \membersection{wxXmlResourceHandler::GetBool
}\label{wxxmlresourcehandlergetbool
}
111 \func{bool
}{GetBool
}{\param{const wxString\&
}{param
},
\param{bool
}{defaultv = FALSE
}}
113 Gets a bool flag (
1, t, yes, on, true are TRUE, everything else is FALSE).
116 \membersection{wxXmlResourceHandler::GetColour
}\label{wxxmlresourcehandlergetcolour
}
118 \func{wxColour
}{GetColour
}{\param{const wxString\&
}{param
}}
120 Gets colour in HTML syntax (\#RRGGBB).
123 \membersection{wxXmlResourceHandler::GetCurFileSystem
}\label{wxxmlresourcehandlergetcurfilesystem
}
125 \func{wxFileSystem\&
}{GetCurFileSystem
}{\void}
128 \membersection{wxXmlResourceHandler::GetDimension
}\label{wxxmlresourcehandlergetdimension
}
130 \func{wxCoord
}{GetDimension
}{\param{const wxString\&
}{param
},
\param{wxCoord
}{defaultv =
0}}
132 Gets a dimension (may be in dialog units).
135 \membersection{wxXmlResourceHandler::GetFont
}\label{wxxmlresourcehandlergetfont
}
137 \func{wxFont
}{GetFont
}{\param{const wxString\&
}{param = wxT("font")
}}
142 \membersection{wxXmlResourceHandler::GetID
}\label{wxxmlresourcehandlergetid
}
144 \func{int
}{GetID
}{\void}
149 \membersection{wxXmlResourceHandler::GetIcon
}\label{wxxmlresourcehandlergeticon
}
151 \func{wxIcon
}{GetIcon
}{\param{const wxString\&
}{param = wxT("icon")
},
\param{wxSize
}{size = wxDefaultSize
}}
156 \membersection{wxXmlResourceHandler::GetLong
}\label{wxxmlresourcehandlergetlong
}
158 \func{long
}{GetLong
}{\param{const wxString\&
}{param
},
\param{long
}{defaultv =
0}}
160 Gets the integer value from the parameter.
163 \membersection{wxXmlResourceHandler::GetName
}\label{wxxmlresourcehandlergetname
}
165 \func{wxString
}{GetName
}{\void}
167 Returns the resource name.
170 \membersection{wxXmlResourceHandler::GetNodeContent
}\label{wxxmlresourcehandlergetnodecontent
}
172 \func{wxString
}{GetNodeContent
}{\param{wxXmlNode*
}{node
}}
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"
181 \membersection{wxXmlResourceHandler::GetParamNode
}\label{wxxmlresourcehandlergetparamnode
}
183 \func{wxXmlNode*
}{GetParamNode
}{\param{const wxString\&
}{param
}}
185 Finds the node or returns NULL.
188 \membersection{wxXmlResourceHandler::GetParamValue
}\label{wxxmlresourcehandlergetparamvalue
}
190 \func{wxString
}{GetParamValue
}{\param{const wxString\&
}{param
}}
192 Finds the parameter value or returns the empty string.
195 \membersection{wxXmlResourceHandler::GetPosition
}\label{wxxmlresourcehandlergetposition
}
197 \func{wxPoint
}{GetPosition
}{\param{const wxString\&
}{param = wxT("pos")
}}
199 Gets the position (may be in dialog units).
202 \membersection{wxXmlResourceHandler::GetSize
}\label{wxxmlresourcehandlergetsize
}
204 \func{wxSize
}{GetSize
}{\param{const wxString\&
}{param = wxT("size")
}}
206 Gets the size (may be in dialog units).
209 \membersection{wxXmlResourceHandler::GetStyle
}\label{wxxmlresourcehandlergetstyle
}
211 \func{int
}{GetStyle
}{\param{const wxString\&
}{param = wxT("style")
},
\param{int
}{defaults =
0}}
213 Gets style flags from text in form "flag | flag2| flag3 |..."
214 Only understads flags added with AddStyle
217 \membersection{wxXmlResourceHandler::GetText
}\label{wxxmlresourcehandlergettext
}
219 \func{wxString
}{GetText
}{\param{const wxString\&
}{param
}}
221 Gets text from param and does some conversions:
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)
230 \membersection{wxXmlResourceHandler::HasParam
}\label{wxxmlresourcehandlerhasparam
}
232 \func{bool
}{HasParam
}{\param{const wxString\&
}{param
}}
234 Check to see if a parameter exists.
237 \membersection{wxXmlResourceHandler::IsOfClass
}\label{wxxmlresourcehandlerisofclass
}
239 \func{bool
}{IsOfClass
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{classname
}}
241 Convenience function. Returns true if the node has a property class equal to classname,
242 e.g. <object class="wxDialog">.
245 \membersection{wxXmlResourceHandler::SetParentResource
}\label{wxxmlresourcehandlersetparentresource
}
247 \func{void
}{SetParentResource
}{\param{wxXmlResource*
}{res
}}
249 Sets the parent resource.
252 \membersection{wxXmlResourceHandler::SetupWindow
}\label{wxxmlresourcehandlersetupwindow
}
254 \func{void
}{SetupWindow
}{\param{wxWindow*
}{wnd
}}
256 Sets common window options.