X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72045d5768a126191a907bc640c28e81a11afdd6..4e2251ecd324ba89c486434485efcb1d32ee7dca:/include/wx/animate.h diff --git a/include/wx/animate.h b/include/wx/animate.h index 5d2772fec5..5a0a5ad632 100644 --- a/include/wx/animate.h +++ b/include/wx/animate.h @@ -16,27 +16,22 @@ #if wxUSE_ANIMATIONCTRL -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "wx/animdecod.h" +#include "wx/control.h" +#include "wx/timer.h" +#include "wx/bitmap.h" class WXDLLIMPEXP_ADV wxAnimation; -extern WXDLLEXPORT_DATA(wxAnimation) wxNullAnimation; -extern WXDLLEXPORT_DATA(const wxChar) wxAnimationCtrlNameStr[]; +extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation; +extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[]; // ---------------------------------------------------------------------------- // wxAnimationBase // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxAnimationBase : public wxGDIObject +class WXDLLIMPEXP_ADV wxAnimationBase : public wxGDIObject { public: wxAnimationBase() {} @@ -70,7 +65,6 @@ protected: // auto-resizes by default to fit the new animation when SetAnimation() is called #define wxAC_DEFAULT_STYLE (wxNO_BORDER) - class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl { public: @@ -88,6 +82,26 @@ public: // public API virtual bool IsPlaying() const = 0; + virtual void SetInactiveBitmap(const wxBitmap &bmp); + + // always return the original bitmap set in this control + wxBitmap GetInactiveBitmap() const + { return m_bmpStatic; } + +protected: + // the inactive bitmap as it was set by the user + wxBitmap m_bmpStatic; + + // the inactive bitmap currently shown in the control + // (may differ in the size from m_bmpStatic) + wxBitmap m_bmpStaticReal; + + // updates m_bmpStaticReal from m_bmpStatic if needed + virtual void UpdateStaticImage(); + + // called by SetInactiveBitmap + virtual void DisplayStaticImage() = 0; + private: DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase) }; @@ -97,7 +111,7 @@ private: // include the platform-specific version of the wxAnimationCtrl class // ---------------------------------------------------------------------------- -#if defined(__WXGTK__) +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #include "wx/gtk/animate.h" #else #include "wx/generic/animate.h"