diff --git a/include/wx/animate.h b/include/wx/animate.h index 00c22602dc..c04a884670 100644 --- a/include/wx/animate.h +++ b/include/wx/animate.h @@ -129,7 +129,7 @@ private: #if defined(__WXGTK20__) #include "wx/generic/animate.h" #include "wx/gtk/animate.h" -#else +#else #include "wx/generic/animate.h" class WXDLLIMPEXP_ADV wxAnimation : public wxGenericAnimation @@ -147,8 +147,8 @@ private: class WXDLLIMPEXP_ADV wxAnimationCtrl : public wxGenericAnimationCtrl { - public: - wxAnimationCtrl() + public: + wxAnimationCtrl() : wxGenericAnimationCtrl() {} wxAnimationCtrl(wxWindow *parent, @@ -173,7 +173,7 @@ private: { wxGenericAnimationCtrl::SetAnimation(anim); } virtual wxAnimation GetAnimation() const { return wxAnimation(m_animation) ; } - + private: wxDECLARE_DYNAMIC_CLASS(wxAnimationCtrl); }; diff --git a/include/wx/generic/animate.h b/include/wx/generic/animate.h index 73252e29ea..29a87ae4cc 100644 --- a/include/wx/generic/animate.h +++ b/include/wx/generic/animate.h @@ -24,7 +24,7 @@ public: wxGenericAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY) { LoadFile(name, type); } - virtual bool IsOk() const + virtual bool IsOk() const { return m_refData != NULL; } virtual unsigned int GetFrameCount() const wxOVERRIDE; @@ -92,7 +92,7 @@ public: ~wxGenericAnimationCtrl(); - + public: virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; @@ -103,7 +103,7 @@ public: virtual bool IsPlaying() const wxOVERRIDE { return m_isPlaying; } - void SetAnimation(const wxGenericAnimation &animation); + void SetAnimation(const wxGenericAnimation &animation); wxGenericAnimation GetAnimation() const { return m_animation; } diff --git a/include/wx/gtk/animate.h b/include/wx/gtk/animate.h index a68a3e1b24..e7e277a34a 100644 --- a/include/wx/gtk/animate.h +++ b/include/wx/gtk/animate.h @@ -48,7 +48,7 @@ public: // unfortunately GdkPixbufAnimation does not expose these info: - virtual unsigned int GetFrameCount() const wxOVERRIDE + virtual unsigned int GetFrameCount() const wxOVERRIDE { return 0; } virtual wxImage GetFrame(unsigned int WXUNUSED(frame)) const wxOVERRIDE { return wxNullImage; } diff --git a/interface/wx/animate.h b/interface/wx/animate.h index 1ed928846f..0acc5db8f5 100644 --- a/interface/wx/animate.h +++ b/interface/wx/animate.h @@ -179,7 +179,7 @@ public: /** Specify whether the animation's background colour is to be shown (the default), or whether the window background should show through - + @note This method is only available when using the generic version of @c wxAnimation and @c wxAnimationCtrl. */ @@ -195,7 +195,7 @@ public: /** This overload of Play() lets you specify if the animation must loop or not - + @note This method is only available when using the generic version of @c wxAnimation and @c wxAnimationCtrl. */ @@ -210,7 +210,7 @@ public: */ void DrawCurrentFrame(wxDC& dc); - + /** Returns a wxBitmap with the current frame drawn in it. @@ -225,13 +225,13 @@ public: @class wxAnimationCtrl If the platform supports a native animation control (currently just wxGTK) - then this class implements the control via the native widget. + then this class implements the control via the native widget. Otherwise it is virtually the same as @c wxGenericAnimationCtrl. */ class wxAnimationCtrl : public wxGenericAnimationCtrl { -public: +public: wxAnimationCtrl(); wxAnimationCtrl(wxWindow *parent, wxWindowID id, @@ -486,7 +486,7 @@ public: virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const; virtual wxColour GetTransparentColour(unsigned int frame) const; virtual wxColour GetBackgroundColour() const; - + }; diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index 57fbddde5f..787beae25a 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -14,8 +14,7 @@ #pragma hdrstop #endif //__BORLANDC__ -#if wxUSE_ANIMATIONCTRL - +#if wxUSE_ANIMATIONCTRL #include "wx/animate.h" #ifndef WX_PRECOMP @@ -332,7 +331,7 @@ wxSize wxGenericAnimationCtrl::DoGetBestSize() const void wxGenericAnimationCtrl::SetAnimation(const wxGenericAnimation& animation) { if (IsPlaying()) - Stop(); + Stop(); // set new animation even if it's wxNullAnimation m_animation = animation;