2002-02-05 16:34:33 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-05 16:22:44 +00:00
|
|
|
// Name: wx/x11/colour.h
|
2002-02-05 16:34:33 +00:00
|
|
|
// Purpose: wxColour class
|
2002-02-11 20:41:24 +00:00
|
|
|
// Author: Julian Smart, Robert Roebling
|
2002-02-05 16:34:33 +00:00
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
2002-02-11 20:41:24 +00:00
|
|
|
// Copyright: (c) Julian Smart, Robert Roebling
|
2005-10-05 16:22:44 +00:00
|
|
|
// Licence: wxWindows licence
|
2002-02-05 16:34:33 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_COLOUR_H_
|
|
|
|
#define _WX_COLOUR_H_
|
|
|
|
|
2002-02-11 20:41:24 +00:00
|
|
|
#include "wx/defs.h"
|
2002-02-05 16:34:33 +00:00
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/string.h"
|
2002-02-11 20:41:24 +00:00
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/palette.h"
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2002-02-11 20:41:24 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxDC;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPaintDC;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
2002-02-11 20:41:24 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxColour;
|
2002-02-11 20:41:24 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxColour
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxColour : public wxColourBase
|
2002-02-05 16:34:33 +00:00
|
|
|
{
|
|
|
|
public:
|
2005-10-05 16:22:44 +00:00
|
|
|
// constructors
|
|
|
|
// ------------
|
2006-04-24 14:52:23 +00:00
|
|
|
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
|
2003-10-18 23:51:01 +00:00
|
|
|
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxColour();
|
2002-02-11 20:41:24 +00:00
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
bool operator==(const wxColour& col) const;
|
|
|
|
bool operator!=(const wxColour& col) const { return !(*this == col); }
|
2002-02-11 20:41:24 +00:00
|
|
|
|
|
|
|
unsigned char Red() const;
|
|
|
|
unsigned char Green() const;
|
|
|
|
unsigned char Blue() const;
|
|
|
|
|
|
|
|
// Implementation part
|
2003-12-11 10:10:40 +00:00
|
|
|
|
2002-02-11 20:41:24 +00:00
|
|
|
void CalcPixel( WXColormap cmap );
|
|
|
|
unsigned long GetPixel() const;
|
|
|
|
WXColor *GetColor() const;
|
|
|
|
|
|
|
|
protected:
|
2007-12-15 17:54:20 +00:00
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
2003-12-11 10:10:40 +00:00
|
|
|
|
2006-09-10 02:00:24 +00:00
|
|
|
virtual void
|
|
|
|
InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
|
|
|
|
2007-05-30 10:29:12 +00:00
|
|
|
virtual bool FromString(const wxString& str);
|
2002-02-11 20:41:24 +00:00
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
private:
|
2002-02-11 20:41:24 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxColour)
|
2002-02-05 16:34:33 +00:00
|
|
|
};
|
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
#endif // _WX_COLOUR_H_
|