]>
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 | |
bbcdf8bc | 7 | // Copyright: (c) Julian Smart |
078cf5cb | 8 | // Licence: wxWindows licence |
2bda0e17 KB |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
bbcdf8bc JS |
11 | #ifndef _WX_PALETTE_H_ |
12 | #define _WX_PALETTE_H_ | |
2bda0e17 | 13 | |
2bda0e17 KB |
14 | #include "wx/gdiobj.h" |
15 | ||
53a2db12 | 16 | class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase |
2bda0e17 | 17 | { |
2bda0e17 | 18 | public: |
8f884a0d VZ |
19 | wxPalette() { } |
20 | wxPalette(int n, | |
913ce299 | 21 | const unsigned char *red, const unsigned char *green, const unsigned char *blue) |
8f884a0d VZ |
22 | { |
23 | Create(n, red, green, blue); | |
24 | } | |
2bda0e17 | 25 | |
8f884a0d | 26 | bool Create(int n, |
913ce299 | 27 | const unsigned char *red, const unsigned char *green, const unsigned char *blue); |
2bda0e17 | 28 | |
5633b968 | 29 | virtual int GetColoursCount() const; |
2bda0e17 | 30 | |
8f884a0d VZ |
31 | int |
32 | GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; | |
2bda0e17 | 33 | |
8f884a0d VZ |
34 | bool |
35 | GetRGB(int pixel, | |
36 | unsigned char *red, unsigned char *green, unsigned char *blue) const; | |
2bda0e17 | 37 | |
5633b968 | 38 | // implemetation |
8f884a0d | 39 | WXHPALETTE GetHPALETTE() const; |
5633b968 | 40 | void SetHPALETTE(WXHPALETTE pal); |
8f884a0d VZ |
41 | |
42 | protected: | |
43 | virtual wxGDIRefData *CreateGDIRefData() const; | |
44 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
45 | ||
5633b968 RR |
46 | private: |
47 | DECLARE_DYNAMIC_CLASS(wxPalette) | |
2bda0e17 KB |
48 | }; |
49 | ||
8f884a0d | 50 | #endif // _WX_PALETTE_H_ |