2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-06 10:37:43 -04:00
|
|
|
// Name: wx/mgl/palette.h
|
2001-06-26 17:05:06 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Created: 2001/03/11
|
|
|
|
// Id: $Id$
|
2002-02-14 15:30:34 -05:00
|
|
|
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_PALETTE_H__
|
|
|
|
#define __WX_PALETTE_H__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxPalette;
|
|
|
|
struct palette_t;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPalette
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2004-12-08 12:43:18 -05:00
|
|
|
class WXDLLEXPORT wxPalette: public wxPaletteBase
|
2001-06-26 17:05:06 -04:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPalette)
|
|
|
|
|
|
|
|
public:
|
|
|
|
wxPalette();
|
|
|
|
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;
|
2001-06-26 17:05:06 -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;
|
2001-06-26 17:05:06 -04:00
|
|
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
|
|
|
|
|
|
|
// implementation
|
2004-12-08 12:43:18 -05:00
|
|
|
virtual int GetColoursCount() const;
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
palette_t *GetMGLpalette_t() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __WX_PALETTE_H__
|