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