]> git.saurik.com Git - wxWidgets.git/blob - src/qt/palette.cpp
Attempted to improve tip window behaviour, but kill focus still not working in wxGTK.
[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 IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
19
20 /*
21 * Palette
22 *
23 */
24
25 wxPaletteRefData::wxPaletteRefData()
26 {
27 // TODO
28 }
29
30 wxPaletteRefData::~wxPaletteRefData()
31 {
32 // TODO
33 }
34
35 wxPalette::wxPalette()
36 {
37 }
38
39 wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
40 {
41 Create(n, red, green, blue);
42 }
43
44 wxPalette::~wxPalette()
45 {
46 }
47
48 bool wxPalette::FreeResource(bool force)
49 {
50 if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette)
51 {
52 DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette);
53 }
54 return TRUE;
55 }
56
57 bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
58 {
59 UnRef();
60
61 m_refData = new wxPaletteRefData;
62
63 // TODO
64
65 return FALSE;
66 }
67
68 int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
69 {
70 if ( !m_refData )
71 return FALSE;
72
73 // TODO
74 return FALSE;
75 }
76
77 bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
78 {
79 if ( !m_refData )
80 return FALSE;
81
82 if (index < 0 || index > 255)
83 return FALSE;
84
85 // TODO
86 return FALSE;
87 }
88
89