]>
Commit | Line | Data |
---|---|---|
7c78e7c7 RR |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: palette.cpp | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
6 | // Id: | |
7 | // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma implementation "palette.h" | |
14 | #endif | |
15 | ||
16 | #include "wx/palette.h" | |
17 | ||
18 | //----------------------------------------------------------------------------- | |
19 | // wxPalette | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
22 | class wxPaletteRefData: public wxObjectRefData | |
23 | { | |
24 | public: | |
25 | ||
26 | wxPaletteRefData(void); | |
27 | ~wxPaletteRefData(void); | |
28 | ||
29 | }; | |
30 | ||
31 | wxPaletteRefData::wxPaletteRefData(void) | |
32 | { | |
33 | }; | |
34 | ||
35 | wxPaletteRefData::~wxPaletteRefData(void) | |
36 | { | |
37 | }; | |
38 | ||
39 | //----------------------------------------------------------------------------- | |
40 | ||
41 | #define M_PALETTEDATA ((wxPaletteRefData *)m_refData) | |
42 | ||
43 | IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) | |
44 | ||
45 | wxPalette::wxPalette(void) | |
46 | { | |
47 | }; | |
48 | ||
49 | wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ) | |
50 | { | |
51 | m_refData = new wxPaletteRefData(); | |
52 | Create( n, red, green, blue ); | |
53 | }; | |
54 | ||
55 | wxPalette::wxPalette( const wxPalette& palette ) | |
56 | { | |
57 | Ref( palette ); | |
58 | }; | |
59 | ||
60 | wxPalette::wxPalette( const wxPalette* palette ) | |
61 | { | |
62 | UnRef(); | |
63 | if (palette) Ref( *palette ); | |
64 | }; | |
65 | ||
66 | wxPalette::~wxPalette(void) | |
67 | { | |
68 | }; | |
69 | ||
70 | wxPalette& wxPalette::operator = ( const wxPalette& palette ) | |
71 | { | |
72 | if (*this == palette) return (*this); | |
73 | Ref( palette ); | |
74 | return *this; | |
75 | }; | |
76 | ||
77 | bool wxPalette::operator == ( const wxPalette& palette ) | |
78 | { | |
79 | return m_refData == palette.m_refData; | |
80 | }; | |
81 | ||
82 | bool wxPalette::operator != ( const wxPalette& palette ) | |
83 | { | |
84 | return m_refData != palette.m_refData; | |
85 | }; | |
86 | ||
87 | bool wxPalette::Ok(void) const | |
88 | { | |
89 | return (m_refData); | |
90 | }; | |
91 | ||
92 | bool wxPalette::Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) | |
93 | { | |
94 | }; | |
95 | ||
96 | int wxPalette::GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const | |
97 | { | |
98 | }; | |
99 | ||
100 | bool wxPalette::GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const | |
101 | { | |
102 | }; | |
103 |