]> git.saurik.com Git - wxWidgets.git/blob - src/qt/palette.cpp
Added lots of files. Enough now so that all wxHTML samples link.
[wxWidgets.git] / src / qt / palette.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: palette.cpp
3 // Purpose: wxPalette
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "palette.h"
14 #endif
15
16 #include "wx/palette.h"
17
18 #if !USE_SHARED_LIBRARIES
19 IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
20 #endif
21
22 /*
23 * Palette
24 *
25 */
26
27 wxPaletteRefData::wxPaletteRefData()
28 {
29 // TODO
30 }
31
32 wxPaletteRefData::~wxPaletteRefData()
33 {
34 // TODO
35 }
36
37 wxPalette::wxPalette()
38 {
39 }
40
41 wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
42 {
43 Create(n, red, green, blue);
44 }
45
46 wxPalette::~wxPalette()
47 {
48 }
49
50 bool wxPalette::FreeResource(bool force)
51 {
52 if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette)
53 {
54 DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette);
55 }
56 return TRUE;
57 }
58
59 bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
60 {
61 UnRef();
62
63 m_refData = new wxPaletteRefData;
64
65 // TODO
66
67 return FALSE;
68 }
69
70 int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
71 {
72 if ( !m_refData )
73 return FALSE;
74
75 // TODO
76 return FALSE;
77 }
78
79 bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
80 {
81 if ( !m_refData )
82 return FALSE;
83
84 if (index < 0 || index > 255)
85 return FALSE;
86
87 // TODO
88 return FALSE;
89 }
90
91