fixed animate in Unicode mode and removed use of deprecated methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,12 +21,20 @@
|
|||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/list.h>
|
#include <wx/list.h>
|
||||||
#include <wx/timer.h>
|
#include <wx/timer.h>
|
||||||
|
#include <wx/bitmap.h>
|
||||||
|
#include <wx/colour.h>
|
||||||
|
#include <wx/control.h>
|
||||||
|
|
||||||
//#define ANIMDLLEXPORT WXDLLEXPORT
|
#ifdef WXMAKINGDLL_ANIMATE
|
||||||
#define ANIMDLLEXPORT
|
#define WXDLLIMPEXP_ANIMATE WXEXPORT
|
||||||
|
#elif defined(WXUSINGDLL)
|
||||||
|
#define WXDLLIMPEXP_ANIMATE WXIMPORT
|
||||||
|
#else // not making nor using DLL
|
||||||
|
#define WXDLLIMPEXP_ANIMATE
|
||||||
|
#endif
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationBase;
|
class WXDLLIMPEXP_ANIMATE wxAnimationBase;
|
||||||
class ANIMDLLEXPORT wxAnimationPlayer;
|
class WXDLLIMPEXP_ANIMATE wxAnimationPlayer;
|
||||||
class WXDLLEXPORT wxImage;
|
class WXDLLEXPORT wxImage;
|
||||||
|
|
||||||
enum wxAnimationDisposal
|
enum wxAnimationDisposal
|
||||||
@@ -37,7 +45,7 @@ enum wxAnimationDisposal
|
|||||||
wxANIM_TOPREVIOUS = 2
|
wxANIM_TOPREVIOUS = 2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationTimer: public wxTimer
|
class WXDLLIMPEXP_ANIMATE wxAnimationTimer: public wxTimer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxAnimationTimer() { m_player = (wxAnimationPlayer*) NULL; }
|
wxAnimationTimer() { m_player = (wxAnimationPlayer*) NULL; }
|
||||||
@@ -50,13 +58,13 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* wxAnimationPlayer
|
/* wxAnimationPlayer
|
||||||
* Create an object of this class, and either pass an wxXXXAnimation object in the constructor,
|
* Create an object of this class, and either pass an wxXXXAnimation object in
|
||||||
* or call SetAnimation. Then call Play().
|
* the constructor, or call SetAnimation. Then call Play(). The wxAnimation
|
||||||
* The wxAnimation object is only destroyed in the destructor if destroyAnimation is TRUE
|
* object is only destroyed in the destructor if destroyAnimation is TRUE in
|
||||||
* in the constructor.
|
* the constructor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationPlayer : public wxObject
|
class WXDLLIMPEXP_ANIMATE wxAnimationPlayer : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxAnimationPlayer)
|
DECLARE_CLASS(wxAnimationPlayer)
|
||||||
|
|
||||||
@@ -173,14 +181,15 @@ protected:
|
|||||||
|
|
||||||
/* wxAnimationBase
|
/* wxAnimationBase
|
||||||
* Base class for animations.
|
* Base class for animations.
|
||||||
* A wxXXXAnimation only stores the animation, providing accessors to wxAnimationPlayer.
|
* A wxXXXAnimation only stores the animation, providing accessors to
|
||||||
* Currently an animation is read-only, but we could extend the API for adding frames
|
* wxAnimationPlayer. Currently an animation is read-only, but we could
|
||||||
* programmatically, and perhaps have a wxMemoryAnimation class that stores its frames
|
* extend the API for adding frames programmatically, and perhaps have a
|
||||||
* in memory, and is able to save all files with suitable filenames. You could then use
|
* wxMemoryAnimation class that stores its frames in memory, and is able to
|
||||||
* e.g. Ulead GIF Animator to load the image files into a GIF animation.
|
* 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
|
class WXDLLIMPEXP_ANIMATE wxAnimationBase : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_ABSTRACT_CLASS(wxAnimationBase)
|
DECLARE_ABSTRACT_CLASS(wxAnimationBase)
|
||||||
|
|
||||||
@@ -212,9 +221,9 @@ public:
|
|||||||
* This will be moved to a separate file in due course.
|
* This will be moved to a separate file in due course.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxGIFDecoder;
|
class WXDLLIMPEXP_ANIMATE wxGIFDecoder;
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxGIFAnimation : public wxAnimationBase
|
class WXDLLIMPEXP_ANIMATE wxGIFAnimation : public wxAnimationBase
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxGIFAnimation)
|
DECLARE_CLASS(wxGIFAnimation)
|
||||||
|
|
||||||
@@ -255,7 +264,7 @@ protected:
|
|||||||
// Resize to animation size if this is set
|
// Resize to animation size if this is set
|
||||||
#define wxAN_FIT_ANIMATION 0x0010
|
#define wxAN_FIT_ANIMATION 0x0010
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxAnimationCtrlBase: public wxControl
|
class WXDLLIMPEXP_ANIMATE wxAnimationCtrlBase: public wxControl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxAnimationCtrlBase() { }
|
wxAnimationCtrlBase() { }
|
||||||
@@ -312,7 +321,7 @@ private:
|
|||||||
* Provides a GIF animation class when required.
|
* Provides a GIF animation class when required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ANIMDLLEXPORT wxGIFAnimationCtrl: public wxAnimationCtrlBase
|
class WXDLLIMPEXP_ANIMATE wxGIFAnimationCtrl: public wxAnimationCtrlBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxGIFAnimationCtrl() { }
|
wxGIFAnimationCtrl() { }
|
||||||
|
@@ -1,24 +1,113 @@
|
|||||||
#
|
# =========================================================================
|
||||||
# File: makefile.unx
|
# This makefile was generated by
|
||||||
# Author: Julian Smart
|
# Bakefile 0.1.1 (http://bakefile.sourceforge.net)
|
||||||
# Created: 1998
|
# Do not modify, all changes will be overwritten!
|
||||||
# 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
|
@MAKE_SET@
|
||||||
|
|
||||||
OBJECTS=$(PROGRAM).o
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
EXTRALIBS = @EXTRALIBS@
|
||||||
|
EXTRALIBS_GUI = @EXTRALIBS_GUI@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LDFLAGS_GUI = @LDFLAGS_GUI@
|
||||||
|
RESCOMP = @RESCOMP@
|
||||||
|
SAMPLES_RPATH_FLAG = @SAMPLES_RPATH_FLAG@
|
||||||
|
SETFILE = @SETFILE@
|
||||||
|
TOOLKIT = @TOOLKIT@
|
||||||
|
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
|
||||||
|
TOOLKIT_VERSION = @TOOLKIT_VERSION@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
|
||||||
APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_anim-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@
|
### Variables: ###
|
||||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
|
||||||
|
|
||||||
include $(top_builddir)/src/makeprog.env
|
ANITEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) -I$(srcdir) $(__DLLFLAG_p) -I$(srcdir)/../../include $(CXXFLAGS)
|
||||||
|
|
||||||
|
### Conditionally set variables: ###
|
||||||
|
|
||||||
|
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
|
||||||
|
@COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX)
|
||||||
|
@COND_USE_GUI_0@PORTNAME = base
|
||||||
|
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
|
||||||
|
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
|
||||||
|
@COND_BUILD_DEBUG@WXDEBUGFLAG = d
|
||||||
|
@COND_UNICODE_1@WXUNICODEFLAG = u
|
||||||
|
@COND_WXUNIV_1@WXUNIVNAME = univ
|
||||||
|
@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
|
||||||
|
@COND_SHARED_1@__DLLFLAG_p_1 = -d WXUSINGDLL
|
||||||
|
@COND_WXUSE_LIBJPEG_BUILTIN@__INC_JPEG_p = -I$(top_srcdir)/src/jpeg
|
||||||
|
@COND_WXUSE_LIBJPEG_BUILTIN@__INC_JPEG_p_1 = -i $(top_srcdir)/src/jpeg
|
||||||
|
@COND_WXUSE_ODBC_BUILTIN@__INC_ODBC_p = -I$(top_srcdir)/src/odbc
|
||||||
|
@COND_WXUSE_ODBC_BUILTIN@__INC_ODBC_p_1 = -i $(top_srcdir)/src/odbc
|
||||||
|
@COND_WXUSE_LIBPNG_BUILTIN@__INC_PNG_p = -I$(top_srcdir)/src/png
|
||||||
|
@COND_WXUSE_LIBPNG_BUILTIN@__INC_PNG_p_1 = -i $(top_srcdir)/src/png
|
||||||
|
@COND_WXUSE_REGEX_BUILTIN@__INC_REGEX_p = -I$(top_srcdir)/src/regex
|
||||||
|
@COND_WXUSE_REGEX_BUILTIN@__INC_REGEX_p_1 = -i $(top_srcdir)/src/regex
|
||||||
|
@COND_WXUSE_LIBTIFF_BUILTIN@__INC_TIFF_p = -I$(top_srcdir)/src/tiff
|
||||||
|
@COND_WXUSE_LIBTIFF_BUILTIN@__INC_TIFF_p_1 = -i $(top_srcdir)/src/tiff
|
||||||
|
@COND_WXUSE_ZLIB_BUILTIN@__INC_ZLIB_p = -I$(top_srcdir)/src/zlib
|
||||||
|
@COND_WXUSE_ZLIB_BUILTIN@__INC_ZLIB_p_1 = -i $(top_srcdir)/src/zlib
|
||||||
|
@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = -lwxodbc$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = -lwxregex$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = -lwxzlib$(WXDEBUGFLAG)
|
||||||
|
@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -i $(srcdir)/../../include -o anitest$(EXEEXT) Carbon.r $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5.0.r
|
||||||
|
@COND_MONOLITHIC_0@__WXLIB_BASE_p = -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5
|
||||||
|
@COND_MONOLITHIC_0@__WXLIB_CORE_p = -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5
|
||||||
|
@COND_MONOLITHIC_1@__WXLIB_MONO_p = -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5
|
||||||
|
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
|
||||||
|
@COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__
|
||||||
|
@COND_PLATFORM_MAC_1@__anitest___mac_rezcmd = $(__MACOSX_RESOURCES_p_1)
|
||||||
|
@COND_PLATFORM_MAC_1@__anitest___mac_setfilecmd = $(SETFILE) -a C anitest$(EXEEXT)
|
||||||
|
|
||||||
|
### Targets: ###
|
||||||
|
|
||||||
|
all: anitest$(EXEEXT) data
|
||||||
|
|
||||||
|
anitest$(EXEEXT): anitest_anitest.o
|
||||||
|
$(CXX) -o $@ anitest_anitest.o $(LDFLAGS) -L$(top_builddir)lib $(SAMPLES_RPATH_FLAG) $(LDFLAGS_GUI) $(__WXLIB_MONO_p) -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(EXTRALIBS) $(EXTRALIBS_GUI)
|
||||||
|
$(__anitest___mac_rezcmd)
|
||||||
|
$(__anitest___mac_setfilecmd)
|
||||||
|
|
||||||
|
anitest_anitest.o: $(srcdir)/anitest.cpp
|
||||||
|
$(CXXC) -c -o $@ $(ANITEST_CXXFLAGS) $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf ./.deps
|
||||||
|
rm -f -f ./*.o
|
||||||
|
rm -f anitest$(EXEEXT)
|
||||||
|
|
||||||
|
data:
|
||||||
|
@mkdir -p .
|
||||||
|
@for f in bttrfly.gif hooked.gif tbttrfly.gif mondrian.ico; do \
|
||||||
|
if test \( ! -s ./$$f \) -o \( $(srcdir)/$$f -nt ./$$f \) ; then \
|
||||||
|
cp -pRf $(srcdir)/$$f . ; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f configure config.cache config.log config.status
|
||||||
|
rm -f bk-deps shared-ld-sh
|
||||||
|
|
||||||
|
install: all
|
||||||
|
|
||||||
|
install-strip: install
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
|
||||||
|
|
||||||
|
# Include dependency info, if present:
|
||||||
|
@IF_GNU_MAKE@-include .deps/*.d
|
||||||
|
|
||||||
|
.PHONY: all clean distclean install uninstall
|
||||||
|
@@ -65,7 +65,7 @@ bool MyApp::OnInit()
|
|||||||
{
|
{
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
|
|
||||||
MyFrame* frame = new MyFrame((wxFrame *)NULL, -1, "Animation Demo",
|
MyFrame* frame = new MyFrame((wxFrame *)NULL, -1, _T("Animation Demo"),
|
||||||
wxPoint(-1, -1), wxSize(500, 400),
|
wxPoint(-1, -1), wxSize(500, 400),
|
||||||
wxDEFAULT_FRAME_STYLE);
|
wxDEFAULT_FRAME_STYLE);
|
||||||
|
|
||||||
@@ -79,16 +79,16 @@ bool MyApp::OnInit()
|
|||||||
// Make a menubar
|
// Make a menubar
|
||||||
wxMenu *file_menu = new wxMenu;
|
wxMenu *file_menu = new wxMenu;
|
||||||
|
|
||||||
file_menu->Append(ANITEST_OPEN, "&Open Animation...\tCtrl+O", "Open a GIF animation");
|
file_menu->Append(ANITEST_OPEN, _T("&Open Animation...\tCtrl+O"), _T("Open a GIF animation"));
|
||||||
file_menu->Append(ANITEST_QUIT, "&Exit\tAlt+X", "Quit the program");
|
file_menu->Append(ANITEST_QUIT, _T("&Exit\tAlt+X"), _T("Quit the program"));
|
||||||
|
|
||||||
wxMenu *help_menu = new wxMenu;
|
wxMenu *help_menu = new wxMenu;
|
||||||
help_menu->Append(ANITEST_ABOUT, "&About\tF1");
|
help_menu->Append(ANITEST_ABOUT, _T("&About\tF1"));
|
||||||
|
|
||||||
wxMenuBar *menu_bar = new wxMenuBar;
|
wxMenuBar *menu_bar = new wxMenuBar;
|
||||||
|
|
||||||
menu_bar->Append(file_menu, "&File");
|
menu_bar->Append(file_menu, _T("&File"));
|
||||||
menu_bar->Append(help_menu, "&Help");
|
menu_bar->Append(help_menu, _T("&Help"));
|
||||||
|
|
||||||
// Associate the menu bar with the frame
|
// Associate the menu bar with the frame
|
||||||
frame->SetMenuBar(menu_bar);
|
frame->SetMenuBar(menu_bar);
|
||||||
@@ -139,14 +139,14 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
|
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
(void)wxMessageBox("wxWindows 2 Animation Demo\n"
|
(void)wxMessageBox(_T("wxWindows 2 Animation Demo\n")
|
||||||
"Author: Julian Smart (c) 2001\n",
|
_T("Author: Julian Smart (c) 2001\n"),
|
||||||
"About Animation Demo");
|
_T("About Animation Demo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnOpen(wxCommandEvent& event)
|
void MyFrame::OnOpen(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
wxFileDialog dialog(this, wxT("Please choose an animated GIF"),
|
wxFileDialog dialog(this, _T("Please choose an animated GIF"),
|
||||||
wxEmptyString, wxEmptyString, wxT("*.gif"), wxOPEN);
|
wxEmptyString, wxEmptyString, wxT("*.gif"), wxOPEN);
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
@@ -159,7 +159,7 @@ void MyFrame::OnOpen(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxMessageBox("Sorry, this animation was not a valid animated GIF.");
|
wxMessageBox(_T("Sorry, this animation was not a valid animated GIF."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
44
contrib/samples/animate/mondrian.xpm
Normal file
44
contrib/samples/animate/mondrian.xpm
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char *mondrian_xpm[] = {
|
||||||
|
/* columns rows colors chars-per-pixel */
|
||||||
|
"32 32 6 1",
|
||||||
|
" c black",
|
||||||
|
". c blue",
|
||||||
|
"X c #00BF00",
|
||||||
|
"o c red",
|
||||||
|
"O c yellow",
|
||||||
|
"+ c gray100",
|
||||||
|
/* pixels */
|
||||||
|
" ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" "
|
||||||
|
};
|
@@ -1,26 +1,163 @@
|
|||||||
# $Id$
|
# =========================================================================
|
||||||
|
# This makefile was generated by
|
||||||
top_srcdir = @top_srcdir@/..
|
# Bakefile 0.1.1 (http://bakefile.sourceforge.net)
|
||||||
top_builddir = ../../..
|
# Do not modify, all changes will be overwritten!
|
||||||
libsrc_dir = contrib/src/animate
|
# =========================================================================
|
||||||
|
|
||||||
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_animate-@WX_RELEASE@
|
|
||||||
|
|
||||||
LIBVERSION_CURRENT=@WX_CURRENT@
|
|
||||||
LIBVERSION_REVISION=@WX_REVISION@
|
|
||||||
LIBVERSION_AGE=@WX_AGE@
|
|
||||||
|
|
||||||
|
|
||||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
@MAKE_SET@
|
||||||
HEADER_SUBDIR=plot
|
|
||||||
|
|
||||||
HEADERS=animate.h
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
AR = @AR@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
DLLPREFIX = @DLLPREFIX@
|
||||||
|
EXTRALIBS = @EXTRALIBS@
|
||||||
|
EXTRALIBS_GUI = @EXTRALIBS_GUI@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_DIR = @INSTALL_DIR@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
PIC_FLAG = @PIC_FLAG@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SHARED_LD_CXX = @SHARED_LD_CXX@
|
||||||
|
SONAME_FLAG = @SONAME_FLAG@
|
||||||
|
SO_SUFFIX = @SO_SUFFIX@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
TOOLKIT = @TOOLKIT@
|
||||||
|
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
|
||||||
|
TOOLKIT_VERSION = @TOOLKIT_VERSION@
|
||||||
|
VENDOR = @VENDOR@
|
||||||
|
includedir = @includedir@
|
||||||
|
libdir = @libdir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
|
||||||
OBJECTS=animate.o
|
### Variables: ###
|
||||||
DEPFILES=$(OBJECTS:.o=.d)
|
|
||||||
|
|
||||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
ANIMATEDLL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) -I$(srcdir)/../../include -DWXMAKINGDLL_ANIMATE $(CXXFLAGS) $(PIC_FLAG)
|
||||||
|
ANIMATELIB_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) -I$(srcdir)/../../include $(CXXFLAGS)
|
||||||
|
|
||||||
include $(top_builddir)/src/makelib.env
|
### Conditionally set variables: ###
|
||||||
|
|
||||||
-include $(DEPFILES)
|
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
|
||||||
|
@COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX)
|
||||||
|
@COND_PLATFORM_WIN32_0@DLLIMPEXT = .$(SO_SUFFIX)
|
||||||
|
@COND_PLATFORM_WIN32_1@DLLIMPEXT = .a
|
||||||
|
@COND_USE_GUI_0@PORTNAME = base
|
||||||
|
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
|
||||||
|
@COND_OFFICIAL_BUILD_0_PLATFORM_WIN32_1@VENDORTAG = _$(VENDOR)
|
||||||
|
@COND_OFFICIAL_BUILD_1_PLATFORM_WIN32_1@VENDORTAG =
|
||||||
|
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
|
||||||
|
@COND_PLATFORM_WIN32_1@WXCOMPILER = _gcc
|
||||||
|
@COND_BUILD_DEBUG@WXDEBUGFLAG = d
|
||||||
|
@COND_PLATFORM_WIN32_0@WXDLLNAMEPREFIXGUI = wx_$(PORTNAME)$(WXUNIVNAME)
|
||||||
|
@COND_PLATFORM_WIN32_1@WXDLLNAMEPREFIXGUI = wx$(PORTNAME)$(WXUNIVNAME)25
|
||||||
|
@COND_PLATFORM_WIN32_0@WXDLLVERSIONTAG = -2.5
|
||||||
|
@COND_PLATFORM_WIN32_1@WXDLLVERSIONTAG =
|
||||||
|
@COND_UNICODE_1@WXUNICODEFLAG = u
|
||||||
|
@COND_WXUNIV_1@WXUNIVNAME = univ
|
||||||
|
@COND_WXUSE_LIBJPEG_BUILTIN@__INC_JPEG_p = -I$(top_srcdir)/src/jpeg
|
||||||
|
@COND_WXUSE_ODBC_BUILTIN@__INC_ODBC_p = -I$(top_srcdir)/src/odbc
|
||||||
|
@COND_WXUSE_LIBPNG_BUILTIN@__INC_PNG_p = -I$(top_srcdir)/src/png
|
||||||
|
@COND_WXUSE_REGEX_BUILTIN@__INC_REGEX_p = -I$(top_srcdir)/src/regex
|
||||||
|
@COND_WXUSE_LIBTIFF_BUILTIN@__INC_TIFF_p = -I$(top_srcdir)/src/tiff
|
||||||
|
@COND_WXUSE_ZLIB_BUILTIN@__INC_ZLIB_p = -I$(top_srcdir)/src/zlib
|
||||||
|
@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = -lwxodbc$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = -lwxregex$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
|
||||||
|
@COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = -lwxzlib$(WXDEBUGFLAG)
|
||||||
|
@COND_MONOLITHIC_0@__WXLIB_BASE_p = -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5
|
||||||
|
@COND_MONOLITHIC_0@__WXLIB_CORE_p = -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5
|
||||||
|
@COND_MONOLITHIC_1@__WXLIB_MONO_p = -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5
|
||||||
|
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
|
||||||
|
@COND_SHARED_1@__animatedll___depname = $(top_builddir)lib/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3)
|
||||||
|
@COND_PLATFORM_WIN32_1@__animatedll___importlib = -Wl,--out-implib,libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT)
|
||||||
|
@COND_PLATFORM_WIN32_1@__animatedll___importlib = -Wl,--out-implib,$(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT)
|
||||||
|
@COND_PLATFORM_MACOSX_1@__animatedll___macinstnamecmd = -install_name $(libdir)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2)
|
||||||
|
@COND_PLATFORM_MACOSX_1@__animatedll___macver = -compatibility_version 2.5 -current_version 2.5.0
|
||||||
|
@COND_USE_SOSYMLINKS_1@__animatedll___so_symlinks_cmd = rm -f $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT) $(top_builddir)lib/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2); \
|
||||||
|
@COND_USE_SOSYMLINKS_1@ $(LN_S) $(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3) $(top_builddir)lib/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2); \
|
||||||
|
@COND_USE_SOSYMLINKS_1@ $(LN_S) $(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2) $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT)
|
||||||
|
@COND_USE_SOSYMLINKS_1@__animatedll___so_symlinks_inst_cmd = rm -f libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT) $(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2); \
|
||||||
|
@COND_USE_SOSYMLINKS_1@ $(LN_S) $(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3) $(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2); \
|
||||||
|
@COND_USE_SOSYMLINKS_1@ $(LN_S) $(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2) libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT)
|
||||||
|
@COND_USE_SOVERLINUX_1@__animatedll___soname_flags = $(SONAME_FLAG)$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2)
|
||||||
|
@COND_USE_SOVERSOLARIS_1@__animatedll___soname_flags = $(SONAME_FLAG)$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3)
|
||||||
|
@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@__animatedll___targetsuf2 = .$(SO_SUFFIX).0
|
||||||
|
@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__animatedll___targetsuf2 = .0.$(SO_SUFFIX)
|
||||||
|
@COND_USE_SOVERSION_0@__animatedll___targetsuf2 = .$(SO_SUFFIX)
|
||||||
|
@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@__animatedll___targetsuf3 = .$(SO_SUFFIX).0.0.0
|
||||||
|
@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__animatedll___targetsuf3 = .0.0.0.$(SO_SUFFIX)
|
||||||
|
@COND_USE_SOVERSION_0@__animatedll___targetsuf3 = .$(SO_SUFFIX)
|
||||||
|
@COND_SHARED_0@__animatelib___depname = $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5.a
|
||||||
|
@COND_SHARED_1@__install_animatedll___depname = install_animatedll
|
||||||
|
@COND_SHARED_0@__install_animatelib___depname = install_animatelib
|
||||||
|
|
||||||
|
### Targets: ###
|
||||||
|
|
||||||
|
all: $(__animatedll___depname) $(__animatelib___depname)
|
||||||
|
|
||||||
|
@COND_SHARED_1@$(top_builddir)lib/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3): animatedll_animate.o
|
||||||
|
@COND_SHARED_1@ $(SHARED_LD_CXX) $@ animatedll_animate.o $(LDFLAGS) $(__animatedll___importlib) -L$(top_builddir)lib $(__animatedll___macinstnamecmd) $(__animatedll___importlib) $(__animatedll___soname_flags) $(__animatedll___macver) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p)
|
||||||
|
@COND_SHARED_1@ $(__animatedll___so_symlinks_cmd)
|
||||||
|
|
||||||
|
animatedll_animate.o: $(srcdir)/animate.cpp
|
||||||
|
$(CXXC) -c -o $@ $(ANIMATEDLL_CXXFLAGS) $<
|
||||||
|
|
||||||
|
@COND_SHARED_0@$(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5.a: animatelib_animate.o
|
||||||
|
@COND_SHARED_0@ rm -f $@
|
||||||
|
@COND_SHARED_0@ $(AR) rcu $@ animatelib_animate.o
|
||||||
|
@COND_SHARED_0@ $(RANLIB) $@
|
||||||
|
|
||||||
|
animatelib_animate.o: $(srcdir)/animate.cpp
|
||||||
|
$(CXXC) -c -o $@ $(ANIMATELIB_CXXFLAGS) $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf ./.deps
|
||||||
|
rm -f -f ./*.o
|
||||||
|
rm -f $(top_builddir)lib/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3)
|
||||||
|
rm -f $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT)
|
||||||
|
rm -f $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT) $(top_builddir)lib/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf2)
|
||||||
|
rm -f $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5.a
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f configure config.cache config.log config.status
|
||||||
|
rm -f bk-deps shared-ld-sh
|
||||||
|
|
||||||
|
install: all $(__install_animatedll___depname) $(__install_animatelib___depname)
|
||||||
|
$(INSTALL_DIR) $(includedir)
|
||||||
|
for f in wx/animate/animate.h; do \
|
||||||
|
if test ! -d $(includedir)/`dirname $$f` ; then \
|
||||||
|
$(INSTALL_DIR) $(includedir)/`dirname $$f`; \
|
||||||
|
fi; \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/../../include//$$f $(includedir)/$$f; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install-strip: install
|
||||||
|
$(STRIP) $(libdir)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3)
|
||||||
|
|
||||||
|
@COND_SHARED_1@install_animatedll:
|
||||||
|
@COND_SHARED_1@ $(INSTALL_DIR) $(libdir)
|
||||||
|
@COND_SHARED_1@ $(INSTALL_DATA) $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5$(DLLIMPEXT) $(libdir)
|
||||||
|
@COND_SHARED_1@ $(INSTALL_PROGRAM) $(top_builddir)lib/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(__animatedll___targetsuf3) $(libdir)
|
||||||
|
@COND_SHARED_1@ (cd $(libdir) ; $(__animatedll___so_symlinks_inst_cmd))
|
||||||
|
|
||||||
|
@COND_SHARED_0@install_animatelib:
|
||||||
|
@COND_SHARED_0@ $(INSTALL_DIR) $(libdir)
|
||||||
|
@COND_SHARED_0@ $(INSTALL_DATA) $(top_builddir)lib/libwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_animate-2.5.a $(libdir)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
|
||||||
|
|
||||||
|
# Include dependency info, if present:
|
||||||
|
@IF_GNU_MAKE@-include .deps/*.d
|
||||||
|
|
||||||
|
.PHONY: all clean distclean install install_animatedll install_animatelib uninstall
|
||||||
|
@@ -23,6 +23,10 @@
|
|||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/gifdecod.h"
|
#include "wx/gifdecod.h"
|
||||||
#include "wx/animate/animate.h"
|
#include "wx/animate/animate.h"
|
||||||
|
#include "wx/log.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
|
#include "wx/dcclient.h"
|
||||||
|
#include "wx/dcmemory.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxAnimationPlayer
|
* wxAnimationPlayer
|
||||||
@@ -76,11 +80,11 @@ bool wxAnimationPlayer::Play(wxWindow& window, const wxPoint& pos, bool looped)
|
|||||||
wxRect rect(pos, sz);
|
wxRect rect(pos, sz);
|
||||||
SaveBackground(rect);
|
SaveBackground(rect);
|
||||||
|
|
||||||
if (m_frames.Number() == 0)
|
if (m_frames.GetCount() == 0)
|
||||||
{
|
{
|
||||||
if (!Build())
|
if (!Build())
|
||||||
{
|
{
|
||||||
wxLogWarning("wxAnimationPlayer::Play: could not build the image cache.");
|
wxLogWarning(_T("wxAnimationPlayer::Play: could not build the image cache."));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -289,11 +293,11 @@ bool wxAnimationPlayer::PlayFrame()
|
|||||||
// Clear the wxImage cache
|
// Clear the wxImage cache
|
||||||
void wxAnimationPlayer::ClearCache()
|
void wxAnimationPlayer::ClearCache()
|
||||||
{
|
{
|
||||||
wxNode* node = m_frames.First();
|
wxNode* node = m_frames.GetFirst();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxNode* next = node->Next();
|
wxNode* next = node->GetNext();
|
||||||
wxBitmap* bitmap = (wxBitmap*) node->Data();
|
wxBitmap* bitmap = (wxBitmap*) node->GetData();
|
||||||
delete bitmap;
|
delete bitmap;
|
||||||
delete node;
|
delete node;
|
||||||
node = next;
|
node = next;
|
||||||
@@ -303,13 +307,13 @@ void wxAnimationPlayer::ClearCache()
|
|||||||
// Draw the background colour
|
// Draw the background colour
|
||||||
void wxAnimationPlayer::DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& 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_animation != NULL), _T("Animation not present in wxAnimationPlayer"));
|
||||||
wxASSERT_MSG( (m_frames.Number() != 0), "Animation cache not present in wxAnimationPlayer");
|
wxASSERT_MSG( (m_frames.GetCount() != 0), _T("Animation cache not present in wxAnimationPlayer"));
|
||||||
|
|
||||||
// Optimization: if the first frame fills the whole area, and is non-transparent,
|
// Optimization: if the first frame fills the whole area, and is non-transparent,
|
||||||
// don't bother drawing the background
|
// don't bother drawing the background
|
||||||
|
|
||||||
wxBitmap* firstBitmap = (wxBitmap*) m_frames.First()->Data() ;
|
wxBitmap* firstBitmap = (wxBitmap*) m_frames.GetFirst()->GetData() ;
|
||||||
wxSize screenSize = GetLogicalScreenSize();
|
wxSize screenSize = GetLogicalScreenSize();
|
||||||
if (!firstBitmap->GetMask() && (firstBitmap->GetWidth() == screenSize.x) && (firstBitmap->GetHeight() == screenSize.y))
|
if (!firstBitmap->GetMask() && (firstBitmap->GetWidth() == screenSize.x) && (firstBitmap->GetHeight() == screenSize.y))
|
||||||
{
|
{
|
||||||
@@ -364,11 +368,11 @@ void wxAnimationPlayer::SaveBackground(const wxRect& rect)
|
|||||||
// Draw this frame
|
// Draw this frame
|
||||||
void wxAnimationPlayer::DrawFrame(int frame, wxDC& dc, const wxPoint& pos)
|
void wxAnimationPlayer::DrawFrame(int frame, wxDC& dc, const wxPoint& pos)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_animation != NULL), "Animation not present in wxAnimationPlayer");
|
wxASSERT_MSG( (m_animation != NULL), _T("Animation not present in wxAnimationPlayer"));
|
||||||
wxASSERT_MSG( (m_frames.Number() != 0), "Animation cache not present in wxAnimationPlayer");
|
wxASSERT_MSG( (m_frames.GetCount() != 0), _T("Animation cache not present in wxAnimationPlayer"));
|
||||||
wxASSERT_MSG( (m_frames.Nth(frame) != (wxNode*) NULL), "Image not present in wxAnimationPlayer::DrawFrame");
|
wxASSERT_MSG( (m_frames.Item(frame) != (wxNode*) NULL), _T("Image not present in wxAnimationPlayer::DrawFrame"));
|
||||||
|
|
||||||
wxBitmap* bitmap = (wxBitmap*) m_frames.Nth(frame)->Data() ;
|
wxBitmap* bitmap = (wxBitmap*) m_frames.Item(frame)->GetData() ;
|
||||||
|
|
||||||
wxRect rect = GetFrameRect(frame);
|
wxRect rect = GetFrameRect(frame);
|
||||||
|
|
||||||
@@ -404,14 +408,14 @@ wxGIFAnimation::~wxGIFAnimation()
|
|||||||
|
|
||||||
int wxGIFAnimation::GetFrameCount() const
|
int wxGIFAnimation::GetFrameCount() const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
return m_decoder->GetNumberOfFrames();
|
return m_decoder->GetNumberOfFrames();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxImage* wxGIFAnimation::GetFrame(int i) const
|
wxImage* wxGIFAnimation::GetFrame(int i) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
m_decoder->GoFrame(i);
|
m_decoder->GoFrame(i);
|
||||||
|
|
||||||
@@ -422,7 +426,7 @@ wxImage* wxGIFAnimation::GetFrame(int i) const
|
|||||||
|
|
||||||
wxAnimationDisposal wxGIFAnimation::GetDisposalMethod(int i) const
|
wxAnimationDisposal wxGIFAnimation::GetDisposalMethod(int i) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
m_decoder->GoFrame(i);
|
m_decoder->GoFrame(i);
|
||||||
|
|
||||||
@@ -432,7 +436,7 @@ wxAnimationDisposal wxGIFAnimation::GetDisposalMethod(int i) const
|
|||||||
|
|
||||||
wxRect wxGIFAnimation::GetFrameRect(int i) const
|
wxRect wxGIFAnimation::GetFrameRect(int i) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
m_decoder->GoFrame(i);
|
m_decoder->GoFrame(i);
|
||||||
|
|
||||||
@@ -442,7 +446,7 @@ wxRect wxGIFAnimation::GetFrameRect(int i) const
|
|||||||
|
|
||||||
int wxGIFAnimation::GetDelay(int i) const
|
int wxGIFAnimation::GetDelay(int i) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
m_decoder->GoFrame(i);
|
m_decoder->GoFrame(i);
|
||||||
return m_decoder->GetDelay();
|
return m_decoder->GetDelay();
|
||||||
@@ -450,14 +454,14 @@ int wxGIFAnimation::GetDelay(int i) const
|
|||||||
|
|
||||||
wxSize wxGIFAnimation::GetLogicalScreenSize() const
|
wxSize wxGIFAnimation::GetLogicalScreenSize() const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
return wxSize(m_decoder->GetLogicalScreenWidth(), m_decoder->GetLogicalScreenHeight());
|
return wxSize(m_decoder->GetLogicalScreenWidth(), m_decoder->GetLogicalScreenHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGIFAnimation::GetBackgroundColour(wxColour& col) const
|
bool wxGIFAnimation::GetBackgroundColour(wxColour& col) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
int i = m_decoder->GetBackgroundColour();
|
int i = m_decoder->GetBackgroundColour();
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
@@ -478,7 +482,7 @@ bool wxGIFAnimation::GetBackgroundColour(wxColour& col) const
|
|||||||
|
|
||||||
bool wxGIFAnimation::GetTransparentColour(wxColour& col) const
|
bool wxGIFAnimation::GetTransparentColour(wxColour& col) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), "m_decoder must be non-NULL");
|
wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL"));
|
||||||
|
|
||||||
int i = m_decoder->GetTransparentColour();
|
int i = m_decoder->GetTransparentColour();
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
|
Reference in New Issue
Block a user