]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/palette.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / msw / palette.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/palette.h
3// Purpose: wxPalette class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// Copyright: (c) Julian Smart
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_PALETTE_H_
12#define _WX_PALETTE_H_
13
14#include "wx/gdiobj.h"
15
16class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
17{
18public:
19 wxPalette() { }
20 wxPalette(int n,
21 const unsigned char *red, const unsigned char *green, const unsigned char *blue)
22 {
23 Create(n, red, green, blue);
24 }
25
26 bool Create(int n,
27 const unsigned char *red, const unsigned char *green, const unsigned char *blue);
28
29 virtual int GetColoursCount() const;
30
31 int
32 GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
33
34 bool
35 GetRGB(int pixel,
36 unsigned char *red, unsigned char *green, unsigned char *blue) const;
37
38 // implemetation
39 WXHPALETTE GetHPALETTE() const;
40 void SetHPALETTE(WXHPALETTE pal);
41
42protected:
43 virtual wxGDIRefData *CreateGDIRefData() const;
44 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
45
46private:
47 DECLARE_DYNAMIC_CLASS(wxPalette)
48};
49
50#endif // _WX_PALETTE_H_