#include <wx/animate.h>
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:
Public Member Functions | |
wxAnimationBundle ()=default | |
Default constructor creates an empty bundle. More... | |
wxAnimationBundle (const wxAnimation &anim) | |
Implicit ctor from wxAnimation for backwards compatibility. More... | |
wxAnimationBundle (const wxString &filename, wxAnimationType type=wxANIMATION_TYPE_ANY) | |
Implicit ctor from animation file name for backwards compatibility. More... | |
wxAnimationBundle (const wxAnimationBundle &)=default | |
wxAnimationBundle & | operator= (const wxAnimationBundle &)=default |
~wxAnimationBundle ()=default | |
void | Add (const wxAnimation &anim) |
Add an animation in another, bigger, size. More... | |
void | Add (const wxString &filename, wxAnimationType type=wxANIMATION_TYPE_ANY) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
const std::vector< wxAnimation > & | GetAll () const |
Get vector containing all animations in this bundle. More... | |
bool | IsOk () const |
Return true if this animation bundle is not empty. More... | |
|
default |
Default constructor creates an empty bundle.
Call Add() later.
wxAnimationBundle::wxAnimationBundle | ( | const wxAnimation & | anim | ) |
Implicit ctor from wxAnimation for backwards compatibility.
wxAnimationBundle::wxAnimationBundle | ( | const wxString & | filename, |
wxAnimationType | type = wxANIMATION_TYPE_ANY |
||
) |
Implicit ctor from animation file name for backwards compatibility.
|
default |
|
default |
void wxAnimationBundle::Add | ( | const wxAnimation & | anim | ) |
Add an animation in another, bigger, size.
void wxAnimationBundle::Add | ( | const wxString & | filename, |
wxAnimationType | type = wxANIMATION_TYPE_ANY |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const std::vector<wxAnimation>& wxAnimationBundle::GetAll | ( | ) | const |
Get vector containing all animations in this bundle.
The vector can be empty.
bool wxAnimationBundle::IsOk | ( | ) | const |
Return true if this animation bundle is not empty.
Notice that any elements of the bundle are always valid animations.
|
default |