1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        wx/generic/paletteg.h
3 // Purpose:
4 // Author:      Robert Roebling
5 // Created:     01/02/97
6 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
7 // Licence:     wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9 
10 
11 #ifndef __WX_PALETTEG_H__
12 #define __WX_PALETTEG_H__
13 
14 #include "wx/defs.h"
15 #include "wx/object.h"
16 #include "wx/gdiobj.h"
17 #include "wx/gdicmn.h"
18 
19 //-----------------------------------------------------------------------------
20 // classes
21 //-----------------------------------------------------------------------------
22 
23 class WXDLLIMPEXP_FWD_CORE wxPalette;
24 
25 //-----------------------------------------------------------------------------
26 // wxPalette
27 //-----------------------------------------------------------------------------
28 
29 class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase
30 {
31 public:
32     wxPalette();
33     wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
34     virtual ~wxPalette();
35 
36     bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
37     int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const;
38     bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
39 
40     virtual int GetColoursCount() const wxOVERRIDE;
41 
42 protected:
43     virtual wxGDIRefData *CreateGDIRefData() const wxOVERRIDE;
44     virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const wxOVERRIDE;
45 
46 private:
47     wxDECLARE_DYNAMIC_CLASS(wxPalette);
48 };
49 
50 #endif // __WX_PALETTEG_H__
51