# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # GA_HORIZONTAL = 4 # GA_VERTICAL = 8 # GA_PROGRESS = 16 # GA_SMOOTH = 32 # GA_TEXT = 64 # A gauge is a horizontal or vertical bar which shows a quantity (often time). # {Wx::Gauge} supports two working modes: determinate and indeterminate progress. # The first is the usual working mode (see {Wx::Gauge#set_value} and {Wx::Gauge#set_range}) while the second can be used when the program is doing some processing but you don't know how much progress is being done. In this case, you can periodically call the {Wx::Gauge#pulse} function to make the progress bar switch to indeterminate mode (graphically it's usually a set of blocks which move or bounce in the bar control). # {Wx::Gauge} supports dynamic switch between these two work modes. # There are no user commands for the gauge. # === Styles # # This class supports the following styles: # # - {Wx::GA_HORIZONTAL}: Creates a horizontal gauge. # - {Wx::GA_VERTICAL}: Creates a vertical gauge. # - {Wx::GA_SMOOTH}: Creates smooth progress bar with one pixel wide update step (not supported by all platforms). # - {Wx::GA_TEXT}: Display the current value in percents in the gauge itself. This style is only supported in {Wx::Qt} and ignored under the other platforms. This flag is only available in wxWidgets 3.1.0 and later. # - {Wx::GA_PROGRESS}: Reflect the value of gauge in the application taskbar button under Windows 7 and later and the dock icon under macOS, ignored under the other platforms. This flag is only available in wxWidgets 3.1.0 and later. # # === # # Category: {Wx::Controls}
Appearance:
{Wx::MSW} Appearance # {Wx::GTK} Appearance # {Wx::OSX} Appearance #
# @see Wx::Slider # @see Wx::ScrollBar # # class Gauge < Control # @overload initialize() # Default constructor. # @return [Gauge] # @overload initialize(parent, id, range, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::GA_HORIZONTAL, validator=Wx::DEFAULT_VALIDATOR, name=Wx::GAUGE_NAME_STR) # Constructor, creating and showing a gauge. # # @see Wx::Gauge#create # @param parent [Wx::Window] Window parent. # @param id [Integer] Window identifier. # @param range [Integer] Integer range (maximum value) of the gauge. See {Wx::Gauge#set_range} for more details about the meaning of this value when using the gauge in indeterminate mode. # @param pos [Array(Integer, Integer), Wx::Point] Window position. # @param size [Array(Integer, Integer), Wx::Size] Window size. # @param style [Integer] Gauge style. # @param validator [Wx::Validator] Window validator. # @param name [String] Window name. # @return [Gauge] def initialize(*args) end # Creates the gauge for two-step construction. # See {Wx::Gauge#gauge} for further details. # @param parent [Wx::Window] # @param id [Integer] # @param range [Integer] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param validator [Wx::Validator] # @param name [String] # @return [true,false] def create(parent, id, range, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::GA_HORIZONTAL, validator=Wx::DEFAULT_VALIDATOR, name=Wx::GAUGE_NAME_STR) end # Returns the maximum position of the gauge. # # @see Wx::Gauge#set_range # @return [Integer] def get_range; end alias_method :range, :get_range # Returns the current position of the gauge. # # @see Wx::Gauge#set_value # @return [Integer] def get_value; end alias_method :value, :get_value # Returns true if the gauge is vertical (has {Wx::GA_VERTICAL} style) and false otherwise. # @return [true,false] def is_vertical; end alias_method :vertical?, :is_vertical # Switch the gauge to indeterminate mode (if required) and makes the gauge move a bit to indicate the user that some progress has been made. # After calling this function the value returned by {Wx::Gauge#get_value} is undefined and thus you need to explicitly call {Wx::Gauge#set_value} if you want to restore the determinate mode. # @return [void] def pulse; end # Sets the range (maximum value) of the gauge. # This function makes the gauge switch to determinate mode, if it's not already. # When the gauge is in indeterminate mode, under {Wx::MSW} the gauge repeatedly goes from zero to range and back; under other ports when in indeterminate mode, the range setting is ignored. # @see Wx::Gauge#get_range # @param range [Integer] # @return [void] def set_range(range) end alias_method :range=, :set_range # Sets the position of the gauge. # The pos must be between 0 and the gauge range as returned by {Wx::Gauge#get_range}, inclusive. # This function makes the gauge switch to determinate mode, if it was in indeterminate mode before. # @see Wx::Gauge#get_value # @param pos [Integer] Position for the gauge level. # @return [void] def set_value(pos) end alias_method :value=, :set_value end # Gauge end