changed wxColourData::GetCustomColour to const; there's no reason for it to be non-const; fixed wxColourData iface header

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-09-24 17:57:18 +00:00
parent d86901f9f4
commit d62c1e628d
3 changed files with 12 additions and 7 deletions

View File

@@ -46,10 +46,10 @@ public:
const wxColour& GetColour() const { return m_dataColour; } const wxColour& GetColour() const { return m_dataColour; }
wxColour& GetColour() { return m_dataColour; } wxColour& GetColour() { return m_dataColour; }
// These functions modify colours in an internal array of NUM_CUSTOM custom // SetCustomColour() modifies colours in an internal array of NUM_CUSTOM
// colours // custom colours;
void SetCustomColour(int i, const wxColour& colour); void SetCustomColour(int i, const wxColour& colour);
wxColour GetCustomColour(int i); wxColour GetCustomColour(int i) const;
// Serialize the object to a string and restore it from it // Serialize the object to a string and restore it from it
wxString ToString() const; wxString ToString() const;

View File

@@ -393,7 +393,7 @@ public:
that the user has saved. The default custom colours are invalid that the user has saved. The default custom colours are invalid
colours. colours.
*/ */
wxColour& GetCustomColour(int i) const; wxColour GetCustomColour(int i) const;
/** /**
Under Windows, tells the Windows colour dialog to display the full Under Windows, tells the Windows colour dialog to display the full
@@ -424,6 +424,11 @@ public:
Assignment operator for the colour data. Assignment operator for the colour data.
*/ */
void operator =(const wxColourData& data); void operator =(const wxColourData& data);
/** @todo document these */
wxString wxColourData::ToString() const;
bool wxColourData::FromString(const wxString& str);
}; };

View File

@@ -92,7 +92,7 @@ void wxColourData::SetCustomColour(int i, const wxColour& colour)
m_custColours[i] = colour; m_custColours[i] = colour;
} }
wxColour wxColourData::GetCustomColour(int i) wxColour wxColourData::GetCustomColour(int i) const
{ {
wxCHECK_MSG( i >= 0 && i < NUM_CUSTOM, wxColour(0,0,0), wxCHECK_MSG( i >= 0 && i < NUM_CUSTOM, wxColour(0,0,0),
_T("custom colour index out of range") ); _T("custom colour index out of range") );