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
|
1998-12-09 17:30:17 +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
|
|
|
|
2002-08-31 11:29:13 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2001-04-22 22:24:37 +00:00
|
|
|
#pragma interface "paletteg.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxPalette;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPalette
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxPalette: public wxGDIObject
|
|
|
|
{
|
|
|
|
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 );
|
1998-12-09 17:30:17 +00:00
|
|
|
bool Ok() const;
|
|
|
|
|
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
|
|
|
|
};
|
|
|
|
|
|
|
|
#define wxColorMap wxPalette
|
|
|
|
#define wxColourMap wxPalette
|
|
|
|
|
2001-04-22 22:24:37 +00:00
|
|
|
#endif // __WX_PALETTEG_H__
|