// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
-// Copyright: (c) Julian Smart and Markus Holzem
+// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __COLOURH__
-#define __COLOURH__
+#ifndef _WX_COLOUR_H_
+#define _WX_COLOUR_H_
#ifdef __GNUG__
#pragma interface "colour.h"
public:
wxColour(void);
wxColour(const unsigned char r, const unsigned char g, const unsigned char b);
+ wxColour(unsigned long colRGB) { Set(colRGB); }
wxColour(const wxColour& col);
wxColour(const wxString& col);
~wxColour(void) ;
inline int Ok(void) const { return (m_isInit) ; }
void Set(unsigned char r, unsigned char g, unsigned char b);
+ void Set(unsigned long colRGB)
+ {
+ // we don't need to know sizeof(long) here because we assume that the three
+ // least significant bytes contain the R, G and B values
+ Set((unsigned char)colRGB,
+ (unsigned char)(colRGB >> 8),
+ (unsigned char)(colRGB >> 16));
+ }
// Let's remove this inelegant function
#if WXWIN_COMPATIBILITY
#define wxColor wxColour
#endif
- // __COLOURH__
+ // _WX_COLOUR_H_