]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
88ef3a57 | 2 | // Name: wx/generic/paletteg.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
88ef3a57 | 6 | // RCS-ID: $Id$ |
371a5b4e | 7 | // Copyright: (c) 1998 Robert Roebling and Julian Smart |
65571936 | 8 | // Licence: wxWindows licence |
c801d85f KB |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | ||
ce113d5f VS |
12 | #ifndef __WX_PALETTEG_H__ |
13 | #define __WX_PALETTEG_H__ | |
c801d85f | 14 | |
c801d85f KB |
15 | #include "wx/defs.h" |
16 | #include "wx/object.h" | |
17 | #include "wx/gdiobj.h" | |
18 | #include "wx/gdicmn.h" | |
19 | ||
20 | //----------------------------------------------------------------------------- | |
21 | // classes | |
22 | //----------------------------------------------------------------------------- | |
23 | ||
20123d49 | 24 | class WXDLLIMPEXP_CORE wxPalette; |
c801d85f KB |
25 | |
26 | //----------------------------------------------------------------------------- | |
27 | // wxPalette | |
28 | //----------------------------------------------------------------------------- | |
29 | ||
20123d49 | 30 | class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase |
c801d85f | 31 | { |
d72f87f6 | 32 | public: |
8bbe427f | 33 | wxPalette(); |
debe6624 | 34 | wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); |
d3c7fc99 | 35 | virtual ~wxPalette(); |
fbfb8bcc VZ |
36 | bool operator == ( const wxPalette& palette ) const; |
37 | bool operator != ( const wxPalette& palette ) const; | |
b7cacb43 VZ |
38 | virtual bool Ok() const { return IsOk(); } |
39 | virtual bool IsOk() const; | |
8bbe427f | 40 | |
debe6624 | 41 | bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); |
88ef3a57 | 42 | int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const; |
debe6624 JS |
43 | bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; |
44 | ||
5cfbc8d0 | 45 | virtual int GetColoursCount() const; |
d72f87f6 RR |
46 | |
47 | private: | |
48 | DECLARE_DYNAMIC_CLASS(wxPalette) | |
c801d85f KB |
49 | }; |
50 | ||
ce113d5f | 51 | #endif // __WX_PALETTEG_H__ |