2 % automatically generated by HelpGen $Revision$ from
3 % xmlres.h at 22/Jan/02 23:08:28
7 \section{\class{wxXmlResource
}}\label{wxxmlresource
}
10 This class holds XML resources from one or more .xml files
11 (or derived forms, either binary or zipped -- see manual for
14 \wxheading{Derived from
}
16 \helpref{wxObject
}{wxobject
}
18 \wxheading{Include files
}
22 \wxheading{Data structures
}
24 \latexignore{\rtfignore{\wxheading{Members
}}}
27 \membersection{wxXmlResource::wxXmlResource
}\label{wxxmlresourcewxxmlresource
}
29 \func{}{wxXmlResource
}{\param{const wxString\&
}{filemask
},
\param{int
}{flags = wxXRC
\_USE\_LOCALE}}
32 Flags: wxXRC
\_USE\_LOCALE
33 translatable strings will be translated via
\_()
34 wxXRC
\_NO\_SUBCLASSING
35 subclass property of object nodes will be ignored
36 (useful for previews in XRC editors)
39 \func{}{wxXmlResource
}{\param{int
}{flags = wxXRC
\_USE\_LOCALE}}
42 Flags: wxXRC
\_USE\_LOCALE
43 translatable strings will be translated via
\_()
44 wxXRC
\_NO\_SUBCLASSING
45 subclass property of object nodes will be ignored
46 (useful for previews in XRC editors)
49 \membersection{wxXmlResource::
\destruct{wxXmlResource
}}\label{wxxmlresourcedtor
}
51 \func{}{\destruct{wxXmlResource
}}{\void}
56 \membersection{wxXmlResource::AddHandler
}\label{wxxmlresourceaddhandler
}
58 \func{void
}{AddHandler
}{\param{wxXmlResourceHandler*
}{handler
}}
60 Initialize only a specific handler (or custom handler). Convention says
61 that handler name is equal to the control's name plus 'XmlHandler', for example
62 wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. The XML resource compiler
63 (xmlres) can create include file that contains initialization code for
64 all controls used within the resource.
67 \membersection{wxXmlResource::AttachUnknownControl
}\label{wxxmlresourceattachunknowncontrol
}
69 \func{bool
}{AttachUnknownControl
}{\param{const wxString\&
}{name
},
\param{wxWindow*
}{control
},
\param{wxWindow*
}{parent = NULL
}}
71 Attaches an unknown control to the given panel/window/dialog.
72 Unknown controls are used in conjunction with <object class="unknown">.
75 \membersection{wxXmlResource::ClearHandlers
}\label{wxxmlresourceclearhandlers
}
77 \func{void
}{ClearHandlers
}{\void}
82 \membersection{wxXmlResource::CompareVersion
}\label{wxxmlresourcecompareversion
}
84 \constfunc{int
}{CompareVersion
}{\param{int
}{major
},
\param{int
}{minor
},
\param{int
}{release
},
\param{int
}{revision
}}
86 Compares resources version to argument. Returns -
1 if resources version
87 is less than the argument, +
1 if greater and
0 if they equal.
90 \membersection{wxXmlResource::CreateResFromNode
}\label{wxxmlresourcecreateresfromnode
}
92 \func{wxObject*
}{CreateResFromNode
}{\param{wxXmlNode*
}{node
},
\param{wxObject*
}{parent
},
\param{wxObject*
}{instance = NULL
}}
94 Creates a resource from information in the given node.
97 \membersection{wxXmlResource::DoFindResource
}\label{wxxmlresourcedofindresource
}
99 \func{wxXmlNode*
}{DoFindResource
}{\param{wxXmlNode*
}{parent
},
\param{const wxString\&
}{name
},
\param{const wxString\&
}{classname
},
\param{bool
}{recursive
}}
101 Helper function: finds a resource (calls UpdateResources) and returns a node containing it.
104 \membersection{wxXmlResource::FindResource
}\label{wxxmlresourcefindresource
}
106 \func{wxXmlNode*
}{FindResource
}{\param{const wxString\&
}{name
},
\param{const wxString\&
}{classname
},
\param{bool
}{recursive = FALSE
}}
108 Finds a resource (calls UpdateResources) and returns a node containing it.
111 \membersection{wxXmlResource::Get
}\label{wxxmlresourceget
}
113 \func{wxXmlResource*
}{Get
}{\void}
116 Gets the global resources object or creates one if none exists.
119 \membersection{wxXmlResource::GetFlags
}\label{wxxmlresourcegetflags
}
121 \func{int
}{GetFlags
}{\void}
123 Returns flags, which may be a bitlist of wxXRC
\_USE\_LOCALE and wxXRC
\_NO\_SUBCLASSING.
126 \membersection{wxXmlResource::GetVersion
}\label{wxxmlresourcegetversion
}
128 \constfunc{long
}{GetVersion
}{\void}
130 Returns version information (a.b.c.d = d+
256*c +
256\verb|^|
2*b +
256\verb|^|
3*a).
133 \membersection{wxXmlResource::GetXMLID
}\label{wxxmlresourcegetxmlid
}
135 \func{int
}{GetXMLID
}{\param{const wxChar*
}{str
\_id}}
137 Returns a numeric ID that is equivalent to the string id used in an XML
138 resource. To be used in event tables.
139 Macro XMLID is provided for convenience
142 \membersection{wxXmlResource::InitAllHandlers
}\label{wxxmlresourceinitallhandlers
}
144 \func{void
}{InitAllHandlers
}{\void}
146 Initialize handlers for all supported controls/windows. This will
147 make the executable quite big because it forces linking against
148 most of the wxWindows library.
151 \membersection{wxXmlResource::Load
}\label{wxxmlresourceload
}
153 \func{bool
}{Load
}{\param{const wxString\&
}{filemask
}}
155 Loads resources from XML files that match given filemask.
156 This method understands VFS (see filesys.h).
159 \membersection{wxXmlResource::LoadBitmap
}\label{wxxmlresourceloadbitmap
}
161 \func{wxBitmap
}{LoadBitmap
}{\param{const wxString\&
}{name
}}
163 Loads a bitmap resource from a file.
166 \membersection{wxXmlResource::LoadDialog
}\label{wxxmlresourceloaddialog
}
168 \func{wxDialog*
}{LoadDialog
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{name
}}
170 Loads a dialog. dlg points to parent window (if any).
173 \func{bool
}{LoadDialog
}{\param{wxDialog*
}{dlg
},
\param{wxWindow*
}{parent
},
\param{const wxString\&
}{name
}}
175 Loads a dialog. dlg points to parent window (if any). This form
176 is used to finish creation of already existing instance (main reason
177 for this is that you may want to use derived class with new event table)
178 Example (typical usage):
180 wxTheXmlResource->LoadDialog(\&dlg, mainFrame, "my
\_dialog");
184 \membersection{wxXmlResource::LoadFrame
}\label{wxxmlresourceloadframe
}
186 \func{bool
}{LoadFrame
}{\param{wxFrame*
}{frame
},
\param{wxWindow*
}{parent
},
\param{const wxString\&
}{name
}}
191 \membersection{wxXmlResource::LoadIcon
}\label{wxxmlresourceloadicon
}
193 \func{wxIcon
}{LoadIcon
}{\param{const wxString\&
}{name
}}
195 Loads an icon resource from a file.
198 \membersection{wxXmlResource::LoadMenu
}\label{wxxmlresourceloadmenu
}
200 \func{wxMenu*
}{LoadMenu
}{\param{const wxString\&
}{name
}}
202 Loads menu from resource. Returns NULL on failure.
205 \membersection{wxXmlResource::LoadMenuBar
}\label{wxxmlresourceloadmenubar
}
207 \func{wxMenuBar*
}{LoadMenuBar
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{name
}}
209 Loads menubar from resource. Returns NULL on failure.
212 \func{wxMenuBar*
}{LoadMenuBar
}{\param{const wxString\&
}{name
}}
214 Loads menubar from resource. Returns NULL on failure.
217 \membersection{wxXmlResource::LoadPanel
}\label{wxxmlresourceloadpanel
}
219 \func{wxPanel*
}{LoadPanel
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{name
}}
221 Loads a panel. panel points to parent window (if any).
224 \func{bool
}{LoadPanel
}{\param{wxPanel*
}{panel
},
\param{wxWindow*
}{parent
},
\param{const wxString\&
}{name
}}
226 Loads a panel. panel points to parent window (if any). This form
227 is used to finish creation of already existing instance.
230 \membersection{wxXmlResource::LoadToolBar
}\label{wxxmlresourceloadtoolbar
}
232 \func{wxToolBar*
}{LoadToolBar
}{\param{wxWindow*
}{parent
},
\param{const wxString\&
}{name
}}
237 \membersection{wxXmlResource::Set
}\label{wxxmlresourceset
}
239 \func{wxXmlResource*
}{Set
}{\param{wxXmlResource*
}{res
}}
241 Sets the global resources object and returns a pointer to the previous one (may be NULL).
244 \membersection{wxXmlResource::UpdateResources
}\label{wxxmlresourceupdateresources
}
246 \func{void
}{UpdateResources
}{\void}
248 Scans the resources list for unloaded files and loads them. Also reloads
249 files that have been modified since last loading.