home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
wxos2233.zip
/
wxOS2-2_3_3.zip
/
wxWindows-2.3.3
/
contrib
/
samples
/
animate
/
anitest.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-07-06
|
2KB
|
72 lines
/////////////////////////////////////////////////////////////////////////////
// Name: anitest.cpp
// Purpose: anitest sample
// Author: Julian Smart
// Modified by:
// Created: 02/07/2001
// RCS-ID: $Id: anitest.h,v 1.1 2001/07/06 10:24:53 JS Exp $
// 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);
void OnOpen(wxCommandEvent& event);
MyCanvas* GetCanvas() const { return m_canvas; }
wxGIFAnimationCtrl* GetAnimationCtrl() const { return m_animationCtrl; }
#if 0
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
};
// menu items ids
enum
{
ANITEST_QUIT = 100,
ANITEST_OPEN,
ANITEST_ABOUT
};