Class: Wx::Animation

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

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

The Animation class handles the interface between the animation control and the details of the animation image or data.

Predefined objects/pointers: NULL_ANIMATION

See Also:

Requires:

  • USE_ANIMATIONCTRL

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize ⇒ Wx::Animation #initialize(name, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Wx::Animation #initialize(other) ⇒ Wx::Animation

Returns a new instance of Animation.

Overloads:



103
# File 'lib/wx/doc/gen/animation.rb', line 103

def initialize(*args) end

Class Method Details

.add_handler(handler) ⇒ void

This method returns an undefined value.

Add a new decoder to the list of animation decoders.

Parameters:



157
# File 'lib/wx/doc/gen/animation.rb', line 157

def self.add_handler(handler) end

.clean_up_handlers ⇒ void

This method returns an undefined value.

Clear out the animation decoder list.

This is called automatically at program shutdown.



179
# File 'lib/wx/doc/gen/animation.rb', line 179

def self.clean_up_handlers; end

.find_handler(animType) ⇒ Wx::AnimationDecoder

Search for an animation decoder by type.

Parameters:

Returns:



167
# File 'lib/wx/doc/gen/animation.rb', line 167

def self.find_handler(animType) end

.get_handlers ⇒ Array<Wx::AnimationDecoder>

Returns the list of animation decoders used by the generic animation and GenericAnimationCtrl.

Returns:



152
# File 'lib/wx/doc/gen/animation.rb', line 152

def self.get_handlers; end

.init_standard_handlers ⇒ void

This method returns an undefined value.

Load the stock animation decoders (currently GIF, ANI and WebP) into the list of decoders.

This is called automatically at program startup.



173
# File 'lib/wx/doc/gen/animation.rb', line 173

def self.init_standard_handlers; end

.insert_handler(handler) ⇒ void

This method returns an undefined value.

Insert a new decoder to the front of the list of animation decoders.

Parameters:



162
# File 'lib/wx/doc/gen/animation.rb', line 162

def self.insert_handler(handler) end

Instance Method Details

#get_delay(frame) ⇒ Integer Also known as: delay

Returns the delay for the i-th frame in milliseconds.

If -1 is returned the frame is to be displayed forever.

Parameters:

  • frame (Integer)

Returns:

  • (Integer)


115
# File 'lib/wx/doc/gen/animation.rb', line 115

def get_delay(frame) end

#get_frame(frame) ⇒ Wx::Image Also known as: frame

Returns the i-th frame as a Image.

Parameters:

  • frame (Integer)

Returns:



126
# File 'lib/wx/doc/gen/animation.rb', line 126

def get_frame(frame) end

#get_frame_count ⇒ Integer Also known as: frame_count

Returns the number of frames for this animation.

Returns:

  • (Integer)


120
# File 'lib/wx/doc/gen/animation.rb', line 120

def get_frame_count; end

#get_size ⇒ Wx::Size Also known as: size

Returns the size of the animation.

Returns:



131
# File 'lib/wx/doc/gen/animation.rb', line 131

def get_size; end

#is_ok ⇒ Boolean Also known as: ok?

Returns true if animation data is present.

Returns:

  • (Boolean)


107
# File 'lib/wx/doc/gen/animation.rb', line 107

def is_ok; end

#load(stream, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean

Loads an animation from the given stream.

true if the operation succeeded, false otherwise.

Parameters:

  • stream (IO, Wx::InputStream) —

    The stream to use to load the animation. Under WXGTK may be any kind of stream; under other platforms this must be a seekable stream.

  • type (Wx::AnimationType) (defaults to: Wx::AnimationType::ANIMATION_TYPE_ANY) —

    One of the Wx::AnimationType enumeration values.

Returns:

  • (Boolean)


148
# File 'lib/wx/doc/gen/animation.rb', line 148

def load(stream, type=Wx::AnimationType::ANIMATION_TYPE_ANY) end

#load_file(name, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean

Loads an animation from a file.

true if the operation succeeded, false otherwise.

Parameters:

Returns:

  • (Boolean)


140
# File 'lib/wx/doc/gen/animation.rb', line 140

def load_file(name, type=Wx::AnimationType::ANIMATION_TYPE_ANY) end