X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a8d8c5a515b44a03b412c3637c4072be9950387..8d0a7b563acf4bd7e75824ba2076a7ab4d81a650:/include/wx/xrc/xmlres.h diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 670373776d..2525bf733d 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -11,7 +11,7 @@ #ifndef _WX_XMLRES_H_ #define _WX_XMLRES_H_ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "xmlres.h" #endif @@ -291,13 +291,8 @@ private: // wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog"); // XRCCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value")); -#ifdef __WXDEBUG__ #define XRCCTRL(window, id, type) \ - (wxDynamicCast((window).FindWindow(XRCID(id)), type)) -#else -#define XRCCTRL(window, id, type) \ - ((type*)((window).FindWindow(XRCID(id)))) -#endif + (wxStaticCast((window).FindWindow(XRCID(id)), type)) // wxXmlResourceHandler is an abstract base class for resource handlers // capable of creating a control from an XML node. @@ -392,8 +387,11 @@ protected: // Gets a bool flag (1, t, yes, on, true are true, everything else is false). bool GetBool(const wxString& param, bool defaultv = false); - // Gets the integer value from the parameter. - long GetLong( const wxString& param, long defaultv = 0 ); + // Gets an integer value from the parameter. + long GetLong(const wxString& param, long defaultv = 0); + + // Gets a float value from the parameter. + float GetFloat(const wxString& param, float defaultv = 0); // Gets colour in HTML syntax (#RRGGBB). wxColour GetColour(const wxString& param);