2006-10-09 17:51:07 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: anitest.cpp
|
|
|
|
// Purpose: anitest sample
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 02/07/2001
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "wx/animate.h"
|
|
|
|
|
|
|
|
// Define a new application
|
|
|
|
class MyApp : public wxApp
|
|
|
|
{
|
|
|
|
public:
|
2018-03-06 22:12:19 +00:00
|
|
|
bool OnInit() wxOVERRIDE;
|
2006-10-09 17:51:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Define a new frame
|
|
|
|
class MyFrame : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
|
|
|
const wxPoint& pos, const wxSize& size, const long style);
|
|
|
|
~MyFrame();
|
|
|
|
|
|
|
|
void OnAbout(wxCommandEvent& event);
|
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
|
|
|
|
|
|
void OnPlay(wxCommandEvent& event);
|
2006-11-17 18:15:44 +00:00
|
|
|
void OnSetNullAnimation(wxCommandEvent& event);
|
|
|
|
void OnSetInactiveBitmap(wxCommandEvent& event);
|
|
|
|
void OnSetNoAutoResize(wxCommandEvent& event);
|
|
|
|
void OnSetBgColor(wxCommandEvent& event);
|
2006-10-09 17:51:07 +00:00
|
|
|
void OnStop(wxCommandEvent& event);
|
|
|
|
|
2020-04-05 14:55:44 +00:00
|
|
|
#ifdef wxHAS_NATIVE_ANIMATIONCTRL
|
|
|
|
void OnUseGeneric(wxCommandEvent& event);
|
|
|
|
#endif // wxHAS_NATIVE_ANIMATIONCTRL
|
|
|
|
|
2006-10-09 17:51:07 +00:00
|
|
|
void OnUpdateUI(wxUpdateUIEvent& event);
|
|
|
|
|
|
|
|
#if wxUSE_FILEDLG
|
|
|
|
void OnOpen(wxCommandEvent& event);
|
|
|
|
#endif // wxUSE_FILEDLG
|
|
|
|
|
2020-04-05 14:55:44 +00:00
|
|
|
private:
|
|
|
|
void RecreateAnimation(long style);
|
2006-10-09 17:51:07 +00:00
|
|
|
|
2020-04-05 14:55:44 +00:00
|
|
|
wxAnimationCtrlBase* m_animationCtrl;
|
2006-10-09 17:51:07 +00:00
|
|
|
|
2014-03-30 07:07:55 +00:00
|
|
|
wxDECLARE_EVENT_TABLE();
|
2006-10-09 17:51:07 +00:00
|
|
|
};
|