X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0ed460c2e7802793d591c84f3cfdbff159c5549..d471bb2d4c029e0f9a47e191fa28a56a5588f75e:/include/wx/msw/palette.h diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h index 4383c44a3f..73d5df709e 100644 --- a/include/wx/msw/palette.h +++ b/include/wx/msw/palette.h @@ -6,13 +6,13 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PALETTE_H_ #define _WX_PALETTE_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "palette.h" #endif @@ -32,13 +32,13 @@ protected: #define M_PALETTEDATA ((wxPaletteRefData *)m_refData) -class WXDLLEXPORT wxPalette: public wxGDIObject +class WXDLLEXPORT wxPalette: public wxPaletteBase { DECLARE_DYNAMIC_CLASS(wxPalette) public: wxPalette(void); - inline wxPalette(const wxPalette& palette) { Ref(palette); } + inline wxPalette(const wxPalette& palette) : wxPaletteBase(palette) { Ref(palette); } wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); ~wxPalette(void); @@ -49,17 +49,14 @@ public: virtual bool Ok(void) const { return (m_refData != NULL) ; } inline wxPalette& operator = (const wxPalette& palette) { if (*this == palette) return (*this); Ref(palette); return *this; } - inline bool operator == (const wxPalette& palette) { return m_refData == palette.m_refData; } - inline bool operator != (const wxPalette& palette) { return m_refData != palette.m_refData; } + inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; } + inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; } - virtual bool FreeResource(bool force = FALSE); + virtual bool FreeResource(bool force = false); inline WXHPALETTE GetHPALETTE(void) const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); } void SetHPALETTE(WXHPALETTE pal); }; -#define wxColorMap wxPalette -#define wxColourMap wxPalette - #endif // _WX_PALETTE_H_