]>
Commit | Line | Data |
---|---|---|
6762286d SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/mac/carbon/palette.h | |
3 | // Purpose: wxPalette class | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_PALETTE_H_ | |
13 | #define _WX_PALETTE_H_ | |
14 | ||
15 | #include "wx/gdiobj.h" | |
16 | ||
17 | #define M_PALETTEDATA ((wxPaletteRefData *)m_refData) | |
18 | ||
19 | class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase | |
20 | { | |
21 | public: | |
22 | wxPalette(); | |
23 | ||
24 | wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); | |
25 | virtual ~wxPalette(); | |
26 | bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); | |
27 | ||
28 | int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; | |
29 | bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; | |
30 | ||
31 | virtual int GetColoursCount() const; | |
32 | ||
33 | protected: | |
34 | virtual wxGDIRefData *CreateGDIRefData() const; | |
35 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
36 | ||
37 | private: | |
38 | DECLARE_DYNAMIC_CLASS(wxPalette) | |
39 | }; | |
40 | ||
41 | #endif // _WX_PALETTE_H_ |