1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-05 16:22:44 +00:00
|
|
|
// Name: wx/gtk/colour.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 10:56:58 +00:00
|
|
|
// Id: $Id$
|
1998-10-24 17:12:05 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-08-30 05:55:56 +00:00
|
|
|
#ifndef _WX_GTK_COLOUR_H_
|
|
|
|
#define _WX_GTK_COLOUR_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxColour
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2006-04-24 14:52:23 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxColour : public wxColourBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1998-10-20 14:35:22 +00:00
|
|
|
public:
|
2005-10-05 16:22:44 +00:00
|
|
|
// constructors
|
|
|
|
// ------------
|
|
|
|
|
|
|
|
// default
|
2006-04-24 14:52:23 +00:00
|
|
|
wxColour() {}
|
|
|
|
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
|
2006-06-15 19:29:08 +00:00
|
|
|
wxColour(const GdkColor& gdkColor);
|
2002-08-05 18:04:08 +00:00
|
|
|
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxColour();
|
2002-02-04 18:01:21 +00:00
|
|
|
|
2006-10-08 21:56:55 +00:00
|
|
|
bool IsOk() const { return m_refData != NULL; }
|
2003-12-11 10:10:40 +00:00
|
|
|
|
2002-02-04 18:01:21 +00:00
|
|
|
bool operator == ( const wxColour& col ) const;
|
|
|
|
bool operator != ( const wxColour& col ) const { return !(*this == col); }
|
|
|
|
|
|
|
|
unsigned char Red() const;
|
|
|
|
unsigned char Green() const;
|
|
|
|
unsigned char Blue() const;
|
2006-10-03 16:45:33 +00:00
|
|
|
unsigned char Alpha() const;
|
2002-02-04 18:01:21 +00:00
|
|
|
|
|
|
|
// Implementation part
|
|
|
|
void CalcPixel( GdkColormap *cmap );
|
|
|
|
int GetPixel() const;
|
2006-06-15 19:29:08 +00:00
|
|
|
const GdkColor *GetColor() const;
|
1998-10-20 02:10:29 +00:00
|
|
|
|
1998-10-19 14:18:56 +00:00
|
|
|
protected:
|
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);
|
1998-10-19 14:18:56 +00:00
|
|
|
|
|
|
|
private:
|
2002-02-04 18:01:21 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxColour)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
1998-10-20 02:10:29 +00:00
|
|
|
|
2006-08-30 05:55:56 +00:00
|
|
|
#endif // _WX_GTK_COLOUR_H_
|