]>
Commit | Line | Data |
---|---|---|
8cf73271 | 1 | ///////////////////////////////////////////////////////////////////////////// |
88ef3a57 | 2 | // Name: wx/mac/carbon/palette.h |
8cf73271 SC |
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 | |
65571936 | 9 | // Licence: wxWindows licence |
8cf73271 SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_PALETTE_H_ | |
13 | #define _WX_PALETTE_H_ | |
14 | ||
8cf73271 SC |
15 | #include "wx/gdiobj.h" |
16 | ||
8cf73271 SC |
17 | #define M_PALETTEDATA ((wxPaletteRefData *)m_refData) |
18 | ||
8f884a0d | 19 | class WXDLLEXPORT wxPalette : public wxPaletteBase |
8cf73271 | 20 | { |
8cf73271 | 21 | public: |
df816ad9 | 22 | wxPalette(); |
8cf73271 | 23 | |
df816ad9 RR |
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); | |
8f884a0d | 27 | |
df816ad9 RR |
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; | |
8cf73271 | 30 | |
df816ad9 | 31 | virtual int GetColoursCount() const; |
8f884a0d VZ |
32 | |
33 | protected: | |
34 | virtual wxGDIRefData *CreateGDIRefData() const; | |
35 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
36 | ||
df816ad9 RR |
37 | private: |
38 | DECLARE_DYNAMIC_CLASS(wxPalette) | |
8cf73271 SC |
39 | }; |
40 | ||
8f884a0d | 41 | #endif // _WX_PALETTE_H_ |