1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-23 02:28:01 +00:00
|
|
|
// Name: wx/gtk1/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
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKCOLOURH__
|
|
|
|
#define __GTKCOLOURH__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/string.h"
|
|
|
|
#include "wx/gdiobj.h"
|
1998-07-11 09:53:58 +00:00
|
|
|
#include "wx/palette.h"
|
1998-05-20 14:01:55 +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;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxColour;
|
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
|
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-05-30 10:29:12 +00:00
|
|
|
virtual bool FromString(const wxString& str);
|
2006-04-24 14:52:23 +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
|
|
|
|
|
|
|
unsigned char Red() const;
|
|
|
|
unsigned char Green() const;
|
|
|
|
unsigned char Blue() const;
|
|
|
|
|
|
|
|
|
|
|
|
// Implementation part
|
|
|
|
void CalcPixel( GdkColormap *cmap );
|
|
|
|
int GetPixel() const;
|
|
|
|
GdkColor *GetColor() const;
|
1998-10-20 02:10:29 +00:00
|
|
|
|
1998-10-19 14:18:56 +00:00
|
|
|
protected:
|
2002-02-04 18:01:21 +00:00
|
|
|
// ref counting code
|
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);
|
1998-10-19 14:18:56 +00:00
|
|
|
|
|
|
|
private:
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxColour);
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
1998-10-20 02:10:29 +00:00
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif // __GTKCOLOURH__
|