Class: Wx::Animation

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

Overview

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

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

Returns a new instance of Animation.

Overloads:



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

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:



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

def self.add_handler(handler) end

.clean_up_handlersvoid

This method returns an undefined value.

Clear out the animation decoder list.

This is called automatically at program shutdown.



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

def self.clean_up_handlers; end

.find_handler(animType) ⇒ Wx::AnimationDecoder

Search for an animation decoder by type.

Parameters:

Returns:



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

def self.find_handler(animType) end

.get_handlersArray<Wx::AnimationDecoder>

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

Returns:



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

def self.get_handlers; end

.init_standard_handlersvoid

This method returns an undefined value.

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

This is called automatically at program startup.



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

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:



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

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)


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

def get_delay(frame) end

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

Returns the i-th frame as a Image.

This method is not implemented in the native WXGTK implementation of this class and always returns an invalid image there.

Parameters:

  • frame (Integer)

Returns:



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

def get_frame(frame) end

#get_frame_countInteger Also known as: frame_count

Returns the number of frames for this animation.

This method is not implemented in the native WXGTK implementation of this class and always returns 0 there.

Returns:

  • (Integer)


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

def get_frame_count; end

#get_sizeWx::Size Also known as: size

Returns the size of the animation.

Returns:



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

def get_size; end

#is_okBoolean Also known as: ok?

Returns true if animation data is present.

Returns:

  • (Boolean)


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

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)


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

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)


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

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