1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-06 10:37:43 -04:00
|
|
|
// Name: wx/msw/palette.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: wxPalette class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-08-31 08:38:46 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_PALETTE_H_
|
|
|
|
#define _WX_PALETTE_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-12-15 12:54:20 -05:00
|
|
|
wxPalette() { }
|
|
|
|
wxPalette(int n,
|
|
|
|
unsigned char *red, unsigned char *green, unsigned char *blue)
|
|
|
|
{
|
|
|
|
Create(n, red, green, blue);
|
|
|
|
}
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2007-12-15 12:54:20 -05:00
|
|
|
bool Create(int n,
|
|
|
|
unsigned char *red, unsigned char *green, unsigned char *blue);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2006-09-23 05:35:09 -04:00
|
|
|
virtual int GetColoursCount() const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2007-12-15 12:54:20 -05:00
|
|
|
int
|
|
|
|
GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2007-12-15 12:54:20 -05:00
|
|
|
bool
|
|
|
|
GetRGB(int pixel,
|
|
|
|
unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2006-09-23 05:35:09 -04:00
|
|
|
// implemetation
|
2007-12-15 12:54:20 -05:00
|
|
|
WXHPALETTE GetHPALETTE() const;
|
2006-09-23 05:35:09 -04:00
|
|
|
void SetHPALETTE(WXHPALETTE pal);
|
2007-12-15 12:54:20 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
|
|
|
|
2006-09-23 05:35:09 -04:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPalette)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
2007-12-15 12:54:20 -05:00
|
|
|
#endif // _WX_PALETTE_H_
|