Added animation classes to contrib hierarchy
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
223
contrib/samples/animate/AniTestVC.dsp
Normal file
223
contrib/samples/animate/AniTestVC.dsp
Normal file
@@ -0,0 +1,223 @@
|
||||
# Microsoft Developer Studio Project File - Name="AniTestVC" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=AniTestVC - Win32 UnivDebug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "AniTestVC.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "AniTestVC.mak" CFG="AniTestVC - Win32 UnivDebug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "AniTestVC - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "AniTestVC - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "AniTestVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "AniTestVC - Win32 Release DLL" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "AniTestVC - Win32 UnivRelease" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "AniTestVC - Win32 UnivDebug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "AniTestVC - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/anitest.exe" /libpath:"../../../lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/anitest.exe" /pdbtype:sept /libpath:"../../../lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 Debug DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DebugDLL"
|
||||
# PROP BASE Intermediate_Dir "DebugDLL"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "DebugDLL"
|
||||
# PROP Intermediate_Dir "DebugDLL"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx23_2d.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/anitest.exe" /pdbtype:sept /libpath:"../../../lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 Release DLL"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "ReleaseDLL"
|
||||
# PROP BASE Intermediate_Dir "ReleaseDLL"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "ReleaseDLL"
|
||||
# PROP Intermediate_Dir "ReleaseDLL"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx23_2.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/anitest.exe" /libpath:"../../../lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 UnivRelease"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "UnivRelease"
|
||||
# PROP BASE Intermediate_Dir "UnivRelease"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "UnivRelease"
|
||||
# PROP Intermediate_Dir "UnivRelease"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx_univ.lib png.lib zlib.lib jpeg.lib tiff.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"UnivRelease/anitest.exe" /libpath:"../../../lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "AniTestVC - Win32 UnivDebug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "UnivDebug"
|
||||
# PROP BASE Intermediate_Dir "UnivDebug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "UnivDebug"
|
||||
# PROP Intermediate_Dir "UnivDebug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/minimal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx_univd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"UnivDebug/anitest.exe" /pdbtype:sept /libpath:"../../../lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "AniTestVC - Win32 Release"
|
||||
# Name "AniTestVC - Win32 Debug"
|
||||
# Name "AniTestVC - Win32 Debug DLL"
|
||||
# Name "AniTestVC - Win32 Release DLL"
|
||||
# Name "AniTestVC - Win32 UnivRelease"
|
||||
# Name "AniTestVC - Win32 UnivDebug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\anitest.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\anitest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\anitest.rc
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
29
contrib/samples/animate/AniTestVC.dsw
Normal file
29
contrib/samples/animate/AniTestVC.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "AniTestVC"=.\AniTestVC.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
24
contrib/samples/animate/Makefile.in
Normal file
24
contrib/samples/animate/Makefile.in
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# File: makefile.unx
|
||||
# Author: Julian Smart
|
||||
# Created: 1998
|
||||
# Updated:
|
||||
# Copyright: (c) 1998 Julian Smart
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile for anitest example (UNIX).
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../../..
|
||||
program_dir = contrib/samples/animate
|
||||
|
||||
PROGRAM=anitest
|
||||
|
||||
OBJECTS=$(PROGRAM).o
|
||||
|
||||
APPEXTRALIBS=$(top_builddir)/lib/libwx_anim.@WX_TARGET_LIBRARY_TYPE@
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makeprog.env
|
||||
|
197
contrib/samples/animate/anitest.cpp
Normal file
197
contrib/samples/animate/anitest.cpp
Normal file
@@ -0,0 +1,197 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: anitest.cpp
|
||||
// Purpose: Animation sample
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 02/07/2001
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ===========================================================================
|
||||
// declarations
|
||||
// ===========================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// headers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
|
||||
#include "mondrian.xpm"
|
||||
#endif
|
||||
|
||||
#include "anitest.h"
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// global variables
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// event tables
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(ANITEST_ABOUT, MyFrame::OnAbout)
|
||||
EVT_MENU(ANITEST_QUIT, MyFrame::OnQuit)
|
||||
EVT_MENU(ANITEST_OPEN, MyFrame::OnOpen)
|
||||
|
||||
EVT_SIZE(MyFrame::OnSize)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ===========================================================================
|
||||
// implementation
|
||||
// ===========================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// MyApp
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Initialise this in OnInit, not statically
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
// Create the main frame window
|
||||
|
||||
MyFrame* frame = new MyFrame((wxFrame *)NULL, -1, "Animation Demo",
|
||||
wxPoint(-1, -1), wxSize(500, 400),
|
||||
wxDEFAULT_FRAME_STYLE);
|
||||
|
||||
// Give it an icon
|
||||
#ifdef __WXMSW__
|
||||
frame->SetIcon(wxIcon("mdi_icn"));
|
||||
#else
|
||||
frame->SetIcon(wxIcon( mondrian_xpm ));
|
||||
#endif
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
|
||||
file_menu->Append(ANITEST_OPEN, "&Open Animation...\tCtrl+O", "Open a GIF animation");
|
||||
file_menu->Append(ANITEST_QUIT, "&Exit\tAlt+X", "Quit the program");
|
||||
|
||||
wxMenu *help_menu = new wxMenu;
|
||||
help_menu->Append(ANITEST_ABOUT, "&About\tF1");
|
||||
|
||||
wxMenuBar *menu_bar = new wxMenuBar;
|
||||
|
||||
menu_bar->Append(file_menu, "&File");
|
||||
menu_bar->Append(help_menu, "&Help");
|
||||
|
||||
// Associate the menu bar with the frame
|
||||
frame->SetMenuBar(menu_bar);
|
||||
|
||||
frame->CreateStatusBar();
|
||||
|
||||
frame->Show(TRUE);
|
||||
|
||||
SetTopWindow(frame);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// MyFrame
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Define my frame constructor
|
||||
MyFrame::MyFrame(wxWindow *parent,
|
||||
const wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const long style)
|
||||
: wxFrame(parent, id, title, pos, size,
|
||||
style | wxNO_FULL_REPAINT_ON_RESIZE)
|
||||
{
|
||||
// m_animation = NULL;
|
||||
m_canvas = new MyCanvas(this, wxPoint(0, 0), wxSize(-1, -1));
|
||||
#if 0
|
||||
m_player.SetDestroyAnimation(FALSE);
|
||||
m_player.SetWindow(m_canvas);
|
||||
m_player.SetPosition(wxPoint(0, 0));
|
||||
#endif
|
||||
m_animationCtrl = new wxGIFAnimationCtrl(m_canvas, -1, wxEmptyString,
|
||||
wxPoint(0, 0), wxSize(200, 200));
|
||||
}
|
||||
|
||||
MyFrame::~MyFrame()
|
||||
{
|
||||
// m_player.Stop();
|
||||
}
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
(void)wxMessageBox("wxWindows 2 Animation Demo\n"
|
||||
"Author: Julian Smart (c) 2001\n",
|
||||
"About Animation Demo");
|
||||
}
|
||||
|
||||
void MyFrame::OnOpen(wxCommandEvent& event)
|
||||
{
|
||||
wxFileDialog dialog(this, wxT("Please choose an animated GIF"),
|
||||
wxEmptyString, wxEmptyString, wxT("*.gif"), wxOPEN);
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
wxString filename(dialog.GetPath());
|
||||
|
||||
m_animationCtrl->Stop();
|
||||
if (m_animationCtrl->LoadFile(filename))
|
||||
{
|
||||
m_animationCtrl->Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox("Sorry, this animation was not a valid animated GIF.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// MyCanvas
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||
EVT_PAINT(MyCanvas::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// Define a constructor for my canvas
|
||||
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
||||
: wxScrolledWindow(parent, -1, pos, size,
|
||||
wxSUNKEN_BORDER |
|
||||
wxNO_FULL_REPAINT_ON_RESIZE |
|
||||
wxVSCROLL | wxHSCROLL)
|
||||
{
|
||||
SetBackgroundColour(wxColour("YELLOW"));
|
||||
}
|
||||
|
||||
void MyCanvas::OnPaint(wxPaintEvent& event)
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
#if 0
|
||||
MyFrame* frame = (MyFrame*) GetParent();
|
||||
if (frame->GetPlayer().IsPlaying())
|
||||
{
|
||||
frame->GetPlayer().Draw(dc);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
71
contrib/samples/animate/anitest.h
Normal file
71
contrib/samples/animate/anitest.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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);
|
||||
|
||||
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
|
||||
};
|
BIN
contrib/samples/animate/bttrfly.gif
Normal file
BIN
contrib/samples/animate/bttrfly.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
BIN
contrib/samples/animate/hooked.gif
Normal file
BIN
contrib/samples/animate/hooked.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
contrib/samples/animate/make_cw.mcp
Normal file
BIN
contrib/samples/animate/make_cw.mcp
Normal file
Binary file not shown.
17
contrib/samples/animate/makefile.b32
Normal file
17
contrib/samples/animate/makefile.b32
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# File: makefile.b32
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright:
|
||||
#
|
||||
# Makefile : Builds sample for 32-bit BC++
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
TARGET=anitest
|
||||
EXTRALIBS=$(WXDIR)\lib\anim.lib
|
||||
OBJECTS = $(TARGET).obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.b32
|
||||
|
19
contrib/samples/animate/makefile.g95
Normal file
19
contrib/samples/animate/makefile.g95
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# File: makefile.g95
|
||||
# Author: Julian Smart
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) Julian Smart, 1999
|
||||
#
|
||||
# Makefile for wxWindows sample (Cygwin/Mingw32).
|
||||
|
||||
WXDIR = ../../..
|
||||
|
||||
TARGET=anitest
|
||||
OBJECTS = $(TARGET).o
|
||||
EXTRAINC = -I$(WXDIR)/contrib/include
|
||||
RCEXTRAINC = --include-dir $(WXDIR)/contrib/include
|
||||
EXTRALIBS = -lanim
|
||||
|
||||
include $(WXDIR)/src/makeprog.g95
|
||||
|
36
contrib/samples/animate/makefile.sc
Normal file
36
contrib/samples/animate/makefile.sc
Normal file
@@ -0,0 +1,36 @@
|
||||
# Symantec C++ makefile
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
WXLIB = $(WXDIR)\lib\wx.lib
|
||||
INCDIR = $(WXDIR)\include
|
||||
INCLUDE=$(INCDIR)
|
||||
TARGET=minimal
|
||||
|
||||
include $(WXDIR)\src\makesc.env
|
||||
|
||||
minimal.exe: minimal.obj $(DEFFILE) minimal.res
|
||||
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
|
||||
*$(RC) -k minimal.res
|
||||
|
||||
sc32.def:
|
||||
echo EXETYPE NT > sc32.def
|
||||
echo SUBSYSTEM WINDOWS >> sc32.def
|
||||
|
||||
sc16.def:
|
||||
echo NAME $(TARGET) > sc16.def
|
||||
echo EXETYPE WINDOWS >> sc16.def
|
||||
echo STUB 'WINSTUB.EXE' >> sc16.def
|
||||
echo CODE PRELOAD MOVEABLE DISCARDABLE >> sc16.def
|
||||
echo DATA PRELOAD MOVEABLE MULTIPLE >> sc16.def
|
||||
echo HEAPSIZE 1024 >> sc16.def
|
||||
echo STACKSIZE 8192 >> sc16.def
|
||||
|
||||
clean:
|
||||
-del *.obj
|
||||
-del *.exe
|
||||
-del *.res
|
||||
-del *.map
|
||||
-del *.rws
|
||||
-del sc32.def
|
||||
-del sc16.def
|
||||
|
35
contrib/samples/animate/makefile.unx
Normal file
35
contrib/samples/animate/makefile.unx
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# File: Makefile for samples
|
||||
# Author: Robert Roebling
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) 1998 Robert Roebling
|
||||
#
|
||||
# This makefile requires a Unix version of wxWindows
|
||||
# to be installed on your system. This is most often
|
||||
# done typing "make install" when using the complete
|
||||
# sources of wxWindows or by installing the two
|
||||
# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm
|
||||
# under Linux.
|
||||
#
|
||||
|
||||
CC = gcc
|
||||
|
||||
PROGRAM = anitest
|
||||
|
||||
OBJECTS = $(PROGRAM).o animate.o
|
||||
|
||||
# implementation
|
||||
|
||||
.SUFFIXES: .o .cpp
|
||||
|
||||
.cpp.o :
|
||||
$(CC) -c `wx-config --cflags` -o $@ $<
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJECTS)
|
||||
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f *.o $(PROGRAM)
|
44
contrib/samples/animate/makefile.va
Normal file
44
contrib/samples/animate/makefile.va
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# File: makefile.va
|
||||
# Author: David Webster
|
||||
# Created: 1999
|
||||
# Updated:
|
||||
# Copyright: (c) David Webster
|
||||
#
|
||||
# Makefile : Builds sample (VisualAgeC++ V3.0, OS/2 PM)
|
||||
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR=$(WXWIN)
|
||||
|
||||
!include $(WXDIR)\src\makeva.env
|
||||
|
||||
#
|
||||
# Define which program this is and what it's path is and where to output to
|
||||
#
|
||||
PROGRAM=anitest
|
||||
THISDIR=$(WXWIN)\samples\$(PROGRAM)
|
||||
OPATH=$(THISDIR)\$D
|
||||
|
||||
#
|
||||
# Make sure output directory is available
|
||||
#
|
||||
!if [md $(OPATH)]
|
||||
!endif
|
||||
|
||||
#
|
||||
# Standard definitions
|
||||
#
|
||||
PROGRC=$(THISDIR)\$(PROGRAM).rcO
|
||||
OBJECTS=$(OPATH)\$(PROGRAM).obj $(OPATH)\animate.obj
|
||||
PROGRES=$(OPATH)\$(PROGRAM).res
|
||||
PROGTARGET=$(OPATH)\$(PROGRAM).exe
|
||||
|
||||
.cpp{$OPATH}.obj:
|
||||
@echo $<
|
||||
icc @<<
|
||||
$(CPPFLAGS) /Fo$@ /Tp $<
|
||||
<<
|
||||
|
||||
!include $(WXDIR)\src\makeprog.va
|
||||
|
9
contrib/samples/animate/makefile.vc
Normal file
9
contrib/samples/animate/makefile.vc
Normal file
@@ -0,0 +1,9 @@
|
||||
WXDIR = $(WXWIN)
|
||||
PROGRAM = anitest
|
||||
|
||||
OBJECTS = $(PROGRAM).obj
|
||||
EXTRALIBS = $(WXDIR)\lib\anim$(LIBEXT).lib
|
||||
EXTRAINC = -I$(WXDIR)\contrib\include
|
||||
|
||||
!include $(WXDIR)\src\makeprog.vc
|
||||
|
15
contrib/samples/animate/makefile.wat
Normal file
15
contrib/samples/animate/makefile.wat
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Makefile for WATCOM
|
||||
#
|
||||
# Created by Julian Smart, January 1999
|
||||
#
|
||||
#
|
||||
|
||||
WXDIR = $(%WXWIN)
|
||||
|
||||
PROGRAM = anitest
|
||||
OBJECTS = $(PROGRAM).obj animate.obj
|
||||
|
||||
!include $(WXDIR)\src\makeprog.wat
|
||||
|
||||
|
BIN
contrib/samples/animate/makemac.mcp
Normal file
BIN
contrib/samples/animate/makemac.mcp
Normal file
Binary file not shown.
BIN
contrib/samples/animate/makemac6.mcp
Normal file
BIN
contrib/samples/animate/makemac6.mcp
Normal file
Binary file not shown.
BIN
contrib/samples/animate/mondrian.ico
Normal file
BIN
contrib/samples/animate/mondrian.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
BIN
contrib/samples/animate/tbttrfly.gif
Normal file
BIN
contrib/samples/animate/tbttrfly.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Reference in New Issue
Block a user