added wxColourBase::Init() and use DEFINE_STD_WXCOLOUR_CONSTRUCTORS() in all ports now (patch 1851600)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-12-22 15:03:58 +00:00
parent c8d380be4d
commit 9ef6890f0b
12 changed files with 25 additions and 83 deletions

View File

@@ -24,25 +24,11 @@ class WXDLLEXPORT wxColour : public wxColourBase
public:
// constructors
// ------------
// default
wxColour() { Init(); }
// the other standard ones: notice that we can't use
// DEFINE_STD_WXCOLOUR_CONSTRUCTORS here because we need to call Init() to
// initialize m_cocoaNSColor and the macro doesn't do it
wxColour( ChannelType red, ChannelType green, ChannelType blue,
ChannelType alpha = wxALPHA_OPAQUE )
{ Init(); Set(red, green, blue, alpha); }
wxColour(unsigned long colRGB) { Init(); Set(colRGB); }
wxColour(const wxString& colourName) { Init(); Set(colourName); }
wxColour(const char *colourName) { Init(); Set(colourName); }
wxColour(const wchar_t *colourName) { Init(); Set(colourName); }
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
// initialization using existing NSColor
wxColour( WX_NSColor aColor );
// copy ctors and assignment operators
wxColour( const wxColour& col );
wxColour& operator = ( const wxColour& col );