From 4638d697a3cf0b71597b1cedbbd8f62d2a4d3797 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 6 Jul 2001 10:24:54 +0000 Subject: [PATCH] Added animation classes to contrib hierarchy git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/animate/animate.h | 335 +++++++++++++ contrib/samples/animate/AniTestVC.dsp | 223 +++++++++ contrib/samples/animate/AniTestVC.dsw | 29 ++ contrib/samples/animate/Makefile.in | 24 + contrib/samples/animate/anitest.cpp | 197 ++++++++ contrib/samples/animate/anitest.h | 71 +++ contrib/samples/animate/bttrfly.gif | Bin 0 -> 7313 bytes contrib/samples/animate/hooked.gif | Bin 0 -> 34505 bytes contrib/samples/animate/make_cw.mcp | Bin 0 -> 359 bytes contrib/samples/animate/makefile.b32 | 17 + contrib/samples/animate/makefile.g95 | 19 + contrib/samples/animate/makefile.sc | 36 ++ contrib/samples/animate/makefile.unx | 35 ++ contrib/samples/animate/makefile.va | 44 ++ contrib/samples/animate/makefile.vc | 9 + contrib/samples/animate/makefile.wat | 15 + contrib/samples/animate/makemac.mcp | Bin 0 -> 847 bytes contrib/samples/animate/makemac6.mcp | Bin 0 -> 843 bytes contrib/samples/animate/mondrian.ico | Bin 0 -> 766 bytes contrib/samples/animate/tbttrfly.gif | Bin 0 -> 7291 bytes contrib/samples/plot/Makefile.in | 2 +- contrib/src/Makefile.in | 2 +- contrib/src/animate/AnimateVC.dsp | 98 ++++ contrib/src/animate/AnimateVC.dsw | 29 ++ contrib/src/animate/Makefile.in | 23 + contrib/src/animate/animate.cpp | 666 ++++++++++++++++++++++++++ contrib/src/animate/makefile.b32 | 17 + contrib/src/animate/makefile.g95 | 16 + contrib/src/animate/makefile.vc | 144 ++++++ contrib/src/animate/readme.txt | 35 ++ distrib/msw/contrib.rsp | 21 + distrib/msw/makefile.rsp | 2 + distrib/msw/vc.rsp | 8 + 33 files changed, 2115 insertions(+), 2 deletions(-) create mode 100644 contrib/include/wx/animate/animate.h create mode 100644 contrib/samples/animate/AniTestVC.dsp create mode 100644 contrib/samples/animate/AniTestVC.dsw create mode 100644 contrib/samples/animate/Makefile.in create mode 100644 contrib/samples/animate/anitest.cpp create mode 100644 contrib/samples/animate/anitest.h create mode 100644 contrib/samples/animate/bttrfly.gif create mode 100644 contrib/samples/animate/hooked.gif create mode 100644 contrib/samples/animate/make_cw.mcp create mode 100644 contrib/samples/animate/makefile.b32 create mode 100644 contrib/samples/animate/makefile.g95 create mode 100644 contrib/samples/animate/makefile.sc create mode 100644 contrib/samples/animate/makefile.unx create mode 100644 contrib/samples/animate/makefile.va create mode 100644 contrib/samples/animate/makefile.vc create mode 100644 contrib/samples/animate/makefile.wat create mode 100644 contrib/samples/animate/makemac.mcp create mode 100644 contrib/samples/animate/makemac6.mcp create mode 100644 contrib/samples/animate/mondrian.ico create mode 100644 contrib/samples/animate/tbttrfly.gif create mode 100644 contrib/src/animate/AnimateVC.dsp create mode 100644 contrib/src/animate/AnimateVC.dsw create mode 100644 contrib/src/animate/Makefile.in create mode 100644 contrib/src/animate/animate.cpp create mode 100644 contrib/src/animate/makefile.b32 create mode 100644 contrib/src/animate/makefile.g95 create mode 100644 contrib/src/animate/makefile.vc create mode 100644 contrib/src/animate/readme.txt diff --git a/contrib/include/wx/animate/animate.h b/contrib/include/wx/animate/animate.h new file mode 100644 index 0000000000..991beeb81d --- /dev/null +++ b/contrib/include/wx/animate/animate.h @@ -0,0 +1,335 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: animate.h +// Purpose: Animation classes +// Author: Julian Smart and Guillermo Rodriguez Garcia +// Modified by: +// Created: 13/8/99 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANIMATEH__ +#define _WX_ANIMATEH__ + +#ifdef __GNUG__ + #pragma interface "animate.h" +#endif + +#include +#include +#include +#include +#include + +//#define ANIMDLLEXPORT WXDLLEXPORT +#define ANIMDLLEXPORT + +class ANIMDLLEXPORT wxAnimationBase; +class ANIMDLLEXPORT wxAnimationPlayer; +class WXDLLEXPORT wxImage; + +enum wxAnimationDisposal +{ + wxANIM_UNSPECIFIED = -1, + wxANIM_DONOTREMOVE = 0, + wxANIM_TOBACKGROUND = 1, + wxANIM_TOPREVIOUS = 2 +} ; + +class ANIMDLLEXPORT wxAnimationTimer: public wxTimer +{ +public: + wxAnimationTimer() { m_player = (wxAnimationPlayer*) NULL; } + + virtual void Notify(); + void SetPlayer(wxAnimationPlayer* player) { m_player = player; } + +protected: + wxAnimationPlayer* m_player; +}; + +/* wxAnimationPlayer + * Create an object of this class, and either pass an wxXXXAnimation object in the constructor, + * or call SetAnimation. Then call Play(). + * The wxAnimation object is only destroyed in the destructor if destroyAnimation is TRUE + * in the constructor. + */ + +class ANIMDLLEXPORT wxAnimationPlayer : public wxObject +{ + DECLARE_CLASS(wxAnimationPlayer) + +public: + wxAnimationPlayer(wxAnimationBase *animation = (wxAnimationBase *) NULL, bool destroyAnimation = FALSE); + ~wxAnimationPlayer(); +//// Accessors + + void SetAnimation(wxAnimationBase* animation, bool destroyAnimation = FALSE); + wxAnimationBase* GetAnimation() const { return m_animation; } + + void SetDestroyAnimation(bool destroyAnimation) { m_destroyAnimation = destroyAnimation; }; + bool GetDestroyAnimation() const { return m_destroyAnimation; } + + void SetCurrentFrame(int currentFrame) { m_currentFrame = currentFrame; }; + int GetCurrentFrame() const { return m_currentFrame; } + + void SetWindow(wxWindow* window) { m_window = window; }; + wxWindow* GetWindow() const { return m_window; } + + void SetPosition(const wxPoint& pos) { m_position = pos; }; + wxPoint GetPosition() const { return m_position; } + + void SetLooped(bool looped) { m_looped = looped; }; + bool GetLooped() const { return m_looped; } + + bool HasAnimation() const { return (m_animation != (wxAnimationBase*) NULL); } + + bool IsPlaying() const { return m_isPlaying; } + + // Specify whether the GIF's background colour is to be shown, + // or whether the window background should show through (the default) + void UseBackgroundColour(bool useBackground) { m_useBackgroundColour = useBackground; } + bool UsingBackgroundColour() const { return m_useBackgroundColour; } + + // Set and use a user-specified background colour (valid for transparent + // animations only) + void SetCustomBackgroundColour(const wxColour& col, bool useCustomBackgroundColour = TRUE) + { m_customBackgroundColour = col; m_useCustomBackgroundColour = useCustomBackgroundColour; } + + bool UsingCustomBackgroundColour() const { return m_useCustomBackgroundColour; } + const wxColour& GetCustomBackgroundColour() const { return m_customBackgroundColour; } + + // Another refinement - suppose we're drawing the animation in a separate + // control or window. We may wish to use the background of the parent + // window as the background of our animation. This allows us to specify + // whether to grab from the parent or from this window. + void UseParentBackground(bool useParent) { m_useParentBackground = useParent; } + bool UsingParentBackground() const { return m_useParentBackground; } + +//// Operations + + // Play + virtual bool Play(wxWindow& window, const wxPoint& pos = wxPoint(0, 0), bool looped = TRUE); + + // Build animation (list of wxImages). If not called before Play + // is called, Play will call this automatically. + virtual bool Build(); + + // Stop the animation + virtual void Stop(); + + // Draw the current view of the animation into this DC. + // Call this from your OnPaint, for example. + virtual void Draw(wxDC& dc); + +//// Accessing the current animation + + virtual int GetFrameCount() const; + virtual wxImage* GetFrame(int i) const; // Creates a new wxImage + virtual wxAnimationDisposal GetDisposalMethod(int i) const; + virtual wxRect GetFrameRect(int i) const; // Position and size of frame + virtual int GetDelay(int i) const; // Delay for this frame + + virtual wxSize GetLogicalScreenSize() const; + virtual bool GetBackgroundColour(wxColour& col) const ; + virtual bool GetTransparentColour(wxColour& col) const ; + +//// Implementation + + // Play the frame + virtual bool PlayFrame(int frame, wxWindow& window, wxPoint& pos); + virtual bool PlayFrame(); + virtual void DrawFrame(int frame, wxDC& dc, const wxPoint& pos); + virtual void DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& colour); + + // Clear the wxImage cache + virtual void ClearCache(); + + // Save the pertinent area of the window so we can restore + // it if drawing transparently + void SaveBackground(const wxRect& rect); + + wxBitmap& GetBackingStore() { return m_backingStore; } + +//// Data members +protected: + wxAnimationBase* m_animation; + bool m_destroyAnimation; // Destroy m_animation on deletion of this object + wxList m_frames; // List of cached wxBitmap frames. + int m_currentFrame; // Current frame + wxWindow* m_window; // Window to draw into + wxPoint m_position; // Position to draw at + bool m_looped; // Looped, or not + wxAnimationTimer m_timer; // The timer + bool m_isPlaying; // Is the animation playing? + wxBitmap m_savedBackground; // Saved background of window portion + wxBitmap m_backingStore; // The player draws into this + bool m_useBackgroundColour; // Use colour or background + wxColour m_customBackgroundColour; // Override animation background + bool m_useCustomBackgroundColour; + bool m_useParentBackground; // Grab background from parent? +}; + +/* wxAnimationBase + * Base class for animations. + * A wxXXXAnimation only stores the animation, providing accessors to wxAnimationPlayer. + * Currently an animation is read-only, but we could extend the API for adding frames + * programmatically, and perhaps have a wxMemoryAnimation class that stores its frames + * in memory, and is able to save all files with suitable filenames. You could then use + * e.g. Ulead GIF Animator to load the image files into a GIF animation. + */ + +class ANIMDLLEXPORT wxAnimationBase : public wxObject +{ + DECLARE_ABSTRACT_CLASS(wxAnimationBase) + +public: + wxAnimationBase() {}; + ~wxAnimationBase() {}; + +//// Accessors. Should be overridden by each derived class. + + virtual int GetFrameCount() const = 0; + virtual wxImage* GetFrame(int i) const = 0; // Creates a new wxImage + virtual wxAnimationDisposal GetDisposalMethod(int i) const = 0; + virtual wxRect GetFrameRect(int i) const = 0; // Position and size of frame + virtual int GetDelay(int i) const = 0; // Delay for this frame + + virtual wxSize GetLogicalScreenSize() const = 0; + virtual bool GetBackgroundColour(wxColour& col) const = 0; + virtual bool GetTransparentColour(wxColour& col) const = 0; + + // Is the animation OK? + virtual bool IsValid() const = 0; + +//// Operations + + virtual bool LoadFile(const wxString& filename) { return FALSE; } +}; + +/* wxGIFAnimation + * This will be moved to a separate file in due course. + */ + +class ANIMDLLEXPORT wxGIFDecoder; + +class ANIMDLLEXPORT wxGIFAnimation : public wxAnimationBase +{ + DECLARE_CLASS(wxGIFAnimation) + +public: + wxGIFAnimation() ; + ~wxGIFAnimation() ; + +//// Accessors + + virtual int GetFrameCount() const; + virtual wxImage* GetFrame(int i) const; + virtual wxAnimationDisposal GetDisposalMethod(int i) const; + virtual wxRect GetFrameRect(int i) const; // Position and size of frame + virtual int GetDelay(int i) const; // Delay for this frame + + virtual wxSize GetLogicalScreenSize() const ; + virtual bool GetBackgroundColour(wxColour& col) const ; + virtual bool GetTransparentColour(wxColour& col) const ; + + virtual bool IsValid() const; + +//// Operations + + virtual bool LoadFile(const wxString& filename); + +protected: + + wxGIFDecoder* m_decoder; +}; + +/* + * wxAnimationCtrlBase + * Abstract base class for format-specific animation controls. + * This class implements most of the functionality; all a derived + * class has to do is create the appropriate animation class on demand. + */ + +// Resize to animation size if this is set +#define wxAN_FIT_ANIMATION 0x0010 + +class ANIMDLLEXPORT wxAnimationCtrlBase: public wxControl +{ +public: + wxAnimationCtrlBase() { } + wxAnimationCtrlBase(wxWindow *parent, wxWindowID id, + const wxString& filename = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER, + const wxString& name = wxT("animationControl")) + { + Create(parent, id, filename, pos, size, style, name); + } + ~wxAnimationCtrlBase(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& filename = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER, + const wxString& name = wxT("animationControl")); + + //// Operations + virtual bool LoadFile(const wxString& filename = wxEmptyString); + virtual bool Play(bool looped = TRUE) ; + virtual void Stop() { m_animationPlayer.Stop(); } + virtual void FitToAnimation(); + + //// Accessors + virtual bool IsPlaying() const { return m_animationPlayer.IsPlaying(); } + virtual wxAnimationPlayer& GetPlayer() { return m_animationPlayer; } + virtual wxAnimationBase* GetAnimation() { return m_animation; } + + const wxString& GetFilename() const { return m_filename; } + void SetFilename(const wxString& filename) { m_filename = filename; } + + //// Event handlers + void OnPaint(wxPaintEvent& event); + +protected: + virtual wxSize DoGetBestSize() const; + + // Override this in derived classes + virtual wxAnimationBase* DoCreateAnimation(const wxString& filename) = 0; + + wxAnimationPlayer m_animationPlayer; + wxAnimationBase* m_animation; + wxString m_filename; + +private: + DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase) + DECLARE_EVENT_TABLE() +}; + +/* + * wxGIFAnimationCtrl + * Provides a GIF animation class when required. + */ + +class ANIMDLLEXPORT wxGIFAnimationCtrl: public wxAnimationCtrlBase +{ +public: + wxGIFAnimationCtrl() { } + wxGIFAnimationCtrl(wxWindow *parent, wxWindowID id, + const wxString& filename = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER, + const wxString& name = wxT("animationControl")) + { + Create(parent, id, filename, pos, size, style, name); + } + +protected: + virtual wxAnimationBase* DoCreateAnimation(const wxString& filename) ; +private: + DECLARE_DYNAMIC_CLASS(wxGIFAnimationCtrl) +}; + +#endif // _WX_ANIMATEH__ + diff --git a/contrib/samples/animate/AniTestVC.dsp b/contrib/samples/animate/AniTestVC.dsp new file mode 100644 index 0000000000..9aeeafeb2b --- /dev/null +++ b/contrib/samples/animate/AniTestVC.dsp @@ -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 diff --git a/contrib/samples/animate/AniTestVC.dsw b/contrib/samples/animate/AniTestVC.dsw new file mode 100644 index 0000000000..e3b3140485 --- /dev/null +++ b/contrib/samples/animate/AniTestVC.dsw @@ -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> +{{{ +}}} + +############################################################################### + diff --git a/contrib/samples/animate/Makefile.in b/contrib/samples/animate/Makefile.in new file mode 100644 index 0000000000..d645e9ad99 --- /dev/null +++ b/contrib/samples/animate/Makefile.in @@ -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 + diff --git a/contrib/samples/animate/anitest.cpp b/contrib/samples/animate/anitest.cpp new file mode 100644 index 0000000000..97eff19c4f --- /dev/null +++ b/contrib/samples/animate/anitest.cpp @@ -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 +} + diff --git a/contrib/samples/animate/anitest.h b/contrib/samples/animate/anitest.h new file mode 100644 index 0000000000..9cd6589c92 --- /dev/null +++ b/contrib/samples/animate/anitest.h @@ -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 +}; diff --git a/contrib/samples/animate/bttrfly.gif b/contrib/samples/animate/bttrfly.gif new file mode 100644 index 0000000000000000000000000000000000000000..b84ac352d69c72ad1efca1a188b105abf8cc98a1 GIT binary patch literal 7313 zcmeI0{Xf&||G=-!@E&7tcQvK#j#;7&6)9$BwvlF3+M%N+)N<-rH=>Ta$-U4LHHTuM zT1TDc=$xE0nKdOLsZU3uQ%5?LQXSR7K6AdGf8cX|_&&am$G7L>`F>sRKj3=ZT(4j* z+uLW02k-z>;D3N101O`lK`;O?WDtU30K*Ut0yx+pM1X)322f#ufngX2<8TmeF5(Eb zkP{B$K!BV{W;nteR4Rc=pF0hI2Iw%L;|xMRFz~knY#fS500IJF6U~KAKtuo{Dp*dp zWcyl*sE}~Ag|7#ZPN!4pKEA$d*giOpzbl_lS;u3pVTbYr8w3KLz<^LFx{#6JidxK|UlIy-*)Vu=@*_rfRVumy+IIn1Vh0I4J6r_m+QjtI+5{g73u}CBr z^CV(nV$wFLR3J;^$J^n2>@8DcO)x05u3nDjuW~Ky5tGW{3hiJ&nNJRyQ63{ebCh~X(QG-ZeqSTBb45?CRJloFh(h^nkzu2e8pN~Ti9Qx*wS zDj$`KsZ#OURFGDJ(@LrOG*~Z%d$iDCkFB8FJHDUn`pP^{NWh6kl%gVN!_qOswkiQyup zT&7aWrY2-lQ*!;3T%k}X6$-t6?lhn>s8Y4H88o16)Ba7*9D{>{!^6X41}5g1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ESi+&dI`@7o>Yr`9QI4=;J%SYNT@c~j$=v(L|-Z+ZUwoN@D|1^;<${DXV( sxe|V^g#W)P;pgf6^K|}sI{#mr&j0(Kr2V`A`@8`Aya4;ZumJP@H)Y`EDgXcg literal 0 HcmV?d00001 diff --git a/contrib/samples/animate/hooked.gif b/contrib/samples/animate/hooked.gif new file mode 100644 index 0000000000000000000000000000000000000000..7041b8ef55c092333e5f16787ebdd020c9d67b58 GIT binary patch literal 34505 zcmeFaXH=65x32x95|RL+cMU}hJ@kMr^o|h_kY+%dh)5H$Cp77z0s@K#=}ki~f`%p? z0Z|bFLy;n)AXP-x7uS0Ce$Uza?Dy<5zB9)8;mQvfgTcRC&z$p_<-UzgjR@Lqoj@nB z3Hdpha<9VlsSUa@>1yLfHMHSVevboTwCDaG$C$PD5NyPEJ8xT2Vz#QCm_) zLlJ*)pXyZGwvTI7nrBUu zYfX!HT}yh+h-=MMXze)H+Hv6-i-Q{$N7fx>Hk{Qzox)59aIblDt(_KL3+7r2=AAk% zv+gOo?ya>JEWZ(~vtgyTagw;{Y`;l9u@R)dyGTTf#wwdOHF*V%*JcY)kUtgMc%b_uC)!m^`(6qUsTqY_ie0bw>4kf=rrDJcG!Gv zy48N}`-_WPA3VPghJIZzU7t1B{CHwx*=TdcVQcl&_q9tA5fRael$e|02?+^tw<42L zW0KS2?qnq1xpOBi>sI=MJNNG0%cP}d<)r7_ze~%%pHuW8CnqPrB)jNwZVBr{&o8Se zs;GHfSy@@rP*LAh^R%&{kx@Sq6FyRzyqI?Ldo1;9L*jO6>~{98@3oQJPt$)iKKd}8 z+T8wZXz=NFOUiUx;nd59A1_OGdYgU>mi~BKz5ONm`+Ds5#@!!FMLV;#Kelprwi{a8 zTH3o>I(yoCdb|4vdj?+hzZ!n^W@LEe{hRk=qZ7=ro%ZIP_b+}94lt)CzAU}k`PjX) z@OEdrb?5uL>6xk7`H%ApbBmuBzb=2>{XDy~y|A{n`g47CYina?XXj7q|M5fO50sUm zt&P4e$xu}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3L$uVS=PwH%QDjXC?R zB;4J96IT8!K2_W&yG^7Aw}r}Y5$V0)cx8^=HEarcn^SM=C6qWsdi$CZ4w0UReTN6I zyIPS<(^Tc4n&SgSw#PbPoM&jtX|lhGW6#2G6)q(>xkd-|5i*?73a3+wM<^kF)Ffp3 z{m};O%q(*(Omm`n-x9aH`T&I0CMFDad%Uc~?vw<O1r0GQdbRFVG-Zg4{?xs( zskBGI@uM)!9=akUjlL%Epxq-@Nr#Vx618^Bh(nvl=h=aRXm&T{{ij{ygHns7;+5@> zViFAUXjA48i6Q62SN$~7Y2DdE_hh|#T7fawW^pz`ToAG1f0=Rr%W| hcRTo4UD%cOzh7VL?0030UwkuQ_Cwb91t84&e*zTHz@h*E literal 0 HcmV?d00001 diff --git a/contrib/samples/animate/make_cw.mcp b/contrib/samples/animate/make_cw.mcp new file mode 100644 index 0000000000000000000000000000000000000000..6da3ade47d75e244d8cdcd6fef33d15ab9d297bb GIT binary patch literal 359 zcmYe!&(C3CU|?ooVANn>{F2YW_;or1gOCJJ>>wi(Bangs=lqn^@Wi5`%={vSfTH}Y z)Z`MF)Ci#&1%Y8C1jNEXECR%$K+FTg{6H)Q#Nt2<3^zt@AdUuN0U+iBVo4wd0LOq1 AegFUf literal 0 HcmV?d00001 diff --git a/contrib/samples/animate/makefile.b32 b/contrib/samples/animate/makefile.b32 new file mode 100644 index 0000000000..2ad6864670 --- /dev/null +++ b/contrib/samples/animate/makefile.b32 @@ -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 + diff --git a/contrib/samples/animate/makefile.g95 b/contrib/samples/animate/makefile.g95 new file mode 100644 index 0000000000..058544501c --- /dev/null +++ b/contrib/samples/animate/makefile.g95 @@ -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 + diff --git a/contrib/samples/animate/makefile.sc b/contrib/samples/animate/makefile.sc new file mode 100644 index 0000000000..c55f65c7d7 --- /dev/null +++ b/contrib/samples/animate/makefile.sc @@ -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 + diff --git a/contrib/samples/animate/makefile.unx b/contrib/samples/animate/makefile.unx new file mode 100644 index 0000000000..b5a4664fa6 --- /dev/null +++ b/contrib/samples/animate/makefile.unx @@ -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) diff --git a/contrib/samples/animate/makefile.va b/contrib/samples/animate/makefile.va new file mode 100644 index 0000000000..d3b737651f --- /dev/null +++ b/contrib/samples/animate/makefile.va @@ -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 + diff --git a/contrib/samples/animate/makefile.vc b/contrib/samples/animate/makefile.vc new file mode 100644 index 0000000000..483d823607 --- /dev/null +++ b/contrib/samples/animate/makefile.vc @@ -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 + diff --git a/contrib/samples/animate/makefile.wat b/contrib/samples/animate/makefile.wat new file mode 100644 index 0000000000..de9f03d959 --- /dev/null +++ b/contrib/samples/animate/makefile.wat @@ -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 + + diff --git a/contrib/samples/animate/makemac.mcp b/contrib/samples/animate/makemac.mcp new file mode 100644 index 0000000000000000000000000000000000000000..5857f064544cd09a97fd33a0ab44ca713c9ebf4f GIT binary patch literal 847 zcmd_oX;+O=6bJBguSjYcE4+}RC{tLXfr^j@Btyn@*S$B*Po6TT45iW6^LhF`D?Ww2 z)^GjSIp@{cduO9)B80Flgj8)v=Q1IkUk#yjue(2~bV_VhN0iGCWa4-UlGRpbEPi|66HMbaMkv$|e$2|Q!;64xOqn^9; za+GsCqm(ynu%BdTm#LwREICeK&fx+jG|<5)N2s8HR<84%c5btsixjbo;|#F&_k2qJ z<{j@zmSc<$O!Jm;K9cO)CnovK3}2WcCgM4F=wgXNF7cEMS7@Y(W?HyPH#@jS9fRy+ nojj|oaFWxU;Viou;UL9S@`!ur#$U6bJDAzA1@GN998logBjukx=L)iYQbxZ!bFV)I&uMMGA2Zx;IzS?-^W0 zYvwoq*?WK5YpqNa&4dtgLP#}+^zX%x-rNkK{FJ*tsdP&Gt&V6SJ2W20lTlpVA4gN! z%$xsD+a=RJ`jKUl{^V1{Qx5Tf8t&6cDdp_r3#(kGky>u>jIZn^sSkYOE(6@*9{n`Y z$1M(Wl82P>oD!0OHB-kGGE7j98HdyC;T#=IQpEvw(8e`BbCsLqa)w?|DT`#0EckL>Jwxv6Hh5GtPM~(85J7(Mk__T;>R4 n6qDr#-)Z0&$2mbEFQ{NQ)eLf*b-uAeFYP>Glo1|N$$qu~t64Hx literal 0 HcmV?d00001 diff --git a/contrib/samples/animate/mondrian.ico b/contrib/samples/animate/mondrian.ico new file mode 100644 index 0000000000000000000000000000000000000000..2310c5d275a87af295d5ea8dc79ea417a5e74c53 GIT binary patch literal 766 zcmZQzU<5)11px*Sc)`TLAO@s0fLH;D9e|jTfdxnc0ZFYK@b2ypa~Fda>xXTh5)q5(IA9|&|g8L@gN$H z$AbVK0`X{&2mxfY36Kf_rn_V^XnKgp6Y)fo{%vGDkxZqM@no`Tpi=2vIvSwkK`tJk zQ$acv&BFtHJiw(Ag+xF|1VuzZL&xZ_r(7=cEV)U>OGzg(#Av7k0CPdJ*2%0sy7@9Sa3z^IwI%EZ;xLbaTymh)9gzREOL3ROz6T18iDxEeKGqcOqN zXvF#!@~jNfw{Z0;kzOs*f4!62-6A%aTn`$$pAK(n*Z#00fl&+XRpy1PyA z4c)xqVP3aB*PzcG8|ID;^TvkxV`KaY6BGRDuLx(Sg|o9JL^7F7u2d@JUrky4RqAS` zMy*t-RB97ywZ?=-)ACh%L$_?$gh4)Lkc|z?Cx+$I6Uyo7>e*S9Ua#-&?lu?UY-|APa5);f|I8^Z{RV*2}$%weXb@Soubq-pf|y6o3u0)R6B40K^P z)M^Vrdv8H!!^t~EkOx;VxYb>Ez`>WLD~>wG0$OgBxD2VC>D~)a`w7H8g0_N?*Wg3# zc^OiL+jK8=+<$D9peeunZOPSNX~&FGWX-t0*QFYF#AF~BQa!A6-#7SY2ycY#RFDZ< z@hIXomSk+}fhVo0?NVgi`ADp~@bp}5lVu}%d<{WWyKL*LzJYhEvDfw)_?mhCjn8z) z;hVbBO6@iP3FE)!*xonI{{n_^3{k8zK*;(tO*Ep)i z&1OlF1sW!s@OBU#uBb?UI7H+oU+ zS;F11i?J_nj{VeB*xQ+L;cnBS#k+s66#d@#a-~F=GgBF80KEj9pg$dBpF0;I3-hsh@jZoC?2eT#|yd0>Q1Z}#y`s1+G3SMKqvZB+O)wkkV( zWWB&b`5eI|OGWFN`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=8KzRbEfK1NI z4VAa9ons|#Op>|;6A$MjEfqJti20AN!-id_N7u#&7-fC}ETOlR>cWpGQenNvzBhpOD6_C>qRR zR@$}KH4u%L5D%JwlCXkDb)kpq#HxoC^TNMGc}+f<3t7g@q~7IiiYX&FpzZ6oz>4zQ zk7T4h>8qQ=xC3_&fTt!!{T+e`8!F^O-`?wuP8F0$02__o>&K`XGpbjD!}Xiv0RW^KFShXKE>7id5z7 z6ZN8IuWavt?1*u)r=VGSu` qeuuvm!EZ(I|4|YAmdU?m@^6{^|7<4z*6;e(@A}s7`rqz%E&C4v)1$Tk literal 0 HcmV?d00001 diff --git a/contrib/samples/plot/Makefile.in b/contrib/samples/plot/Makefile.in index c305d4fcd6..8ba9e2abff 100644 --- a/contrib/samples/plot/Makefile.in +++ b/contrib/samples/plot/Makefile.in @@ -9,7 +9,7 @@ PROGRAM=plot OBJECTS=plot.o -APPEXTRALIBS=$(top_builddir)/lib/libplot.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/libwx_plot.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/src/Makefile.in b/contrib/src/Makefile.in index 15b4ebb5b0..d031944895 100644 --- a/contrib/src/Makefile.in +++ b/contrib/src/Makefile.in @@ -1,6 +1,6 @@ # $Id$ -CONTRIB_SUBDIRS=ogl mmedia stc xrc applet +CONTRIB_SUBDIRS=ogl mmedia stc xrc applet plot canvas animate all: @for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done diff --git a/contrib/src/animate/AnimateVC.dsp b/contrib/src/animate/AnimateVC.dsp new file mode 100644 index 0000000000..ecf45a4d1e --- /dev/null +++ b/contrib/src/animate/AnimateVC.dsp @@ -0,0 +1,98 @@ +# Microsoft Developer Studio Project File - Name="AnimateVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=AnimateVC - Win32 Debug +!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 "AnimateVC.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 "AnimateVC.mak" CFG="AnimateVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "AnimateVC - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "AnimateVC - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "AnimateVC - 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 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 "../../include" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\lib\anim.lib" + +!ELSEIF "$(CFG)" == "AnimateVC - 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 Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../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 +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"..\..\..\lib\animd.lib" + +!ENDIF + +# Begin Target + +# Name "AnimateVC - Win32 Release" +# Name "AnimateVC - Win32 Debug" +# Begin Source File + +SOURCE=.\animate.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\include\wx\animate\animate.h +# End Source File +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# End Target +# End Project diff --git a/contrib/src/animate/AnimateVC.dsw b/contrib/src/animate/AnimateVC.dsw new file mode 100644 index 0000000000..6f8cd06ee6 --- /dev/null +++ b/contrib/src/animate/AnimateVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "AnimateVC"=.\AnimateVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/contrib/src/animate/Makefile.in b/contrib/src/animate/Makefile.in new file mode 100644 index 0000000000..3d736e736d --- /dev/null +++ b/contrib/src/animate/Makefile.in @@ -0,0 +1,23 @@ +# $Id$ + +top_srcdir = @top_srcdir@/.. +top_builddir = ../../.. +libsrc_dir = contrib/src/animate + +TARGET_LIBNAME=libwx_anim + +LIBVERSION_CURRENT=1 +LIBVERSION_REVISION=0 +LIBVERSION_AGE=0 + +HEADER_PATH=$(top_srcdir)/contrib/include/wx +HEADER_SUBDIR=plot + +HEADERS=animate.h + +OBJECTS=animate.o + +APPEXTRADEFS=-I$(top_srcdir)/contrib/include + +include $(top_builddir)/src/makelib.env + diff --git a/contrib/src/animate/animate.cpp b/contrib/src/animate/animate.cpp new file mode 100644 index 0000000000..6a17313299 --- /dev/null +++ b/contrib/src/animate/animate.cpp @@ -0,0 +1,666 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: animate.cpp +// Purpose: Implementation of wxAnimation classes +// Author: Julian Smart and Guillermo Rodriguez Garcia +// Modified by: +// Created: 13/8/99 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ + #pragma implementation "animate.h" +#endif + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#include "wx/wfstream.h" +#include "wx/image.h" +#include "wx/gifdecod.h" +#include "wx/animate/animate.h" + +/* + * wxAnimationPlayer + */ + +IMPLEMENT_CLASS(wxAnimationPlayer, wxObject) + +wxAnimationPlayer::wxAnimationPlayer(wxAnimationBase *animation, bool destroyAnimation) +{ + m_animation = animation; + m_destroyAnimation = destroyAnimation; + m_currentFrame = 0; + m_window = (wxWindow*) NULL; + m_position = wxPoint(0, 0); + m_looped = TRUE; + m_isPlaying = FALSE; + m_useBackgroundColour = FALSE; + m_customBackgroundColour = wxColour(0, 0, 0); + m_useCustomBackgroundColour = FALSE; + m_useParentBackground = FALSE; + m_timer.SetPlayer(this); +} + +wxAnimationPlayer::~wxAnimationPlayer() +{ + Stop(); + ClearCache(); + + if (m_destroyAnimation) + delete m_animation; +} + +void wxAnimationPlayer::SetAnimation(wxAnimationBase* animation, bool destroyAnimation) +{ + ClearCache(); + if (m_destroyAnimation) + delete m_animation; + m_animation = animation; + m_destroyAnimation = destroyAnimation; +} + +// Play +bool wxAnimationPlayer::Play(wxWindow& window, const wxPoint& pos, bool looped) +{ + m_window = & window; + + if (!m_animation || !m_animation->IsValid()) + return FALSE; + + wxSize sz = GetLogicalScreenSize(); + wxRect rect(pos, sz); + SaveBackground(rect); + + if (m_frames.Number() == 0) + { + if (!Build()) + { + wxLogWarning("wxAnimationPlayer::Play: could not build the image cache."); + return FALSE; + } + } + m_currentFrame = 0; + + // Create the backing store + m_backingStore.Create(sz.x, sz.y); + + PlayFrame(); + + return TRUE; +} + +// Build animation (list of wxImages). If not called before Play +// is called, Play will call this automatically. +bool wxAnimationPlayer::Build() +{ + ClearCache(); + if (m_animation) + { + int n = GetFrameCount(); + int i; + for (i = 0; i < n; i++) + { + wxBitmap* bitmap = NULL; + wxImage* image = GetFrame(i); + if (image) + { + // If the frame has transparency, + // set the colour so converting to a bitmap + // will create a mask + wxColour transparentColour; + if (GetTransparentColour(transparentColour)) + image->SetMaskColour(transparentColour.Red(), transparentColour.Green(), transparentColour.Blue()); + + bitmap = new wxBitmap(image->ConvertToBitmap()); + delete image; + if (bitmap) + m_frames.Append(bitmap); + else + return FALSE; + } + else + return FALSE; + } + return TRUE; + } + else + return FALSE; +} + +// Stop the animation +void wxAnimationPlayer::Stop() +{ + m_timer.Stop(); + m_isPlaying = FALSE; +} + +// Draw the current view of the animation into this DC. +// Call this from your OnPaint, for example. +void wxAnimationPlayer::Draw(wxDC& dc) +{ + dc.DrawBitmap(m_backingStore, m_position.x, m_position.y); +} + + +int wxAnimationPlayer::GetFrameCount() const +{ + if (m_animation) + return m_animation->GetFrameCount(); + else + return 0; +} + +wxImage* wxAnimationPlayer::GetFrame(int i) const +{ + if (m_animation) + return m_animation->GetFrame(i); + else + return (wxImage*) NULL; +} + +wxAnimationDisposal wxAnimationPlayer::GetDisposalMethod(int i) const +{ + if (m_animation) + return m_animation->GetDisposalMethod(i); + else + return wxANIM_UNSPECIFIED; +} + +wxRect wxAnimationPlayer::GetFrameRect(int i) const +{ + if (m_animation) + return m_animation->GetFrameRect(i); + else + return wxRect(0, 0, 0, 0); +} + +int wxAnimationPlayer::GetDelay(int i) const +{ + if (m_animation) + return m_animation->GetDelay(i); + else + return 0; +} + +wxSize wxAnimationPlayer::GetLogicalScreenSize() const +{ + if (m_animation) + return m_animation->GetLogicalScreenSize(); + else + return wxSize(0, 0); +} + +bool wxAnimationPlayer::GetBackgroundColour(wxColour& col) const +{ + if (m_animation) + return m_animation->GetBackgroundColour(col); + else + return FALSE; +} + +bool wxAnimationPlayer::GetTransparentColour(wxColour& col) const +{ + if (m_animation) + return m_animation->GetTransparentColour(col); + else + return FALSE; +} + +// Play the frame +bool wxAnimationPlayer::PlayFrame(int frame, wxWindow& window, wxPoint& pos) +{ + wxMemoryDC dc; + dc.SelectObject(m_backingStore); + + // Draw the background: colour or area beneath animation + wxColour col(255, 255, 255); + + if (UsingBackgroundColour()) + { + if (UsingCustomBackgroundColour()) + col = GetCustomBackgroundColour(); + else + { + GetBackgroundColour(col); + } + + // Draw the background colour loaded from the animation + // (or set by the user) + DrawBackground(dc, wxPoint(0, 0), col); + } + else + { + // Draw background we saved + dc.DrawBitmap(m_savedBackground, 0, 0); + } + + // Draw all intermediate frames that haven't been removed from the + // animation + int i; + for (i = 0; i < (frame - 1); i++) + { + if ((GetDisposalMethod(i) == wxANIM_DONOTREMOVE) || (GetDisposalMethod(i) == wxANIM_UNSPECIFIED)) + { + DrawFrame(i, dc, wxPoint(0, 0)); + } + } + DrawFrame(frame, dc, wxPoint(0, 0)); + + dc.SelectObject(wxNullBitmap); + + // Draw from backing bitmap onto window + wxClientDC clientDC(& window); + Draw(clientDC); + + return TRUE; +} + +bool wxAnimationPlayer::PlayFrame() +{ + m_isPlaying = TRUE; + + PlayFrame(GetCurrentFrame(), * GetWindow(), GetPosition()); + + // Set the timer for the next frame + m_timer.Start(GetDelay(GetCurrentFrame())); + + m_currentFrame ++; + + if (m_currentFrame == GetFrameCount()) + { + // Should a non-looped animation display the last frame? + if (!m_looped) + { + m_timer.Stop(); + m_isPlaying = FALSE; + } + else + m_currentFrame = 0; + } + + return TRUE; +} + +// Clear the wxImage cache +void wxAnimationPlayer::ClearCache() +{ + wxNode* node = m_frames.First(); + while (node) + { + wxNode* next = node->Next(); + wxBitmap* bitmap = (wxBitmap*) node->Data(); + delete bitmap; + delete node; + node = next; + } +} + +// Draw the background colour +void wxAnimationPlayer::DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& colour) +{ + wxASSERT_MSG( (m_animation != NULL), "Animation not present in wxAnimationPlayer"); + wxASSERT_MSG( (m_frames.Number() != 0), "Animation cache not present in wxAnimationPlayer"); + + // Optimization: if the first frame fills the whole area, and is non-transparent, + // don't bother drawing the background + + wxBitmap* firstBitmap = (wxBitmap*) m_frames.First()->Data() ; + wxSize screenSize = GetLogicalScreenSize(); + if (!firstBitmap->GetMask() && (firstBitmap->GetWidth() == screenSize.x) && (firstBitmap->GetHeight() == screenSize.y)) + { + return; + } + + wxBrush brush(colour, wxSOLID); + wxPen pen(colour, 1, wxSOLID); + dc.SetBrush(brush); + dc.SetPen(pen); + dc.SetLogicalFunction(wxCOPY); + + dc.DrawRectangle(pos.x, pos.y, screenSize.x, screenSize.y); +} + +// Save the pertinent area of the window so we can restore +// it if drawing transparently +void wxAnimationPlayer::SaveBackground(const wxRect& rect) +{ + wxASSERT( GetWindow() ); + + if (!GetWindow()) + return; + + m_savedBackground.Create(rect.width, rect.height); + + wxMemoryDC memDC; + memDC.SelectObject(m_savedBackground); + + if (m_useParentBackground && GetWindow()->GetParent()) + { + wxWindow* parent = GetWindow()->GetParent(); + wxClientDC dc(parent); + + // Translate the point to coordinates in the + // parent's client area, going via screen coordinates + wxPoint pt(rect.x, rect.y); + wxPoint screenPt = GetWindow()->ClientToScreen(pt); + wxPoint parentPt = parent->ScreenToClient(screenPt); + + memDC.Blit(0, 0, rect.width, rect.height, & dc, parentPt.x, parentPt.y); + } + else + { + wxClientDC dc(GetWindow()); + + memDC.Blit(0, 0, rect.width, rect.height, & dc, rect.x, rect.y); + } + memDC.SelectObject(wxNullBitmap); +} + +// Draw this frame +void wxAnimationPlayer::DrawFrame(int frame, wxDC& dc, const wxPoint& pos) +{ + wxASSERT_MSG( (m_animation != NULL), "Animation not present in wxAnimationPlayer"); + wxASSERT_MSG( (m_frames.Number() != 0), "Animation cache not present in wxAnimationPlayer"); + wxASSERT_MSG( (m_frames.Nth(frame) != (wxNode*) NULL), "Image not present in wxAnimationPlayer::DrawFrame"); + + wxBitmap* bitmap = (wxBitmap*) m_frames.Nth(frame)->Data() ; + + wxRect rect = GetFrameRect(frame); + + dc.DrawBitmap(* bitmap, pos.x + rect.x, pos.y + rect.y, (bitmap->GetMask() != NULL)); +} + +void wxAnimationTimer::Notify() +{ + m_player->PlayFrame(); +} + +/* + * wxAnimationBase + */ + +IMPLEMENT_ABSTRACT_CLASS(wxAnimationBase, wxObject) + +/* + * wxGIFAnimation + */ + +IMPLEMENT_CLASS(wxGIFAnimation, wxAnimationBase) + +wxGIFAnimation::wxGIFAnimation() +{ + m_decoder = (wxGIFDecoder*) NULL; +} + +wxGIFAnimation::~wxGIFAnimation() +{ + delete m_decoder; +} + +int wxGIFAnimation::GetFrameCount() const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + return m_decoder->GetNumberOfFrames(); +} + +wxImage* wxGIFAnimation::GetFrame(int i) const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + m_decoder->GoFrame(i); + + wxImage* image = new wxImage; + m_decoder->ConvertToImage(image); + return image; +} + +wxAnimationDisposal wxGIFAnimation::GetDisposalMethod(int i) const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + m_decoder->GoFrame(i); + + int disposalMethod = m_decoder->GetDisposalMethod(); + return (wxAnimationDisposal) disposalMethod; +} + +wxRect wxGIFAnimation::GetFrameRect(int i) const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + m_decoder->GoFrame(i); + + wxRect rect(m_decoder->GetLeft(), m_decoder->GetTop(), m_decoder->GetWidth(), m_decoder->GetHeight()); + return rect; +} + +int wxGIFAnimation::GetDelay(int i) const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + m_decoder->GoFrame(i); + return m_decoder->GetDelay(); +} + +wxSize wxGIFAnimation::GetLogicalScreenSize() const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + return wxSize(m_decoder->GetLogicalScreenWidth(), m_decoder->GetLogicalScreenHeight()); +} + +bool wxGIFAnimation::GetBackgroundColour(wxColour& col) const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + int i = m_decoder->GetBackgroundColour(); + if (i == -1) + return FALSE; + else + { + unsigned char* pal = m_decoder->GetPalette(); + + if (pal) + { + col = wxColour(pal[3*i + 0], pal[3*i + 1], pal[3*i + 2]); + return TRUE; + } + else + return FALSE; + } +} + +bool wxGIFAnimation::GetTransparentColour(wxColour& col) const +{ + wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL"); + + int i = m_decoder->GetTransparentColour(); + if (i == -1) + return FALSE; + else + { + unsigned char* pal = m_decoder->GetPalette(); + + if (pal) + { + col = wxColour(pal[3*i + 0], pal[3*i + 1], pal[3*i + 2]); + return TRUE; + } + else + return FALSE; + } +} + +bool wxGIFAnimation::IsValid() const +{ + return ((m_decoder != NULL) && (m_decoder->IsAnimation())); +} + +bool wxGIFAnimation::LoadFile(const wxString& filename) +{ + if (m_decoder) + delete m_decoder; + m_decoder = NULL; + + if (wxFileExists(filename)) + { + wxFileInputStream stream(filename); + m_decoder = new wxGIFDecoder(& stream, TRUE); + + if (m_decoder->ReadGIF() != wxGIF_OK) + { + delete m_decoder; + m_decoder = NULL; + return FALSE; + } + + if (!m_decoder->IsAnimation()) + { + delete m_decoder; + m_decoder = NULL; + + return FALSE; + } + else + return TRUE; + } + else + return FALSE; +} + +/* + * wxAnimationCtrlBase + * Abstract base class for format-specific animation controls. + * This class implements most of the functionality; all a derived + * class has to do is create the appropriate animation class on demand. + */ + +IMPLEMENT_ABSTRACT_CLASS(wxAnimationCtrlBase, wxControl) + +BEGIN_EVENT_TABLE(wxAnimationCtrlBase, wxControl) + EVT_PAINT(wxAnimationCtrlBase::OnPaint) +END_EVENT_TABLE() + +bool wxAnimationCtrlBase::Create(wxWindow *parent, wxWindowID id, + const wxString& filename, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) +{ + m_animation = NULL; + m_filename = filename; + + if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name)) + return FALSE; + + SetBackgroundColour(parent->GetBackgroundColour()); + + m_animationPlayer.SetCustomBackgroundColour(GetBackgroundColour()); + + // Want to give the impression of transparency by painting + // the parent background +// if (parent) +// m_animationPlayer.UseParentBackground(TRUE); + m_animationPlayer.SetWindow(this); + m_animationPlayer.SetPosition(wxPoint(0, 0)); + m_animationPlayer.SetDestroyAnimation(FALSE); + + return TRUE; +} + +wxAnimationCtrlBase::~wxAnimationCtrlBase() +{ + if (m_animationPlayer.IsPlaying()) + m_animationPlayer.Stop(); + m_animationPlayer.SetAnimation(NULL, FALSE); + delete m_animation; +} + +bool wxAnimationCtrlBase::LoadFile(const wxString& filename) +{ + if (m_animationPlayer.IsPlaying()) + m_animationPlayer.Stop(); + + wxString filename1(filename); + + if (filename1.IsEmpty()) + filename1 = m_filename; + + if (filename1.IsEmpty()) + return FALSE; + + if (m_animation) + { + delete m_animation; + m_animation = NULL; + } + + m_animation = DoCreateAnimation(filename1); + if (!m_animation) + return FALSE; + + if (!m_animation->LoadFile(filename) || !m_animation->IsValid()) + { + delete m_animation; + m_animation = NULL; + return FALSE; + } + m_animationPlayer.SetAnimation(m_animation, FALSE); + + if (GetWindowStyle() & wxAN_FIT_ANIMATION) + FitToAnimation(); + + return TRUE; +} + +bool wxAnimationCtrlBase::Play(bool looped) +{ + return m_animationPlayer.Play(*this, wxPoint(0, 0), looped); +} + +wxSize wxAnimationCtrlBase::DoGetBestSize() const +{ + if (m_animationPlayer.HasAnimation() && (GetWindowStyle() & wxAN_FIT_ANIMATION)) + { + return m_animationPlayer.GetLogicalScreenSize(); + } + else + { + return GetSize(); + } +} + +void wxAnimationCtrlBase::FitToAnimation() +{ + if (!m_animationPlayer.HasAnimation()) + return; + + wxSize sz = m_animationPlayer.GetLogicalScreenSize(); + SetClientSize(sz); +} + +void wxAnimationCtrlBase::OnPaint(wxPaintEvent& event) +{ + wxPaintDC dc(this); + + if (GetPlayer().IsPlaying()) + { + GetPlayer().Draw(dc); + } +} + +/* + * wxGIFAnimationCtrl + * Provides a GIF animation class when required. + */ + +IMPLEMENT_ABSTRACT_CLASS(wxGIFAnimationCtrl, wxAnimationCtrlBase) + +wxAnimationBase* wxGIFAnimationCtrl::DoCreateAnimation(const wxString& WXUNUSED(filename)) +{ + return new wxGIFAnimation; +} diff --git a/contrib/src/animate/makefile.b32 b/contrib/src/animate/makefile.b32 new file mode 100644 index 0000000000..12b6763bd0 --- /dev/null +++ b/contrib/src/animate/makefile.b32 @@ -0,0 +1,17 @@ +# +# File: makefile.b32 +# Author: Julian Smart +# Created: 1999 +# Updated: +# Copyright: +# +# Makefile : Builds Animation library for 32-bit BC++ + +WXDIR = $(WXWIN) + +LIBTARGET=$(WXDIR)\lib\anim.lib + +OBJECTS = animate.obj + +!include $(WXDIR)\src\makelib.b32 + diff --git a/contrib/src/animate/makefile.g95 b/contrib/src/animate/makefile.g95 new file mode 100644 index 0000000000..ebd2c66d18 --- /dev/null +++ b/contrib/src/animate/makefile.g95 @@ -0,0 +1,16 @@ +# +# File: makefile.g95 +# Author: Julian Smart +# Created: 1999 +# Updated: +# Copyright: (c) Julian Smart, 1999 +# +# Makefile for wxWindows Animation library Cygwin/Mingw32). + +WXDIR = ../../.. + +LIBTARGET=$(WXDIR)/lib/libanim.a +OBJECTS = animate.o + +include $(WXDIR)/src/makelib.g95 + diff --git a/contrib/src/animate/makefile.vc b/contrib/src/animate/makefile.vc new file mode 100644 index 0000000000..b0f433e947 --- /dev/null +++ b/contrib/src/animate/makefile.vc @@ -0,0 +1,144 @@ + +# File: makefile.vc +# Author: Julian Smart +# Created: 2001 +# Updated: +# Copyright: (c) 2001, Julian Smart +# +# "%W% %G%" +# +# Makefile : Builds Plot class library (MS VC++). +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + + +# Set WXDIR for your system +WXDIR = $(WXWIN) +GIZMOSDIR = $(WXDIR)\contrib\src\animate +GIZMOSINC = $(WXDIR)\contrib\include\wx\animate +THISDIR = $(WXDIR)\contrib\src\animate +DOCDIR=$(WXDIR)\contrib\docs +LOCALDOCDIR=$(WXDIR)\contrib\docs\latex\animate + +!include $(WXDIR)\src\makevc.env + +OBJECTS = $(D)\animate.obj + +LIBTARGET=$(WXDIR)\lib\anim$(LIBEXT).lib + +all: $(D) $(LIBTARGET) + +$(D) : + mkdir $(D) + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.vc FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.vc clean + cd $(THISDIR) + +$(LIBTARGET): $(OBJECTS) + -erase $(LIBTARGET) + $(implib) @<< +-out:$(LIBTARGET) +-machine:$(CPU) +$(OBJECTS) +<< + +$(D)\animate.obj: animate.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF) +<< + +clean: + -erase $(D)\*.obj + -erase *.sbr + -erase *.exe + -erase *.res + -erase *.map + -erase *.pdb + -erase $(LIBTARGET) + +DOCSOURCES=$(LOCALDOCDIR)\animate.tex \ + $(LOCALDOCDIR)\bugs.tex $(LOCALDOCDIR)\changes.tex\ + $(LOCALDOCDIR)\classes.tex $(LOCALDOCDIR)\intro.tex\ + $(LOCALDOCDIR)\topics.tex $(LOCALDOCDIR)\sample.tex + +html: $(DOCDIR)\html\animate\animate.htm +htmlhelp: $(DOCDIR)\htmlhelp\animate.chm +htb: $(DOCDIR)\htb\animate.htb +hlp: $(DOCDIR)\winhelp\animate.hlp +pdfrtf: $(DOCDIR)\pdf\animate.rtf +ps: $(DOCDIR)\ps\animate.ps + +touchmanual: + touch $(LOCALDOCDIR)\animate.tex + + +$(DOCDIR)\winhelp\animate.hlp: $(LOCALDOCDIR)\animate.rtf $(LOCALDOCDIR)\animate.hpj + cd $(LOCALDOCDIR) + -erase animate.ph + hc animate + move animate.hlp $(DOCDIR)\winhelp\animate.hlp + move animate.cnt $(DOCDIR)\winhelp\animate.cnt + cd $(THISDIR) + +$(LOCALDOCDIR)\animate.rtf: $(DOCSOURCES) + cd $(LOCALDOCDIR) + -start $(WAITFLAG) tex2rtf $(LOCALDOCDIR)\animate.tex $(LOCALDOCDIR)\animate.rtf -twice -winhelp + cd $(THISDIR) + +$(DOCDIR)\pdf\animate.rtf: $(DOCSOURCES) + cd $(LOCALDOCDIR) + -copy *.bmp $(DOCDIR)\pdf + -start $(WAITFLAG) tex2rtf $(LOCALDOCDIR)\animate.tex $(DOCDIR)\pdf\animate.rtf -twice -rtf + cd $(THISDIR) + +$(DOCDIR)\html\animate\animate.htm: $(DOCSOURCES) + cd $(LOCALDOCDIR) + -mkdir $(DOCDIR)\html\animate + copy *.gif $(DOCDIR)\html\animate + -start $(WAITFLAG) tex2rtf $(LOCALDOCDIR)\animate.tex $(DOCDIR)\html\animate\animate.htm -twice -html + -erase $(DOCDIR)\html\animate\*.con + -erase *.con + -erase $(DOCDIR)\html\animate\*.ref + cd $(THISDIR) + +$(DOCDIR)\htmlhelp\animate.chm: $(DOCDIR)\html\animate\animate.htm $(DOCDIR)\html\animate\animate.hhp + cd $(DOCDIR)\html\animate + -hhc animate.hhp + move animate.chm $(DOCDIR)\htmlhelp\animate.chm + cd $(THISDIR) + +# An htb file is a zip file containing the .htm, .gif, .hhp, .hhc and .hhk +# files, renamed to htb. +# This can then be used with e.g. helpview. +# Optionally, a cached version of the .hhp file can be generated with hhp2cached. +$(DOCDIR)\htb\animate.htb: $(DOCDIR)\html\animate\animate.htm + cd $(DOCDIR)\html\animate + -erase animate.zip animate.htb + zip animate.zip *.htm *.gif *.hhp *.hhc *.hhk + -mkdir $(DOCDIR)\htb + move animate.zip $(DOCDIR)\htb\animate.htb + cd $(THISDIR) + +$(LOCALDOCDIR)\animate.dvi: $(DOCSOURCES) + cd $(LOCALDOCDIR) + -latex animate + -latex animate + -makeindx animate + -bibtex animate + -latex animate + -latex animate + cd $(THISDIR) + +$(WXDIR)\docs\ps\animate.ps: $(LOCALDOCDIR)\animate.dvi + cd $(LOCALDOCDIR) + -dvips32 -o animate.ps animate + move animate.ps $(WXDIR)\docs\ps\animate.ps + cd $(THISDIR) + diff --git a/contrib/src/animate/readme.txt b/contrib/src/animate/readme.txt new file mode 100644 index 0000000000..8ad6f7cd88 --- /dev/null +++ b/contrib/src/animate/readme.txt @@ -0,0 +1,35 @@ +Animation sample +================ + +Every now and then someone asks whether there are animation +classes in wxWindows. I started these animation player classes +nearly two years ago and never got round to finishing them. +Now I've done some hacking on them and (after very limited testing) +it seems to work on Windows for animated GIFs, both transparent +and non-transparent. + +Basically the classes makes use of the existing GIF decoder in +wxWindows to read an animated GIF into wxGIFAnimation, and then +play that animation using wxAnimationPlayer. It's very much tied +to the animated GIF format, so don't expect anything too generic. +However, it would be quite possible to write code to convert an animated +GIF into a PNG-based invented format, and then write a wxPNGAnimation +handler. + +The next steps are: + +1. Test on other platforms. +2. Write control classes to make it easy to embed animations in dialogs, etc. + See my thoughts in animate.h. +3. Write documentation. + +*** IMPORTANT NOTE: to compile this, you must first edit the +file: + +include/wx/gifdecod.h + +and change the keyword 'protected' to 'public', then recompile +wxWindows. If you have downloaded the latest code from the CVS trunk, +the problem has been corrected already. + +Julian Smart, 5th July 2001 diff --git a/distrib/msw/contrib.rsp b/distrib/msw/contrib.rsp index 74ecbe1fe9..2dc82acade 100644 --- a/distrib/msw/contrib.rsp +++ b/distrib/msw/contrib.rsp @@ -91,6 +91,19 @@ contrib/samples/gizmos/editlbox/*.rc contrib/samples/gizmos/editlbox/EditlboxVC.dsp contrib/samples/gizmos/editlbox/EditlboxVC.dsw +contrib/samples/animate/*.cpp +contrib/samples/animate/*.h +contrib/samples/animate/*.def +contrib/samples/animate/makefile* +contrib/samples/animate/*.xbm +contrib/samples/animate/*.xpm +contrib/samples/animate/*.txt +contrib/samples/animate/*.ico +contrib/samples/animate/*.bmp +contrib/samples/animate/*.rc +contrib/samples/animate/AnimVC.dsp +contrib/samples/animate/AnimVC.dsw + contrib/src/canvas/*.cpp contrib/src/canvas/*.h contrib/src/canvas/make* @@ -127,3 +140,11 @@ contrib/include/wx/applet/*.xpm contrib/include/wx/applet/*.bmp contrib/include/wx/applet/*.rc +contrib/src/animate/*.cpp +contrib/src/animate/*.h +contrib/src/animate/make* +contrib/src/animate/readme.txt +contrib/src/animate/AnimateVC.dsp +contrib/src/animate/AnimateVC.dsw +contrib/include/wx/animate/*.h + diff --git a/distrib/msw/makefile.rsp b/distrib/msw/makefile.rsp index 77c5173d82..0ed900b1ca 100644 --- a/distrib/msw/makefile.rsp +++ b/distrib/msw/makefile.rsp @@ -95,6 +95,7 @@ contrib/src/mmedia/Makefile.in contrib/src/stc/Makefile.in contrib/src/plot/Makefile.in contrib/src/gizmos/Makefile.in +contrib/src/animate/Makefile.in contrib/samples/Makefile.in contrib/samples/canvas/test/Makefile.in @@ -111,6 +112,7 @@ contrib/samples/mmedia/Makefile.in contrib/samples/plot/Makefile.in contrib/samples/stc/Makefile.in contrib/samples/applet/Makefile.in +contrib/samples/animate/Makefile.in contrib/utils/Makefile.in diff --git a/distrib/msw/vc.rsp b/distrib/msw/vc.rsp index 78400b4d0f..fdf11f9c2e 100644 --- a/distrib/msw/vc.rsp +++ b/distrib/msw/vc.rsp @@ -319,3 +319,11 @@ contrib/samples/gizmos/multicell/MulticellVC.dsp contrib/samples/gizmos/multicell/MulticellVC.dsw contrib/samples/gizmos/splittree/TreeVC.dsp contrib/samples/gizmos/splittree/TreeVC.dsw +contrib/samples/gizmos/editlbox/EditlboxVC.dsp +contrib/samples/gizmos/editlbox/EditlboxVC.dsw + +contrib/src/animate/AnimateVC.dsp +contrib/src/animate/AnimateVC.dsw +contrib/samples/animate/AniTestVC.dsp +contrib/samples/animate/AniTestVC.dsw + -- 2.45.2