The class holds XML resources from one or more .xml files, binary files or zip
archive files.
+ 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}
@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.
/**
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);
@code
MyDialog dlg;
- wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog");
+ wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog");
dlg.ShowModal();
@endcode
*/
/**
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.
/**
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).
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: