X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc378c2d7521e58e6f067470b798e9c81dd08c61..d0a6715724f10ef967bd9c3868c433142efab9b1:/interface/wx/xrc/xmlres.h?ds=sidebyside diff --git a/interface/wx/xrc/xmlres.h b/interface/wx/xrc/xmlres.h index 92bfc64eab..849b932ea6 100644 --- a/interface/wx/xrc/xmlres.h +++ b/interface/wx/xrc/xmlres.h @@ -31,7 +31,10 @@ enum wxXmlResourceFlags The class holds XML resources from one or more .xml files, binary files or zip archive files. - @see @ref overview_xrc, @ref xrc_format + Note that this is a singleton class and you'll never allocate/deallocate it. + Just use the static wxXmlResource::Get() getter. + + @see @ref overview_xrc, @ref overview_xrcformat @library{wxxrc} @category{xrc} @@ -54,7 +57,7 @@ public: */ wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE, - const wxString domain = wxEmptyString); + const wxString& domain = wxEmptyString); /** Constructor. @@ -67,7 +70,7 @@ public: This provides a way to allow the strings to only come from a specific catalog. */ wxXmlResource(int flags = wxXRC_USE_LOCALE, - const wxString domain = wxEmptyString); + const wxString& domain = wxEmptyString); /** Destructor. @@ -120,7 +123,7 @@ public: @since 2.9.0 */ - static wxString wxXmlResource::FindXRCIDById(int numId); + static wxString FindXRCIDById(int numId); /** Gets the global resources object or creates one if none exists. @@ -166,7 +169,14 @@ public: /** Loads resources from XML files that match given filemask. - This method understands VFS (see filesys.h). + + Example: + @code + if (!wxXmlResource::Get()->Load("rc/*.xrc")) + wxLogError("Couldn't load resources!"); + @endcode + + This method understands VFS (see wxFileSystem::FindFirst). */ bool Load(const wxString& filemask); @@ -189,7 +199,7 @@ public: @code MyDialog dlg; - wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog"); dlg.ShowModal(); @endcode */ @@ -371,7 +381,7 @@ protected: /** Creates an animation (see wxAnimation) from the filename specified in @a param. */ - wxAnimation GetAnimation(const wxString& param = wxT("animation")); + wxAnimation GetAnimation(const wxString& param = "animation"); /** Gets a bitmap. @@ -447,7 +457,7 @@ protected: /** Gets the position (may be in dialog units). */ - wxPoint GetPosition(const wxString& param = wxT("pos")); + wxPoint GetPosition(const wxString& param = "pos"); /** Gets the size (may be in dialog units). @@ -458,7 +468,7 @@ protected: Gets style flags from text in form "flag | flag2| flag3 |..." Only understands flags added with AddStyle(). */ - int GetStyle(const wxString& param = wxT("style"), int defaults = 0); + int GetStyle(const wxString& param = "style", int defaults = 0); /** Gets text from param and does some conversions: