Class: Wx::Animation
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
Class Method Summary collapse
-
.add_handler(handler) ⇒ void
Add a new decoder to the list of animation decoders.
-
.clean_up_handlers ⇒ void
Clear out the animation decoder list.
-
.find_handler(animType) ⇒ Wx::AnimationDecoder
Search for an animation decoder by type.
-
.get_handlers ⇒ Array<Wx::AnimationDecoder>
Returns the list of animation decoders used by the generic animation and GenericAnimationCtrl.
-
.init_standard_handlers ⇒ void
Load the stock animation decoders (currently GIF and ANI) into the list of decoders.
-
.insert_handler(handler) ⇒ void
Insert a new decoder to the front of the list of animation decoders.
Instance Method Summary collapse
-
#get_delay(frame) ⇒ Integer
(also: #delay)
Returns the delay for the i-th frame in milliseconds.
-
#get_frame(frame) ⇒ Wx::Image
(also: #frame)
Returns the i-th frame as a Image.
-
#get_frame_count ⇒ Integer
(also: #frame_count)
Returns the number of frames for this animation.
-
#get_size ⇒ Wx::Size
(also: #size)
Returns the size of the animation.
-
#initialize(*args) ⇒ Animation
constructor
A new instance of Animation.
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns true if animation data is present.
-
#load(stream, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean
Loads an animation from the given stream.
-
#load_file(name, type = Wx::AnimationType::ANIMATION_TYPE_ANY) ⇒ Boolean
Loads an animation from a file.
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.
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.
155 |
# File 'lib/wx/doc/gen/animation.rb', line 155 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.
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.
165 |
# File 'lib/wx/doc/gen/animation.rb', line 165 def self.find_handler(animType) end |
.get_handlers ⇒ Array<Wx::AnimationDecoder>
Returns the list of animation decoders used by the generic animation and GenericAnimationCtrl.
150 |
# File 'lib/wx/doc/gen/animation.rb', line 150 def self.get_handlers; end |
.init_standard_handlers ⇒ void
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.
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.
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.
124 |
# File 'lib/wx/doc/gen/animation.rb', line 124 def get_frame(frame) end |
#get_frame_count ⇒ Integer 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.
116 |
# File 'lib/wx/doc/gen/animation.rb', line 116 def get_frame_count; end |
#get_size ⇒ Wx::Size Also known as: size
Returns the size of the animation.
129 |
# File 'lib/wx/doc/gen/animation.rb', line 129 def get_size; end |
#is_ok ⇒ Boolean Also known as: ok?
Returns true if animation data is present.
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.
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.
138 |
# File 'lib/wx/doc/gen/animation.rb', line 138 def load_file(name, type=Wx::AnimationType::ANIMATION_TYPE_ANY) end |