]> git.saurik.com Git - wxWidgets.git/blame - src/qt/palette.cpp
Added more '#pragma implementation' for gcc.
[wxWidgets.git] / src / qt / palette.cpp
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: palette.cpp
01b2eeec
KB
3// Purpose: wxPalette
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
7c78e7c7
RR
12#ifdef __GNUG__
13#pragma implementation "palette.h"
14#endif
15
16#include "wx/palette.h"
17
01b2eeec 18IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
7c78e7c7 19
01b2eeec
KB
20/*
21 * Palette
22 *
23 */
7c78e7c7 24
01b2eeec 25wxPaletteRefData::wxPaletteRefData()
7c78e7c7 26{
01b2eeec
KB
27 // TODO
28}
7c78e7c7 29
01b2eeec
KB
30wxPaletteRefData::~wxPaletteRefData()
31{
32 // TODO
33}
7c78e7c7 34
01b2eeec 35wxPalette::wxPalette()
7c78e7c7 36{
01b2eeec 37}
7c78e7c7 38
01b2eeec 39wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
7c78e7c7 40{
01b2eeec
KB
41 Create(n, red, green, blue);
42}
7c78e7c7 43
01b2eeec 44wxPalette::~wxPalette()
7c78e7c7 45{
01b2eeec 46}
7c78e7c7 47
01b2eeec
KB
48bool 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
57bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
7c78e7c7
RR
58{
59 UnRef();
7c78e7c7 60
01b2eeec 61 m_refData = new wxPaletteRefData;
7c78e7c7 62
01b2eeec 63 // TODO
7c78e7c7 64
01b2eeec
KB
65 return FALSE;
66}
7c78e7c7 67
01b2eeec 68int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
7c78e7c7 69{
01b2eeec
KB
70 if ( !m_refData )
71 return FALSE;
7c78e7c7 72
01b2eeec
KB
73 // TODO
74 return FALSE;
75}
7c78e7c7 76
01b2eeec 77bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
7c78e7c7 78{
01b2eeec
KB
79 if ( !m_refData )
80 return FALSE;
7c78e7c7 81
01b2eeec
KB
82 if (index < 0 || index > 255)
83 return FALSE;
84
85 // TODO
86 return FALSE;
87}
7c78e7c7 88
7c78e7c7 89