]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: palette.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
6 | // 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 | |
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
ce113d5f | 16 | #pragma interface "paletteg.h" |
c801d85f KB |
17 | #endif |
18 | ||
19 | #include "wx/defs.h" | |
20 | #include "wx/object.h" | |
21 | #include "wx/gdiobj.h" | |
22 | #include "wx/gdicmn.h" | |
23 | ||
24 | //----------------------------------------------------------------------------- | |
25 | // classes | |
26 | //----------------------------------------------------------------------------- | |
27 | ||
28 | class wxPalette; | |
29 | ||
30 | //----------------------------------------------------------------------------- | |
31 | // wxPalette | |
32 | //----------------------------------------------------------------------------- | |
33 | ||
917be7ed | 34 | class wxPalette: public wxPaletteBase |
c801d85f KB |
35 | { |
36 | DECLARE_DYNAMIC_CLASS(wxPalette) | |
37 | ||
38 | public: | |
8bbe427f VZ |
39 | |
40 | wxPalette(); | |
debe6624 | 41 | wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); |
c801d85f | 42 | wxPalette( const wxPalette& palette ); |
8bbe427f | 43 | ~wxPalette(); |
c801d85f KB |
44 | wxPalette& operator = ( const wxPalette& palette ); |
45 | bool operator == ( const wxPalette& palette ); | |
46 | bool operator != ( const wxPalette& palette ); | |
917be7ed | 47 | virtual bool Ok() const; |
8bbe427f | 48 | |
debe6624 | 49 | bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); |
c801d85f | 50 | int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const; |
debe6624 JS |
51 | bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; |
52 | ||
c801d85f KB |
53 | // no data |
54 | }; | |
55 | ||
ce113d5f | 56 | #endif // __WX_PALETTEG_H__ |