Fix Ok/IsOk() mess in wxGDIObject-derived classes; also added
wxGDIObject::Create/CloneGDIRefData() and implemented them for (almost) all ports git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,9 +92,6 @@ public:
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const = 0;
|
||||
|
||||
virtual ChannelType Red() const = 0;
|
||||
virtual ChannelType Green() const = 0;
|
||||
virtual ChannelType Blue() const = 0;
|
||||
@@ -119,6 +116,23 @@ protected:
|
||||
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0;
|
||||
|
||||
virtual bool FromString(const wxString& s);
|
||||
|
||||
// wxColour doesn't use reference counted data (at least not in all ports)
|
||||
// so provide stubs for the functions which need to be defined if we do use
|
||||
// them
|
||||
virtual wxGDIRefData *CreateGDIRefData() const
|
||||
{
|
||||
wxFAIL_MSG( "must be overridden if used" );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const
|
||||
{
|
||||
wxFAIL_MSG( "must be overridden if used" );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user