1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-06 10:37:43 -04:00
|
|
|
// Name: wx/generic/paletteg.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Created: 01/02/97
|
2005-10-06 10:37:43 -04:00
|
|
|
// RCS-ID: $Id$
|
2003-03-17 05:34:04 -05:00
|
|
|
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
2001-04-22 18:24:37 -04:00
|
|
|
#ifndef __WX_PALETTEG_H__
|
|
|
|
#define __WX_PALETTEG_H__
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPalette;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPalette
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
2006-09-23 05:54:11 -04:00
|
|
|
public:
|
1998-12-09 12:30:17 -05:00
|
|
|
wxPalette();
|
1998-07-04 11:17:59 -04:00
|
|
|
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxPalette();
|
2006-10-08 17:56:55 -04:00
|
|
|
virtual bool Ok() const { return IsOk(); }
|
|
|
|
virtual bool IsOk() const;
|
1998-12-09 12:30:17 -05:00
|
|
|
|
1998-07-04 11:17:59 -04:00
|
|
|
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
2005-10-06 10:37:43 -04:00
|
|
|
int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const;
|
1998-07-04 11:17:59 -04:00
|
|
|
bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
|
|
|
|
|
2006-09-23 06:01:05 -04:00
|
|
|
virtual int GetColoursCount() const;
|
2006-09-23 05:54:11 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPalette)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
2001-04-22 18:24:37 -04:00
|
|
|
#endif // __WX_PALETTEG_H__
|