2001-07-06 06:24:54 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: anitest.cpp
|
|
|
|
// Purpose: anitest sample
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 02/07/2001
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "wx/animate/animate.h"
|
|
|
|
|
|
|
|
// Define a new application
|
|
|
|
class MyApp : public wxApp
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool OnInit();
|
|
|
|
};
|
|
|
|
|
|
|
|
class MyCanvas : public wxScrolledWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
|
2005-08-23 12:02:51 -04:00
|
|
|
#if wxUSE_FILEDLG
|
2001-07-06 06:24:54 -04:00
|
|
|
void OnOpen(wxCommandEvent& event);
|
2005-08-23 12:02:51 -04:00
|
|
|
#endif // wxUSE_FILEDLG
|
2001-07-06 06:24:54 -04:00
|
|
|
|
|
|
|
MyCanvas* GetCanvas() const { return m_canvas; }
|
|
|
|
wxGIFAnimationCtrl* GetAnimationCtrl() const { return m_animationCtrl; }
|
|
|
|
|
2005-08-23 12:02:51 -04:00
|
|
|
#if 0
|
2001-07-06 06:24:54 -04:00
|
|
|
wxAnimationPlayer& GetPlayer() { return m_player; }
|
|
|
|
wxAnimationBase& GetAnimation() { return m_animation; }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
protected:
|
|
|
|
MyCanvas* m_canvas;
|
|
|
|
wxGIFAnimationCtrl* m_animationCtrl;
|
|
|
|
#if 0
|
|
|
|
wxAnimationPlayer m_player;
|
|
|
|
wxGIFAnimation m_animation;
|
|
|
|
#endif
|
|
|
|
};
|