1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: palette.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Created: 01/02/97
|
|
|
|
// 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
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
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
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_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
|
|
|
{
|
|
|
|
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 );
|
2004-12-08 12:43:18 -05:00
|
|
|
virtual bool Ok() 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);
|
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
|
|
|
|
};
|
|
|
|
|
2001-04-22 18:24:37 -04:00
|
|
|
#endif // __WX_PALETTEG_H__
|