RGBColor is part of ApplicationServices also under Cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,14 +47,14 @@ public:
|
|||||||
CGColorRef GetCGColor() const { return m_cgColour; };
|
CGColorRef GetCGColor() const { return m_cgColour; };
|
||||||
CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); };
|
CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); };
|
||||||
|
|
||||||
#if wxOSX_USE_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
void GetRGBColor( RGBColor *col ) const;
|
void GetRGBColor( RGBColor *col ) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Mac-specific ctor and assignment operator from the native colour
|
// Mac-specific ctor and assignment operator from the native colour
|
||||||
// assumes ownership of CGColorRef
|
// assumes ownership of CGColorRef
|
||||||
wxColour( CGColorRef col );
|
wxColour( CGColorRef col );
|
||||||
#if wxOSX_USE_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
wxColour(const RGBColor& col);
|
wxColour(const RGBColor& col);
|
||||||
wxColour& operator=(const RGBColor& col);
|
wxColour& operator=(const RGBColor& col);
|
||||||
#endif
|
#endif
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
protected :
|
protected :
|
||||||
virtual void
|
virtual void
|
||||||
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a);
|
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a);
|
||||||
#if wxOSX_USE_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
void InitRGBColor( const RGBColor& col );
|
void InitRGBColor( const RGBColor& col );
|
||||||
#endif
|
#endif
|
||||||
void InitCGColorRef( CGColorRef col );
|
void InitCGColorRef( CGColorRef col );
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
|
||||||
|
|
||||||
#if wxOSX_USE_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
wxColour::wxColour(const RGBColor& col)
|
wxColour::wxColour(const RGBColor& col)
|
||||||
{
|
{
|
||||||
InitRGBColor(col);
|
InitRGBColor(col);
|
||||||
@@ -33,7 +33,7 @@ wxColour::wxColour(CGColorRef col)
|
|||||||
InitCGColorRef(col);
|
InitCGColorRef(col);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxOSX_USE_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
void wxColour::GetRGBColor( RGBColor *col ) const
|
void wxColour::GetRGBColor( RGBColor *col ) const
|
||||||
{
|
{
|
||||||
col->red = (m_red << 8) + m_red;
|
col->red = (m_red << 8) + m_red;
|
||||||
@@ -84,7 +84,7 @@ void wxColour::InitRGBA (ChannelType r, ChannelType g, ChannelType b, ChannelTyp
|
|||||||
m_cgColour.reset( col );
|
m_cgColour.reset( col );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxOSX_USE_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
void wxColour::InitRGBColor( const RGBColor& col )
|
void wxColour::InitRGBColor( const RGBColor& col )
|
||||||
{
|
{
|
||||||
m_red = col.red >> 8;
|
m_red = col.red >> 8;
|
||||||
|
Reference in New Issue
Block a user