# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx
#
AC_NO_AUTORESIZE = 16
#
AC_DEFAULT_STYLE = 2097152
# Supported animation types.
#
#
#
class AnimationType < Wx::Enum
#
#
ANIMATION_TYPE_INVALID = Wx::AnimationType.new(0)
# represents an animated GIF file.
#
ANIMATION_TYPE_GIF = Wx::AnimationType.new(1)
# represents an ANI file.
#
ANIMATION_TYPE_ANI = Wx::AnimationType.new(2)
# autodetect the filetype.
#
ANIMATION_TYPE_ANY = Wx::AnimationType.new(3)
end # AnimationType
#
#
#
#
class AnimationDisposal < Wx::Enum
# No disposal specified. The decoder is not required to take any action.
#
ANIM_UNSPECIFIED = Wx::AnimationDisposal.new(-1)
# Do not dispose. The graphic is to be left in place.
#
ANIM_DONOTREMOVE = Wx::AnimationDisposal.new(0)
# Restore to background color.
#
ANIM_TOBACKGROUND = Wx::AnimationDisposal.new(1)
# Restore to previous.
#
ANIM_TOPREVIOUS = Wx::AnimationDisposal.new(2)
end # AnimationDisposal
# An empty animation object.
#
NULL_ANIMATION = nil
# The {Wx::Animation} class handles the interface between the animation control and the details of the animation image or data.
# Predefined objects/pointers: {Wx::NULL_ANIMATION}
# @see Wx::AnimationCtrl
# @see Animation Sample
#
#
class Animation < Object
# @overload initialize()
# Constructs a new empty animation object.
# Call {Wx::Animation#load} to initialize it.
# @see Wx::AnimationCtrl#create_animation
# @return [Animation]
# @overload initialize(name, type=Wx::AnimationType::ANIMATION_TYPE_ANY)
# Constructs a new animation object and load the animation data from the given filename.
#
# @see Wx::AnimationCtrl#create_animation
# @param name [String] A filename.
# @param type [AnimationType] One of the {Wx::AnimationType} values; {Wx::AnimationType::ANIMATION_TYPE_ANY} means that the function should try to autodetect the filetype.
# @return [Animation]
# @overload initialize(other)
# Copy constructor.
# @param other [Wx::Animation]
# @return [Animation]
def initialize(*args) end
# Returns true if animation data is present.
# @return [true,false]
def is_ok; end
alias_method :ok?, :is_ok
# Returns the delay for the i-th frame in milliseconds.
# If -1
is returned the frame is to be displayed forever.
# @param frame [Integer]
# @return [Integer]
def get_delay(frame) end
alias_method :delay, :get_delay
# Returns the number of frames for this animation.
# This method is not implemented in the native {Wx::GTK} implementation of this class and always returns 0 there.
# @return [Integer]
def get_frame_count; end
alias_method :frame_count, :get_frame_count
# Returns the i-th frame as a {Wx::Image}.
# This method is not implemented in the native {Wx::GTK} implementation of this class and always returns an invalid image there.
# @param frame [Integer]
# @return [Wx::Image]
def get_frame(frame) end
alias_method :frame, :get_frame
# Returns the size of the animation.
# @return [Wx::Size]
def get_size; end
alias_method :size, :get_size
# Loads an animation from a file.
# true if the operation succeeded, false otherwise.
# @param name [String] A filename.
# @param type [AnimationType] One of the {Wx::AnimationType} values; {Wx::AnimationType::ANIMATION_TYPE_ANY} means that the function should try to autodetect the filetype.
# @return [true,false]
def load_file(name, type=Wx::AnimationType::ANIMATION_TYPE_ANY) end
# Loads an animation from the given stream.
# true if the operation succeeded, false otherwise.
# @param stream [IO,Wx::InputStream] The stream to use to load the animation. Under {Wx::GTK} may be any kind of stream; under other platforms this must be a seekable stream.
# @param type [AnimationType] One of the {Wx::AnimationType} enumeration values.
# @return [true,false]
def load(stream, type=Wx::AnimationType::ANIMATION_TYPE_ANY) end
# Returns the list of animation decoders used by the generic animation and {Wx::GenericAnimationCtrl}.
# @return [Array]
def self.get_handlers; end
# Add a new decoder to the list of animation decoders.
# @param handler [Wx::AnimationDecoder]
# @return [void]
def self.add_handler(handler) end
# Insert a new decoder to the front of the list of animation decoders.
# @param handler [Wx::AnimationDecoder]
# @return [void]
def self.insert_handler(handler) end
# Search for an animation decoder by type.
# @param animType [AnimationType]
# @return [Wx::AnimationDecoder]
def self.find_handler(animType) end
# Load the stock animation decoders (currently GIF and ANI) into the list of decoders.
# This is called automatically at program startup.
# @return [void]
def self.init_standard_handlers; end
# Clear out the animation decoder list.
# This is called automatically at program shutdown.
# @return [void]
def self.clean_up_handlers; end
end # Animation
# {Wx::AnimationDecoder} is used by {Wx::Animation} for loading frames and other information for the animation from the animation image file.
#
#
class AnimationDecoder < ::Object
# @return [AnimationDecoder]
def initialize; end
# Load the animation image frames from the given stream.
# @param stream [IO,Wx::InputStream]
# @return [true,false]
def load(stream) end
# Returns true if this decoder supports loading from the given stream.
# @param stream [IO,Wx::InputStream]
# @return [true,false]
def can_read(stream) end
alias_method :can_read?, :can_read
# Create a copy of this decoder.
# @return [Wx::AnimationDecoder]
def clone; end
# Return the animation type this decoder implements.
# @return [AnimationType]
def get_type; end
alias_method :type, :get_type
# Convert given frame to {Wx::Image}.
# @param frame [Integer]
# @return [Array(true,false,Wx::Image)]
def convert_to_image(frame) end
# @param frame [Integer]
# @return [Wx::Size]
def get_frame_size(frame) end
alias_method :frame_size, :get_frame_size
# @param frame [Integer]
# @return [Wx::Point]
def get_frame_position(frame) end
alias_method :frame_position, :get_frame_position
# What should be done after displaying this frame.
# @param frame [Integer]
# @return [AnimationDisposal]
def get_disposal_method(frame) end
alias_method :disposal_method, :get_disposal_method
# Return the number of milliseconds this frame should be displayed.
# If -1 is returned then the frame must be displayed forever.
# @param frame [Integer]
# @return [Integer]
def get_delay(frame) end
alias_method :delay, :get_delay
# The transparent colour for this frame, if any, or {Wx::NULL_COLOUR}.
# @param frame [Integer]
# @return [Wx::Colour]
def get_transparent_colour(frame) end
alias_method :transparent_colour, :get_transparent_colour
# @return [Wx::Size]
def get_animation_size; end
alias_method :animation_size, :get_animation_size
# @return [Wx::Colour]
def get_background_colour; end
alias_method :background_colour, :get_background_colour
# @return [Integer]
def get_frame_count; end
alias_method :frame_count, :get_frame_count
protected
# Checks the signature of the data in the given stream and returns true if it appears to be a valid animation format recognized by the animation decoder; this function should modify the stream current position without taking care of restoring it since Wx::AnimationDecoder#can_read
will do it.
# @param stream [IO,Wx::InputStream]
# @return [true,false]
def do_can_read(stream) end
end # AnimationDecoder
end