Add possibility to use generic version to the animation sample

Add menu item to switch to the generic version when using the sample on
a platform where a native version is available (i.e. wxGTK) in order to
allow testing it there easily.
This commit is contained in:
Vadim Zeitlin
2020-04-05 16:55:44 +02:00
parent d0371d75f7
commit fc3669b551
2 changed files with 80 additions and 53 deletions

View File

@@ -36,17 +36,20 @@ public:
void OnSetBgColor(wxCommandEvent& event);
void OnStop(wxCommandEvent& event);
#ifdef wxHAS_NATIVE_ANIMATIONCTRL
void OnUseGeneric(wxCommandEvent& event);
#endif // wxHAS_NATIVE_ANIMATIONCTRL
void OnUpdateUI(wxUpdateUIEvent& event);
#if wxUSE_FILEDLG
void OnOpen(wxCommandEvent& event);
#endif // wxUSE_FILEDLG
wxAnimationCtrl* GetAnimationCtrl() const { return m_animationCtrl; }
protected:
wxAnimationCtrl* m_animationCtrl;
private:
void RecreateAnimation(long style);
wxAnimationCtrlBase* m_animationCtrl;
wxDECLARE_EVENT_TABLE();
};