added default value argument to wxXmlResourceHandler::GetColour()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2006-07-15 15:32:57 +00:00
parent 374caf2301
commit 984f1d84fd
3 changed files with 7 additions and 3 deletions

View File

@ -108,7 +108,7 @@ Gets a bool flag (1, t, yes, on, true are true, everything else is false).
\membersection{wxXmlResourceHandler::GetColour}\label{wxxmlresourcehandlergetcolour}
\func{wxColour}{GetColour}{\param{const wxString\& }{param}}
\func{wxColour}{GetColour}{\param{const wxString\& }{param}, \param{const wxColour\& }{default = wxNullColour}}
Gets colour in HTML syntax (\#RRGGBB).

View File

@ -415,7 +415,7 @@ protected:
float GetFloat(const wxString& param, float defaultv = 0);
// Gets colour in HTML syntax (#RRGGBB).
wxColour GetColour(const wxString& param);
wxColour GetColour(const wxString& param, const wxColour& defaultv = wxNullColour);
// Gets the size (may be in dialog units).
wxSize GetSize(const wxString& param = wxT("size"),

View File

@ -1042,9 +1042,13 @@ static wxColour GetSystemColour(const wxString& name)
return wxNullColour;
}
wxColour wxXmlResourceHandler::GetColour(const wxString& param)
wxColour wxXmlResourceHandler::GetColour(const wxString& param, const wxColour& defaultv)
{
wxString v = GetParamValue(param);
if ( v.empty() )
return defaultv;
wxColour clr;
// wxString -> wxColour conversion