Class: Wx::AnimationBundle

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/animation_ctrl.rb

Overview

Note:

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)

Requires:

  • USE_ANIMATIONCTRL

Instance Method Summary collapse

Constructor Details

#initializeWx::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.

Overloads:



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

Overloads:

  • #add(anim) ⇒ void

    This method returns an undefined value.

    Add an animation in another, bigger, size.

    Parameters:

  • #add(filename, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ void

    This method returns an undefined value.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Parameters:

    • filename (String)
    • type (Wx::AnimationType) (defaults to: Wx::AnimationType::ANIMATION_TYPE_ANY)


281
# File 'lib/wx/doc/gen/animation_ctrl.rb', line 281

def add(*args) end

#get_allArray<Wx::Animation> Also known as: all

Get vector containing all animations in this bundle.

The vector can be empty.

Returns:



287
# File 'lib/wx/doc/gen/animation_ctrl.rb', line 287

def get_all; end

#is_okBoolean Also known as: ok?

Return true if this animation bundle is not empty.

Notice that any elements of the bundle are always valid animations.

Returns:

  • (Boolean)


294
# File 'lib/wx/doc/gen/animation_ctrl.rb', line 294

def is_ok; end