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-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
|
|
|
|
2012-06-30 20:39:06 +00:00
|
|
|
#ifdef __WXGTK3__
|
|
|
|
typedef struct _GdkRGBA GdkRGBA;
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
// ------------
|
2006-04-24 14:52:23 +00:00
|
|
|
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
|
2006-06-15 19:29:08 +00:00
|
|
|
wxColour(const GdkColor& gdkColor);
|
2012-06-30 20:39:06 +00:00
|
|
|
#ifdef __WXGTK3__
|
|
|
|
wxColour(const GdkRGBA& gdkRGBA);
|
|
|
|
#endif
|
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
|
|
|
|
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-04 18:01:21 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
unsigned char Red() const wxOVERRIDE;
|
|
|
|
unsigned char Green() const wxOVERRIDE;
|
|
|
|
unsigned char Blue() const wxOVERRIDE;
|
|
|
|
unsigned char Alpha() const wxOVERRIDE;
|
2002-02-04 18:01:21 +00:00
|
|
|
|
|
|
|
// Implementation part
|
2012-06-30 20:39:06 +00:00
|
|
|
#ifdef __WXGTK3__
|
|
|
|
operator const GdkRGBA*() const;
|
|
|
|
#else
|
2002-02-04 18:01:21 +00:00
|
|
|
void CalcPixel( GdkColormap *cmap );
|
|
|
|
int GetPixel() const;
|
2012-06-30 20:39:06 +00:00
|
|
|
#endif
|
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
|
2014-03-30 00:02:23 +00:00
|
|
|
InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a) wxOVERRIDE;
|
2006-09-10 02:00:24 +00:00
|
|
|
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual bool FromString(const wxString& str) wxOVERRIDE;
|
1998-10-19 14:18:56 +00:00
|
|
|
|
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_
|