251 lines
7.5 KiB
TeX
251 lines
7.5 KiB
TeX
|
%
|
||
|
% automatically generated by HelpGen $Revision$ from
|
||
|
% xmlres.h at 22/Jan/02 23:08:28
|
||
|
%
|
||
|
|
||
|
|
||
|
\section{\class{wxXmlResource}}\label{wxxmlresource}
|
||
|
|
||
|
|
||
|
This class holds XML resources from one or more .xml files
|
||
|
(or derived forms, either binary or zipped -- see manual for
|
||
|
details).
|
||
|
|
||
|
\wxheading{Derived from}
|
||
|
|
||
|
\helpref{wxObject}{wxobject}
|
||
|
|
||
|
\wxheading{Include files}
|
||
|
|
||
|
<xmlres.h>
|
||
|
|
||
|
\wxheading{Data structures}
|
||
|
|
||
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::wxXmlResource}\label{wxxmlresourcewxxmlresource}
|
||
|
|
||
|
\func{}{wxXmlResource}{\param{const wxString\& }{filemask}, \param{int }{flags = wxXRC\_USE\_LOCALE}}
|
||
|
|
||
|
Constructor.
|
||
|
Flags: wxXRC\_USE\_LOCALE
|
||
|
translatable strings will be translated via \_()
|
||
|
wxXRC\_NO\_SUBCLASSING
|
||
|
subclass property of object nodes will be ignored
|
||
|
(useful for previews in XRC editors)
|
||
|
|
||
|
|
||
|
\func{}{wxXmlResource}{\param{int }{flags = wxXRC\_USE\_LOCALE}}
|
||
|
|
||
|
Constructor.
|
||
|
Flags: wxXRC\_USE\_LOCALE
|
||
|
translatable strings will be translated via \_()
|
||
|
wxXRC\_NO\_SUBCLASSING
|
||
|
subclass property of object nodes will be ignored
|
||
|
(useful for previews in XRC editors)
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::\destruct{wxXmlResource}}\label{wxxmlresourcedtor}
|
||
|
|
||
|
\func{}{\destruct{wxXmlResource}}{\void}
|
||
|
|
||
|
Destructor.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::AddHandler}\label{wxxmlresourceaddhandler}
|
||
|
|
||
|
\func{void}{AddHandler}{\param{wxXmlResourceHandler* }{handler}}
|
||
|
|
||
|
Initialize only a specific handler (or custom handler). Convention says
|
||
|
that handler name is equal to the control's name plus 'XmlHandler', for example
|
||
|
wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. The XML resource compiler
|
||
|
(xmlres) can create include file that contains initialization code for
|
||
|
all controls used within the resource.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::AttachUnknownControl}\label{wxxmlresourceattachunknowncontrol}
|
||
|
|
||
|
\func{bool}{AttachUnknownControl}{\param{const wxString\& }{name}, \param{wxWindow* }{control}, \param{wxWindow* }{parent = NULL}}
|
||
|
|
||
|
Attaches an unknown control to the given panel/window/dialog.
|
||
|
Unknown controls are used in conjunction with <object class="unknown">.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::ClearHandlers}\label{wxxmlresourceclearhandlers}
|
||
|
|
||
|
\func{void}{ClearHandlers}{\void}
|
||
|
|
||
|
Removes all handlers
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::CompareVersion}\label{wxxmlresourcecompareversion}
|
||
|
|
||
|
\constfunc{int}{CompareVersion}{\param{int }{major}, \param{int }{minor}, \param{int }{release}, \param{int }{revision}}
|
||
|
|
||
|
Compares resources version to argument. Returns -1 if resources version
|
||
|
is less than the argument, +1 if greater and 0 if they equal.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::CreateResFromNode}\label{wxxmlresourcecreateresfromnode}
|
||
|
|
||
|
\func{wxObject*}{CreateResFromNode}{\param{wxXmlNode* }{node}, \param{wxObject* }{parent}, \param{wxObject* }{instance = NULL}}
|
||
|
|
||
|
Creates a resource from information in the given node.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::DoFindResource}\label{wxxmlresourcedofindresource}
|
||
|
|
||
|
\func{wxXmlNode*}{DoFindResource}{\param{wxXmlNode* }{parent}, \param{const wxString\& }{name}, \param{const wxString\& }{classname}, \param{bool }{recursive}}
|
||
|
|
||
|
Helper function: finds a resource (calls UpdateResources) and returns a node containing it.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::FindResource}\label{wxxmlresourcefindresource}
|
||
|
|
||
|
\func{wxXmlNode*}{FindResource}{\param{const wxString\& }{name}, \param{const wxString\& }{classname}, \param{bool }{recursive = FALSE}}
|
||
|
|
||
|
Finds a resource (calls UpdateResources) and returns a node containing it.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::Get}\label{wxxmlresourceget}
|
||
|
|
||
|
\func{wxXmlResource*}{Get}{\void}
|
||
|
|
||
|
Singleton accessors.
|
||
|
Gets the global resources object or creates one if none exists.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::GetFlags}\label{wxxmlresourcegetflags}
|
||
|
|
||
|
\func{int}{GetFlags}{\void}
|
||
|
|
||
|
Returns flags, which may be a bitlist of wxXRC\_USE\_LOCALE and wxXRC\_NO\_SUBCLASSING.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::GetVersion}\label{wxxmlresourcegetversion}
|
||
|
|
||
|
\constfunc{long}{GetVersion}{\void}
|
||
|
|
||
|
Returns version information (a.b.c.d = d+ 256*c + 256\verb|^|2*b + 256\verb|^|3*a).
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::GetXMLID}\label{wxxmlresourcegetxmlid}
|
||
|
|
||
|
\func{int}{GetXMLID}{\param{const wxChar* }{str\_id}}
|
||
|
|
||
|
Returns a numeric ID that is equivalent to the string id used in an XML
|
||
|
resource. To be used in event tables.
|
||
|
Macro XMLID is provided for convenience
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::InitAllHandlers}\label{wxxmlresourceinitallhandlers}
|
||
|
|
||
|
\func{void}{InitAllHandlers}{\void}
|
||
|
|
||
|
Initialize handlers for all supported controls/windows. This will
|
||
|
make the executable quite big because it forces linking against
|
||
|
most of the wxWindows library.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::Load}\label{wxxmlresourceload}
|
||
|
|
||
|
\func{bool}{Load}{\param{const wxString\& }{filemask}}
|
||
|
|
||
|
Loads resources from XML files that match given filemask.
|
||
|
This method understands VFS (see filesys.h).
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadBitmap}\label{wxxmlresourceloadbitmap}
|
||
|
|
||
|
\func{wxBitmap}{LoadBitmap}{\param{const wxString\& }{name}}
|
||
|
|
||
|
Loads a bitmap resource from a file.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadDialog}\label{wxxmlresourceloaddialog}
|
||
|
|
||
|
\func{wxDialog*}{LoadDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
|
||
|
|
||
|
Loads a dialog. dlg points to parent window (if any).
|
||
|
|
||
|
|
||
|
\func{bool}{LoadDialog}{\param{wxDialog* }{dlg}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
|
||
|
|
||
|
Loads a dialog. dlg points to parent window (if any). This form
|
||
|
is used to finish creation of already existing instance (main reason
|
||
|
for this is that you may want to use derived class with new event table)
|
||
|
Example (typical usage):
|
||
|
MyDialog dlg;
|
||
|
wxTheXmlResource->LoadDialog(\&dlg, mainFrame, "my\_dialog");
|
||
|
dlg->ShowModal();
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadFrame}\label{wxxmlresourceloadframe}
|
||
|
|
||
|
\func{bool}{LoadFrame}{\param{wxFrame* }{frame}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
|
||
|
|
||
|
Loads a frame.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadIcon}\label{wxxmlresourceloadicon}
|
||
|
|
||
|
\func{wxIcon}{LoadIcon}{\param{const wxString\& }{name}}
|
||
|
|
||
|
Loads an icon resource from a file.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadMenu}\label{wxxmlresourceloadmenu}
|
||
|
|
||
|
\func{wxMenu*}{LoadMenu}{\param{const wxString\& }{name}}
|
||
|
|
||
|
Loads menu from resource. Returns NULL on failure.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadMenuBar}\label{wxxmlresourceloadmenubar}
|
||
|
|
||
|
\func{wxMenuBar*}{LoadMenuBar}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
|
||
|
|
||
|
Loads menubar from resource. Returns NULL on failure.
|
||
|
|
||
|
|
||
|
\func{wxMenuBar*}{LoadMenuBar}{\param{const wxString\& }{name}}
|
||
|
|
||
|
Loads menubar from resource. Returns NULL on failure.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadPanel}\label{wxxmlresourceloadpanel}
|
||
|
|
||
|
\func{wxPanel*}{LoadPanel}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
|
||
|
|
||
|
Loads a panel. panel points to parent window (if any).
|
||
|
|
||
|
|
||
|
\func{bool}{LoadPanel}{\param{wxPanel* }{panel}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}}
|
||
|
|
||
|
Loads a panel. panel points to parent window (if any). This form
|
||
|
is used to finish creation of already existing instance.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::LoadToolBar}\label{wxxmlresourceloadtoolbar}
|
||
|
|
||
|
\func{wxToolBar*}{LoadToolBar}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
|
||
|
|
||
|
Loads a toolbar.
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::Set}\label{wxxmlresourceset}
|
||
|
|
||
|
\func{wxXmlResource*}{Set}{\param{wxXmlResource* }{res}}
|
||
|
|
||
|
Sets the global resources object and returns a pointer to the previous one (may be NULL).
|
||
|
|
||
|
|
||
|
\membersection{wxXmlResource::UpdateResources}\label{wxxmlresourceupdateresources}
|
||
|
|
||
|
\func{void}{UpdateResources}{\void}
|
||
|
|
||
|
Scans the resources list for unloaded files and loads them. Also reloads
|
||
|
files that have been modified since last loading.
|
||
|
|