1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: palette.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Created: 01/02/97
|
|
|
|
// Id:
|
2003-03-17 10:34:04 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
2001-04-22 22:24:37 +00:00
|
|
|
#ifndef __WX_PALETTEG_H__
|
|
|
|
#define __WX_PALETTEG_H__
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxPalette;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPalette
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPalette)
|
|
|
|
|
|
|
|
public:
|
1998-12-09 17:30:17 +00:00
|
|
|
|
|
|
|
wxPalette();
|
1998-07-04 15:17:59 +00:00
|
|
|
wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue );
|
1998-05-20 14:01:55 +00:00
|
|
|
wxPalette( const wxPalette& palette );
|
1998-12-09 17:30:17 +00:00
|
|
|
~wxPalette();
|
1998-05-20 14:01:55 +00:00
|
|
|
wxPalette& operator = ( const wxPalette& palette );
|
|
|
|
bool operator == ( const wxPalette& palette );
|
|
|
|
bool operator != ( const wxPalette& palette );
|
2004-12-08 17:43:18 +00:00
|
|
|
virtual bool Ok() const;
|
1998-12-09 17:30:17 +00:00
|
|
|
|
1998-07-04 15:17:59 +00:00
|
|
|
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
1998-05-20 14:01:55 +00:00
|
|
|
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;
|
1998-07-04 15:17:59 +00:00
|
|
|
bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
// no data
|
|
|
|
};
|
|
|
|
|
2001-04-22 22:24:37 +00:00
|
|
|
#endif // __WX_PALETTEG_H__
|