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