X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..cbc9145c04bd3ea0a228906c8363fa8f47e3acf9:/src/generic/paletteg.cpp diff --git a/src/generic/paletteg.cpp b/src/generic/paletteg.cpp index 741a78893a..87945ca274 100644 --- a/src/generic/paletteg.cpp +++ b/src/generic/paletteg.cpp @@ -80,11 +80,19 @@ bool wxPalette::operator != (const wxPalette& palette) const return m_refData != palette.m_refData; } -bool wxPalette::Ok(void) const +bool wxPalette::Ok() const { return (m_refData != NULL); } +int wxPalette::GetColoursCount() const +{ + if (m_refData) + return M_PALETTEDATA->m_count; + + return 0; +} + bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green,