]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/animate.h
Rewrite selection event code for wxListBox.
[wxWidgets.git] / include / wx / generic / animate.h
index 9a7b30f58b42fd0311037e392f5658f2a5e63703..f56056e5956087c88bb571f1a96687fb5cc3797f 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef _WX_GENERIC_ANIMATEH__
 #define _WX_GENERIC_ANIMATEH__
 
+#include "wx/bitmap.h"
+
 // ----------------------------------------------------------------------------
 // wxAnimation
 // ----------------------------------------------------------------------------
@@ -40,7 +42,9 @@ public:
 public:     // extended interface used by the generic implementation of wxAnimationCtrl
 
     wxPoint GetFramePosition(size_t frame) const;
+    wxSize GetFrameSize(size_t frame) const;
     wxAnimationDisposal GetDisposalMethod(size_t frame) const;
+    wxColour GetTransparentColour(size_t frame) const;
     wxColour GetBackgroundColour() const;
 
 protected:
@@ -66,7 +70,7 @@ public:
 class WXDLLIMPEXP_ADV wxAnimationCtrl: public wxAnimationCtrlBase
 {
 public:
-    wxAnimationCtrl();
+    wxAnimationCtrl() { Init(); }
     wxAnimationCtrl(wxWindow *parent,
             wxWindowID id,
             const wxAnimation& anim = wxNullAnimation,
@@ -75,9 +79,13 @@ public:
             long style = wxAC_DEFAULT_STYLE,
             const wxString& name = wxAnimationCtrlNameStr)
     {
+        Init();
+
         Create(parent, id, anim, pos, size, style, name);
     }
 
+    void Init();
+
     bool Create(wxWindow *parent, wxWindowID id,
                 const wxAnimation& anim = wxNullAnimation,
                 const wxPoint& pos = wxDefaultPosition,
@@ -100,6 +108,8 @@ public:
     wxAnimation GetAnimation() const
         { return m_animation; }
 
+    void SetInactiveBitmap(const wxBitmap &bmp);
+
 public:     // event handlers
 
     void OnPaint(wxPaintEvent& event);
@@ -132,10 +142,13 @@ protected:      // internal utilities
     void FitToAnimation();
 
     // Draw the background; use this when e.g. previous frame had wxANIM_TOBACKGROUND disposal.
+    void DisposeToBackground();
     void DisposeToBackground(wxDC& dc);
+    void DisposeToBackground(wxDC& dc, const wxPoint &pos, const wxSize &sz);
 
+    void UpdateBackingStoreWithStaticImage();
     void IncrementalUpdateBackingStore();
-    void RebuildBackingStoreUpToFrame(size_t);
+    bool RebuildBackingStoreUpToFrame(size_t);
     void DrawFrame(wxDC &dc, size_t);
 
     virtual wxSize DoGetBestSize() const;