palette.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/palette.h
  3. // Purpose: wxPalette class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 1998-01-01
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_PALETTE_H_
  11. #define _WX_PALETTE_H_
  12. #include "wx/gdiobj.h"
  13. #define M_PALETTEDATA ((wxPaletteRefData *)m_refData)
  14. class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
  15. {
  16. public:
  17. wxPalette();
  18. wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
  19. virtual ~wxPalette();
  20. bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
  21. int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
  22. bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
  23. virtual int GetColoursCount() const;
  24. protected:
  25. virtual wxGDIRefData *CreateGDIRefData() const;
  26. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  27. private:
  28. DECLARE_DYNAMIC_CLASS(wxPalette)
  29. };
  30. #endif // _WX_PALETTE_H_