Make wxAnimationImpl private and get rid of wxAnimationImplType
Simplify and streamline animation classes relationship: wxAnimation is the only public class representing an animation and it can be created by both the native wxAnimationCtrl and wxGenericAnimationCtrl using the new public CreateAnimation() method. Replace wxAnimationImplType enum with more flexible type info based check.
This commit is contained in:
@@ -65,10 +65,8 @@ public: // public API
|
||||
|
||||
bool SetBackgroundColour( const wxColour &colour ) wxOVERRIDE;
|
||||
|
||||
static wxAnimationImpl* CreateAnimationImpl(wxAnimationImplType implType);
|
||||
|
||||
|
||||
protected:
|
||||
virtual wxAnimationImpl* DoCreateAnimationImpl() const wxOVERRIDE;
|
||||
|
||||
virtual void DisplayStaticImage() wxOVERRIDE;
|
||||
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#ifndef _WX_GTK_PRIVATE_ANIMATEH__
|
||||
#define _WX_GTK_PRIVATE_ANIMATEH__
|
||||
|
||||
#include "wx/private/animate.h"
|
||||
|
||||
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
|
||||
typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
|
||||
|
||||
@@ -28,12 +30,9 @@ public:
|
||||
: m_pixbuf(NULL) {}
|
||||
~wxAnimationGTKImpl() { UnRef(); }
|
||||
|
||||
|
||||
virtual wxAnimationImplType GetImplType() wxOVERRIDE
|
||||
{ return wxANIMATION_IMPL_TYPE_NATIVE; }
|
||||
|
||||
virtual bool IsOk() const wxOVERRIDE
|
||||
{ return m_pixbuf != NULL; }
|
||||
virtual bool IsCompatibleWith(wxClassInfo* ci) const wxOVERRIDE;
|
||||
|
||||
|
||||
// unfortunately GdkPixbufAnimation does not expose these info:
|
||||
|
Reference in New Issue
Block a user