]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////////// |
88ef3a57 | 2 | // Name: wx/msw/palette.h |
2bda0e17 KB |
3 | // Purpose: wxPalette class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
078cf5cb | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_PALETTE_H_ |
13 | #define _WX_PALETTE_H_ | |
2bda0e17 | 14 | |
2bda0e17 KB |
15 | #include "wx/gdiobj.h" |
16 | ||
53a2db12 | 17 | class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase |
2bda0e17 | 18 | { |
2bda0e17 | 19 | public: |
8f884a0d VZ |
20 | wxPalette() { } |
21 | wxPalette(int n, | |
22 | unsigned char *red, unsigned char *green, unsigned char *blue) | |
23 | { | |
24 | Create(n, red, green, blue); | |
25 | } | |
2bda0e17 | 26 | |
8f884a0d VZ |
27 | bool Create(int n, |
28 | unsigned char *red, unsigned char *green, unsigned char *blue); | |
2bda0e17 | 29 | |
5633b968 | 30 | virtual int GetColoursCount() const; |
2bda0e17 | 31 | |
8f884a0d VZ |
32 | int |
33 | GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; | |
2bda0e17 | 34 | |
8f884a0d VZ |
35 | bool |
36 | GetRGB(int pixel, | |
37 | unsigned char *red, unsigned char *green, unsigned char *blue) const; | |
2bda0e17 | 38 | |
5633b968 | 39 | // implemetation |
8f884a0d | 40 | WXHPALETTE GetHPALETTE() const; |
5633b968 | 41 | void SetHPALETTE(WXHPALETTE pal); |
8f884a0d VZ |
42 | |
43 | protected: | |
44 | virtual wxGDIRefData *CreateGDIRefData() const; | |
45 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
46 | ||
5633b968 RR |
47 | private: |
48 | DECLARE_DYNAMIC_CLASS(wxPalette) | |
2bda0e17 KB |
49 | }; |
50 | ||
8f884a0d | 51 | #endif // _WX_PALETTE_H_ |