Class: Wx::AnimationBundle
- Inherits:
-
Object
- Object
- Wx::AnimationBundle
- Defined in:
- lib/wx/doc/gen/animation_ctrl.rb
Overview
This class is untracked and should not be derived from nor instances extended!
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 AnimationCtrl. 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:
animationCtrl = Wx::AnimationCtrl.new(parent, Wx::ID_ANY)
animations = Wx::AnimationBundle.new
animations.add("throbber.gif")
animations.add("throbber_2x.gif")
animationCtrl.play if animationCtrl.set_animation(animations)
Instance Method Summary collapse
- #add(*args) ⇒ Object
-
#get_all ⇒ Array<Wx::Animation>
(also: #all)
Get vector containing all animations in this bundle.
-
#initialize(*args) ⇒ AnimationBundle
constructor
A new instance of AnimationBundle.
-
#is_ok ⇒ Boolean
(also: #ok?)
Return true if this animation bundle is not empty.
Constructor Details
#initialize ⇒ Wx::AnimationBundle #initialize(anim) ⇒ Wx::AnimationBundle #initialize(filename, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Wx::AnimationBundle #initialize(arg) ⇒ Wx::AnimationBundle
Returns a new instance of AnimationBundle.
270 |
# File 'lib/wx/doc/gen/animation_ctrl.rb', line 270 def initialize(*args) end |
Instance Method Details
#add(anim) ⇒ void #add(filename, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ void
281 |
# File 'lib/wx/doc/gen/animation_ctrl.rb', line 281 def add(*args) end |
#get_all ⇒ Array<Wx::Animation> Also known as: all
Get vector containing all animations in this bundle.
The vector can be empty.
287 |
# File 'lib/wx/doc/gen/animation_ctrl.rb', line 287 def get_all; end |
#is_ok ⇒ Boolean Also known as: ok?
Return true if this animation bundle is not empty.
Notice that any elements of the bundle are always valid animations.
294 |
# File 'lib/wx/doc/gen/animation_ctrl.rb', line 294 def is_ok; end |