Container for possible multiple versions of the same animation in different resolutions.
This class is used to pass either one or multiple animations to use in wxAnimationCtrl. If it contains multiple elements, they must be added to it using its Add() function in ascending size order and, in particular, the first element defines the size of the animation in standard DPI, with the other elements containing versions of the animation to use in higher DPI.
Example of using this class to pass a normal and high DPI version of a "throbbing" animation to the control and let it choose the one most appropriate to the current resolution automatically:
animations.
Add(
"throbber.gif");
animations.
Add(
"throbber_2x.gif");
if ( animationCtrl->SetAnimation(animations) )
animationCtrl->Play();
wxAnimationBundle()=default
Default constructor creates an empty bundle.
void Add(const wxAnimation &anim)
Add an animation in another, bigger, size.
wxAnimationCtrl(wxWindow *parent, wxWindowID id, const wxAnimation &anim=wxNullAnimation, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxAC_DEFAULT_STYLE, const wxString &name=wxAnimationCtrlNameStr)
Initializes the object and calls Create() with all the parameters.
@ wxID_ANY
Any id: means that we don't care about the id, whether when installing an event handler or when creat...
Definition defs.h:591
- Since
- 3.3.0