]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/xmlres.tex
added wxWindow::Set/GetMin/MaxClientSize convenience functions
[wxWidgets.git] / docs / latex / wx / xmlres.tex
index 05e6b72dfd666e114b697374d41cf50d452249e9..9a5488d2e796e3399f09434a2978413e312bb7dd 100644 (file)
@@ -19,6 +19,10 @@ See \helpref{XML-based resource system overview}{xrcoverview} for details.
 
 <wx/xrc/xmlres.h>
 
+\wxheading{Library}
+
+\helpref{wxXrc}{librarieslist}
+
 \wxheading{Constants}
 
 \begin{verbatim}
@@ -35,7 +39,9 @@ enum wxXmlResourceFlags
 
 \membersection{wxXmlResource::wxXmlResource}\label{wxxmlresourcector}
 
-\func{}{wxXmlResource}{\param{const wxString\& }{filemask}, \param{int }{flags = wxXRC\_USE\_LOCALE}}
+\func{}{wxXmlResource}{\param{const wxString\& }{filemask}, 
+    \param{int }{flags = wxXRC\_USE\_LOCALE},
+    \param{const wxString& }{domain = wxEmptyString}}
 
 Constructor.
 
@@ -46,7 +52,13 @@ load all resource files inside a zip archive.}
 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}}
+\docparam{domain}{The name of the gettext catalog to search for
+  translatable strings.  By default all loaded catalogs will be
+  searched.  This provides a way to allow the strings to only come
+  from a specific catalog.}
+
+\func{}{wxXmlResource}{\param{int }{flags = wxXRC\_USE\_LOCALE},
+    \param{const wxString& }{domain = wxEmptyString}}
 
 Constructor.
 
@@ -56,6 +68,11 @@ wxXRC\_NO\_SUBCLASSING: subclass property of object nodes will be ignored
 XRC files from being reloaded from disk in case they have been modified there
 since being last loaded (may slightly speed up loading them).}
 
+\docparam{domain}{The name of the gettext catalog to search for
+  translatable strings.  By default all loaded catalogs will be
+  searched.  This provides a way to allow the strings to only come
+  from a specific catalog.}
+
 
 \membersection{wxXmlResource::\destruct{wxXmlResource}}\label{wxxmlresourcedtor}
 
@@ -79,7 +96,7 @@ allocated on the heap, since it will be delete by
 
 \membersection{wxXmlResource::AttachUnknownControl}\label{wxxmlresourceattachunknowncontrol}
 
-\func{bool}{AttachUnknownControl}{\param{const wxString\& }{name}, \param{wxWindow* }{control}, \param{wxWindow* }{parent = NULL}}
+\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">.
@@ -124,7 +141,7 @@ Returns version information (a.b.c.d = d+ 256*c + 256\textasciicircum2*b + 256\t
 
 \membersection{wxXmlResource::GetXRCID}\label{wxxmlresourcegetxmlid}
 
-\func{int}{GetXRCID}{\param{const wxChar* }{str\_id}, \param{int }{value\_if\_not\_found = -2}}
+\func{int}{GetXRCID}{\param{const wxString\& }{str\_id}, \param{int }{value\_if\_not\_found = -2}}
 
 Returns a numeric ID that is equivalent to the string ID used in an XML
 resource. If an unknown \arg{str\_id} is requested (i.e. other than wxID\_XXX
@@ -175,7 +192,7 @@ Example:
 \begin{verbatim}
   MyDialog dlg;
   wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
-  dlg->ShowModal();
+  dlg.ShowModal();
 \end{verbatim}
 
 
@@ -197,18 +214,30 @@ Loads an icon resource from a file.
 
 \func{wxMenu*}{LoadMenu}{\param{const wxString\& }{name}}
 
-Loads menu from resource. Returns NULL on failure.
+Loads menu from resource. Returns \NULL on failure.
 
 
 \membersection{wxXmlResource::LoadMenuBar}\label{wxxmlresourceloadmenubar}
 
 \func{wxMenuBar*}{LoadMenuBar}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}}
 
-Loads a menubar from resource. Returns NULL on failure.
-
 \func{wxMenuBar*}{LoadMenuBar}{\param{const wxString\& }{name}}
 
-Loads a menubar from resource. Returns NULL on failure.
+Loads a menubar from resource. Returns \NULL on failure.
+
+
+\membersection{wxXmlResource::LoadObject}\label{wxxmlresourceloadobject}
+
+\func{wxObject*}{LoadObject}{\param{wxWindow* }{parent}, \param{const wxString\& }{name}, \param{const wxString\& }{classname}}
+
+\func{bool}{LoadObject}{\param{wxObject* }{instance}, \param{wxWindow* }{parent}, \param{const wxString\& }{name}, \param{const wxString\& }{classname}}
+
+Load an object from the resource specifying both the resource name and the
+class name.
+
+The first overload lets you load nonstandard container windows and returns \NULL
+on failure. The second one lets you finish the creation of an existing
+instance and returns \false on failure.
 
 
 \membersection{wxXmlResource::LoadPanel}\label{wxxmlresourceloadpanel}
@@ -234,7 +263,7 @@ Loads a toolbar.
 
 \func{wxXmlResource*}{Set}{\param{wxXmlResource* }{res}}
 
-Sets the global resources object and returns a pointer to the previous one (may be NULL).
+Sets the global resources object and returns a pointer to the previous one (may be \NULL).
 
 
 \membersection{wxXmlResource::SetFlags}\label{wxxmlresourcesetflags}
@@ -254,3 +283,20 @@ This function unloads a resource previously loaded by
 Returns \true if the resource was successfully unloaded and \false if it hasn't
 been found in the list of loaded resources.
 
+
+
+\membersection{wxXmlResource::GetDomain}\label{wxxmlresourcegetdomain}
+
+\func{wxChar*}{GetDomain}{}
+
+Returns the domain (message catalog) that will be used to load
+translatable strings in the XRC.
+
+
+\membersection{wxXmlResource::SetDomain}\label{wxxmlresourcesetdomain}
+
+\func{wxChar*}{SetDomain}{\param{const wxChar* }{domain}}
+
+Sets the domain (message catalog) that will be used to load
+translatable strings in the XRC.
+