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 \wxheading{Derived from
}
15 \helpref{wxObject
}{wxobject
}
17 \wxheading{Include files
}
23 \helpref{wxXrc
}{librarieslist
}
25 \latexignore{\rtfignore{\wxheading{Members
}}}
27 \membersection{wxXmlResourceHandler::wxXmlResourceHandler
}\label{wxxmlresourcehandlerctor
}
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.
61 You must
{\bf not
} call any wxXmlResourceHandler methods except
62 \helpref{IsOfClass
}{wxxmlresourcehandlerisofclass
} from this method! The instance
63 is not yet initialized with node data at the time CanHandle is called and it is only
64 safe to operate on
{\it node
} directly or to call IsOfClass.
66 \membersection{wxXmlResourceHandler::CreateChildren
}\label{wxxmlresourcehandlercreatechildren
}
68 \func{void
}{CreateChildren
}{\param{wxObject*
}{parent
},
\param{bool
}{this
\_hnd\_only = false
}}
72 \membersection{wxXmlResourceHandler::CreateChildrenPrivately
}\label{wxxmlresourcehandlercreatechildrenprivately
}
74 \func{void
}{CreateChildrenPrivately
}{\param{wxObject*
}{parent
},
\param{wxXmlNode*
}{rootnode = NULL
}}
78 \membersection{wxXmlResourceHandler::CreateResFromNode
}\label{wxxmlresourcehandlercreateresfromnode
}
80 \func{wxObject*
}{CreateResFromNode
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance = NULL
}}
82 Creates a resource from a node.
84 \membersection{wxXmlResourceHandler::CreateResource
}\label{wxxmlresourcehandlercreateresource
}
86 \func{wxObject*
}{CreateResource
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance
}}
88 Creates an object (menu, dialog, control, ...) from an XML node.
89 Should check for validity.
{\it parent
} is a higher-level object (usually window, dialog or panel)
90 that is often necessary to create the resource.
91 If
{\bf instance
} is non-NULL it should not create a new instance via 'new' but
92 should rather use this one, and call its Create method.
94 \membersection{wxXmlResourceHandler::DoCreateResource
}\label{wxxmlresourcehandlerdocreateresource
}
96 \func{wxObject*
}{DoCreateResource
}{\void}
98 Called from CreateResource after variables
101 \membersection{wxXmlResourceHandler::GetAnimation
}\label{wxxmlresourcehandlergetanimation
}
103 \func{wxAnimation
}{GetAnimation
}{\param{const wxString\&
}{param = wxT("animation")
}}
105 Creates a
\helpref{animation
}{wxanimation
} from the filename specified in
\arg{param
}.
107 \membersection{wxXmlResourceHandler::GetBitmap
}\label{wxxmlresourcehandlergetbitmap
}
109 \func{wxBitmap
}{GetBitmap
}{\param{const wxString\&
}{param = wxT("bitmap")
},
\param{wxSize
}{size = wxDefaultSize
}}
113 \membersection{wxXmlResourceHandler::GetBool
}\label{wxxmlresourcehandlergetbool
}
115 \func{bool
}{GetBool
}{\param{const wxString\&
}{param
},
\param{bool
}{defaultv = false
}}
117 Gets a bool flag (
1, t, yes, on, true are true, everything else is false).
119 \membersection{wxXmlResourceHandler::GetColour
}\label{wxxmlresourcehandlergetcolour
}
121 \func{wxColour
}{GetColour
}{\param{const wxString\&
}{param
},
\param{const wxColour\&
}{default = wxNullColour
}}
123 Gets colour in HTML syntax (\#RRGGBB).
125 \membersection{wxXmlResourceHandler::GetCurFileSystem
}\label{wxxmlresourcehandlergetcurfilesystem
}
127 \func{wxFileSystem\&
}{GetCurFileSystem
}{\void}
129 Returns the current file system.
131 \membersection{wxXmlResourceHandler::GetDimension
}\label{wxxmlresourcehandlergetdimension
}
133 \func{wxCoord
}{GetDimension
}{\param{const wxString\&
}{param
},
\param{wxCoord
}{defaultv =
0}}
135 Gets a dimension (may be in dialog units).
137 \membersection{wxXmlResourceHandler::GetFont
}\label{wxxmlresourcehandlergetfont
}
139 \func{wxFont
}{GetFont
}{\param{const wxString\&
}{param = wxT("font")
}}
143 \membersection{wxXmlResourceHandler::GetID
}\label{wxxmlresourcehandlergetid
}
145 \func{int
}{GetID
}{\void}
149 \membersection{wxXmlResourceHandler::GetIcon
}\label{wxxmlresourcehandlergeticon
}
151 \func{wxIcon
}{GetIcon
}{\param{const wxString\&
}{param = wxT("icon")
},
\param{wxSize
}{size = wxDefaultSize
}}
155 \membersection{wxXmlResourceHandler::GetLong
}\label{wxxmlresourcehandlergetlong
}
157 \func{long
}{GetLong
}{\param{const wxString\&
}{param
},
\param{long
}{defaultv =
0}}
159 Gets the integer value from the parameter.
161 \membersection{wxXmlResourceHandler::GetName
}\label{wxxmlresourcehandlergetname
}
163 \func{wxString
}{GetName
}{\void}
165 Returns the resource name.
167 \membersection{wxXmlResourceHandler::GetNodeContent
}\label{wxxmlresourcehandlergetnodecontent
}
169 \func{wxString
}{GetNodeContent
}{\param{wxXmlNode*
}{node
}}
171 Gets node content from wxXML
\_ENTITY\_NODE.
173 \membersection{wxXmlResourceHandler::GetParamNode
}\label{wxxmlresourcehandlergetparamnode
}
175 \func{wxXmlNode*
}{GetParamNode
}{\param{const wxString\&
}{param
}}
177 Finds the node or returns NULL.
179 \membersection{wxXmlResourceHandler::GetParamValue
}\label{wxxmlresourcehandlergetparamvalue
}
181 \func{wxString
}{GetParamValue
}{\param{const wxString\&
}{param
}}
183 Finds the parameter value or returns the empty string.
185 \membersection{wxXmlResourceHandler::GetPosition
}\label{wxxmlresourcehandlergetposition
}
187 \func{wxPoint
}{GetPosition
}{\param{const wxString\&
}{param = wxT("pos")
}}
189 Gets the position (may be in dialog units).
191 \membersection{wxXmlResourceHandler::GetSize
}\label{wxxmlresourcehandlergetsize
}
193 \func{wxSize
}{GetSize
}{\param{const wxString\&
}{param = wxT("size")
}}
195 Gets the size (may be in dialog units).
197 \membersection{wxXmlResourceHandler::GetStyle
}\label{wxxmlresourcehandlergetstyle
}
199 \func{int
}{GetStyle
}{\param{const wxString\&
}{param = wxT("style")
},
\param{int
}{defaults =
0}}
201 Gets style flags from text in form "flag | flag2| flag3 |..."
202 Only understands flags added with AddStyle.
204 \membersection{wxXmlResourceHandler::GetText
}\label{wxxmlresourcehandlergettext
}
206 \func{wxString
}{GetText
}{\param{const wxString\&
}{param
}}
208 Gets text from param and does some conversions:
210 \begin{itemize
}\itemsep=
0pt
211 \item replaces $
\backslash$n, $
\backslash$r, $
\backslash$t by respective characters (according to C syntax)
212 \item replaces
{\tt\$
} by
{\tt\&
} and
{\tt\$\$
} by
{\tt\$
} (needed for
{\tt\_File} to
{\tt\&File
}
213 translation because of XML syntax)
214 \item calls wxGetTranslations (unless disabled in wxXmlResource)
217 \membersection{wxXmlResourceHandler::HasParam
}\label{wxxmlresourcehandlerhasparam
}
219 \func{bool
}{HasParam
}{\param{const wxString\&
}{param
}}
221 Check to see if a parameter exists.
223 \membersection{wxXmlResourceHandler::IsOfClass
}\label{wxxmlresourcehandlerisofclass
}
225 \func{bool
}{IsOfClass
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{classname
}}
227 Convenience function. Returns true if the node has a property class equal to classname,
228 e.g. <object class="wxDialog">.
230 \membersection{wxXmlResourceHandler::SetParentResource
}\label{wxxmlresourcehandlersetparentresource
}
232 \func{void
}{SetParentResource
}{\param{wxXmlResource*
}{res
}}
234 Sets the parent resource.
236 \membersection{wxXmlResourceHandler::SetupWindow
}\label{wxxmlresourcehandlersetupwindow
}
238 \func{void
}{SetupWindow
}{\param{wxWindow*
}{wnd
}}
240 Sets common window options.