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
}
21 \latexignore{\rtfignore{\wxheading{Members
}}}
23 \membersection{wxXmlResourceHandler::wxXmlResourceHandler
}\label{wxxmlresourcehandlerctor
}
25 \func{}{wxXmlResourceHandler
}{\void}
29 \membersection{wxXmlResourceHandler::
\destruct{wxXmlResourceHandler
}}\label{wxxmlresourcehandlerdtor
}
31 \func{}{\destruct{wxXmlResourceHandler
}}{\void}
35 \membersection{wxXmlResourceHandler::AddStyle
}\label{wxxmlresourcehandleraddstyle
}
37 \func{void
}{AddStyle
}{\param{const wxString\&
}{name
},
\param{int
}{value
}}
39 Add a style flag (e.g. wxMB
\_DOCKABLE) to the list of flags
40 understood by this handler.
42 \membersection{wxXmlResourceHandler::AddWindowStyles
}\label{wxxmlresourcehandleraddwindowstyles
}
44 \func{void
}{AddWindowStyles
}{\void}
46 Add styles common to all wxWindow-derived classes.
48 \membersection{wxXmlResourceHandler::CanHandle
}\label{wxxmlresourcehandlercanhandle
}
50 \func{bool
}{CanHandle
}{\param{wxXmlNode*
}{node
}}
52 Returns true if it understands this node and can create
53 a resource from it, false otherwise.
57 You must
{\bf not
} call any wxXmlResourceHandler methods except
58 \helpref{IsOfClass
}{wxxmlresourcehandlerisofclass
} from this method! The instance
59 is not yet initialized with node data at the time CanHandle is called and it is only
60 safe to operate on
{\it node
} directly or to call IsOfClass.
62 \membersection{wxXmlResourceHandler::CreateChildren
}\label{wxxmlresourcehandlercreatechildren
}
64 \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
}}
74 \membersection{wxXmlResourceHandler::CreateResFromNode
}\label{wxxmlresourcehandlercreateresfromnode
}
76 \func{wxObject*
}{CreateResFromNode
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance = NULL
}}
78 Creates a resource from a node.
80 \membersection{wxXmlResourceHandler::CreateResource
}\label{wxxmlresourcehandlercreateresource
}
82 \func{wxObject*
}{CreateResource
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance
}}
84 Creates an object (menu, dialog, control, ...) from an XML node.
85 Should check for validity.
{\it parent
} is a higher-level object (usually window, dialog or panel)
86 that is often necessary to create the resource.
87 If
{\bf instance
} is non-NULL it should not create a new instance via 'new' but
88 should rather use this one, and call its Create method.
90 \membersection{wxXmlResourceHandler::DoCreateResource
}\label{wxxmlresourcehandlerdocreateresource
}
92 \func{wxObject*
}{DoCreateResource
}{\void}
94 Called from CreateResource after variables
97 \membersection{wxXmlResourceHandler::GetAnimation
}\label{wxxmlresourcehandlergetanimation
}
99 \func{wxAnimation
}{GetAnimation
}{\param{const wxString\&
}{param = wxT("animation")
}}
101 Creates a
\helpref{animation
}{wxanimation
} from the filename specified in
\arg{param
}.
103 \membersection{wxXmlResourceHandler::GetBitmap
}\label{wxxmlresourcehandlergetbitmap
}
105 \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).
115 \membersection{wxXmlResourceHandler::GetColour
}\label{wxxmlresourcehandlergetcolour
}
117 \func{wxColour
}{GetColour
}{\param{const wxString\&
}{param
},
\param{const wxColour\&
}{default = wxNullColour
}}
119 Gets colour in HTML syntax (\#RRGGBB).
121 \membersection{wxXmlResourceHandler::GetCurFileSystem
}\label{wxxmlresourcehandlergetcurfilesystem
}
123 \func{wxFileSystem\&
}{GetCurFileSystem
}{\void}
125 Returns the current file system.
127 \membersection{wxXmlResourceHandler::GetDimension
}\label{wxxmlresourcehandlergetdimension
}
129 \func{wxCoord
}{GetDimension
}{\param{const wxString\&
}{param
},
\param{wxCoord
}{defaultv =
0}}
131 Gets a dimension (may be in dialog units).
133 \membersection{wxXmlResourceHandler::GetFont
}\label{wxxmlresourcehandlergetfont
}
135 \func{wxFont
}{GetFont
}{\param{const wxString\&
}{param = wxT("font")
}}
139 \membersection{wxXmlResourceHandler::GetID
}\label{wxxmlresourcehandlergetid
}
141 \func{int
}{GetID
}{\void}
145 \membersection{wxXmlResourceHandler::GetIcon
}\label{wxxmlresourcehandlergeticon
}
147 \func{wxIcon
}{GetIcon
}{\param{const wxString\&
}{param = wxT("icon")
},
\param{wxSize
}{size = wxDefaultSize
}}
151 \membersection{wxXmlResourceHandler::GetLong
}\label{wxxmlresourcehandlergetlong
}
153 \func{long
}{GetLong
}{\param{const wxString\&
}{param
},
\param{long
}{defaultv =
0}}
155 Gets the integer value from the parameter.
157 \membersection{wxXmlResourceHandler::GetName
}\label{wxxmlresourcehandlergetname
}
159 \func{wxString
}{GetName
}{\void}
161 Returns the resource name.
163 \membersection{wxXmlResourceHandler::GetNodeContent
}\label{wxxmlresourcehandlergetnodecontent
}
165 \func{wxString
}{GetNodeContent
}{\param{wxXmlNode*
}{node
}}
167 Gets node content from wxXML
\_ENTITY\_NODE.
169 \membersection{wxXmlResourceHandler::GetParamNode
}\label{wxxmlresourcehandlergetparamnode
}
171 \func{wxXmlNode*
}{GetParamNode
}{\param{const wxString\&
}{param
}}
173 Finds the node or returns NULL.
175 \membersection{wxXmlResourceHandler::GetParamValue
}\label{wxxmlresourcehandlergetparamvalue
}
177 \func{wxString
}{GetParamValue
}{\param{const wxString\&
}{param
}}
179 Finds the parameter value or returns the empty string.
181 \membersection{wxXmlResourceHandler::GetPosition
}\label{wxxmlresourcehandlergetposition
}
183 \func{wxPoint
}{GetPosition
}{\param{const wxString\&
}{param = wxT("pos")
}}
185 Gets the position (may be in dialog units).
187 \membersection{wxXmlResourceHandler::GetSize
}\label{wxxmlresourcehandlergetsize
}
189 \func{wxSize
}{GetSize
}{\param{const wxString\&
}{param = wxT("size")
}}
191 Gets the size (may be in dialog units).
193 \membersection{wxXmlResourceHandler::GetStyle
}\label{wxxmlresourcehandlergetstyle
}
195 \func{int
}{GetStyle
}{\param{const wxString\&
}{param = wxT("style")
},
\param{int
}{defaults =
0}}
197 Gets style flags from text in form "flag | flag2| flag3 |..."
198 Only understands flags added with AddStyle.
200 \membersection{wxXmlResourceHandler::GetText
}\label{wxxmlresourcehandlergettext
}
202 \func{wxString
}{GetText
}{\param{const wxString\&
}{param
}}
204 Gets text from param and does some conversions:
206 \begin{itemize
}\itemsep=
0pt
207 \item replaces $
\backslash$n, $
\backslash$r, $
\backslash$t by respective characters (according to C syntax)
208 \item replaces
{\tt\$
} by
{\tt\&
} and
{\tt\$\$
} by
{\tt\$
} (needed for
{\tt\_File} to
{\tt\&File
}
209 translation because of XML syntax)
210 \item calls wxGetTranslations (unless disabled in wxXmlResource)
213 \membersection{wxXmlResourceHandler::HasParam
}\label{wxxmlresourcehandlerhasparam
}
215 \func{bool
}{HasParam
}{\param{const wxString\&
}{param
}}
217 Check to see if a parameter exists.
219 \membersection{wxXmlResourceHandler::IsOfClass
}\label{wxxmlresourcehandlerisofclass
}
221 \func{bool
}{IsOfClass
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{classname
}}
223 Convenience function. Returns true if the node has a property class equal to classname,
224 e.g. <object class="wxDialog">.
226 \membersection{wxXmlResourceHandler::SetParentResource
}\label{wxxmlresourcehandlersetparentresource
}
228 \func{void
}{SetParentResource
}{\param{wxXmlResource*
}{res
}}
230 Sets the parent resource.
232 \membersection{wxXmlResourceHandler::SetupWindow
}\label{wxxmlresourcehandlersetupwindow
}
234 \func{void
}{SetupWindow
}{\param{wxWindow*
}{wnd
}}
236 Sets common window options.