1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: palette.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Created: 01/02/97
|
|
|
|
// Id:
|
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
1998-12-09 12:30:17 -05: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
|
|
|
|
|
|
|
#ifdef __GNUG__
|
2001-04-22 18:24:37 -04:00
|
|
|
#pragma interface "paletteg.h"
|
1998-05-20 10:01:55 -04: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 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 );
|
1998-05-20 10:01:55 -04:00
|
|
|
wxPalette( const wxPalette& palette );
|
1998-12-09 12:30:17 -05:00
|
|
|
~wxPalette();
|
1998-05-20 10:01:55 -04:00
|
|
|
wxPalette& operator = ( const wxPalette& palette );
|
|
|
|
bool operator == ( const wxPalette& palette );
|
|
|
|
bool operator != ( const wxPalette& palette );
|
1998-12-09 12:30:17 -05:00
|
|
|
bool Ok() const;
|
|
|
|
|
1998-07-04 11:17:59 -04:00
|
|
|
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
1998-05-20 10:01:55 -04:00
|
|
|
int GetPixel( const unsigned char red, const unsigned char green, const 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;
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
// no data
|
|
|
|
};
|
|
|
|
|
|
|
|
#define wxColorMap wxPalette
|
|
|
|
#define wxColourMap wxPalette
|
|
|
|
|
2001-04-22 18:24:37 -04:00
|
|
|
#endif // __WX_PALETTEG_H__
|