# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # {Wx::SpinCtrlDouble} combines {Wx::TextCtrl} and {Wx::SpinButton} in one control and displays a real number. # ({Wx::SpinCtrl} displays an integer.) # === Styles # # This class supports the following styles: # # - {Wx::SP_ARROW_KEYS}: The user can use arrow keys to change the value. # # - {Wx::SP_WRAP}: The value wraps at the minimum and maximum. # # === Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::SpinDoubleEvent} events. # Event handler methods for events emitted by this class: # # - {Wx::EvtHandler#evt_spinctrldouble}(id, meth = nil, &block): Generated whenever the numeric value of the spin control is changed, that is, when the up/down spin button is clicked, when ENTER is pressed, or the control loses focus and the new value is different from the last. See {Wx::SpinDoubleEvent}. # # === # # Category: {Wx::Controls}
Appearance:
wxMSW Appearance # wxGTK Appearance # wxOSX Appearance #
# @see Wx::SpinButton # @see Wx::SpinCtrl # @see Wx::Control # # class SpinCtrlDouble < Control # @overload initialize() # Default constructor. # @return [Wx::SpinCtrlDouble] # @overload initialize(parent, id=-1, value=(''), pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::SP_ARROW_KEYS, min=0, max=100, initial=0, inc=1, name=(Wx::T.new("Wx::SpinCtrlDouble"))) # Constructor, creating and showing a spin control. # If value is non-empty, it will be shown in the text entry part of the control and if it has numeric value, the initial numeric value of the control, as returned by {Wx::SpinCtrlDouble#get_value} will also be determined by it instead of by initial. Hence, it only makes sense to specify initial if value is an empty string or is not convertible to a number, otherwise initial is simply ignored and the number specified by value is used. # # The precision (number of digits after the decimal point) of the value of the spin control is derived from the precision of inc. If necessary, default precision can be adjusted by call to {Wx::SpinCtrlDouble#set_digits}. # @see Wx::SpinCtrlDouble#create # @param parent [Wx::Window] Parent window. Must not be NULL. # @param id [Integer] Window identifier. The value {Wx::StandardID::ID_ANY} indicates a default value. # @param value [String] Default value (as text). # @param pos [Array(Integer, Integer), Wx::Point] Window position. If {Wx::DEFAULT_POSITION} is specified then a default position is chosen. # @param size [Array(Integer, Integer), Wx::Size] Window size. If {Wx::DEFAULT_SIZE} is specified then a default size is chosen. # @param style [Integer] Window style. See {Wx::SpinButton}. # @param min [Float] Minimal value. # @param max [Float] Maximal value. # @param initial [Float] Initial value. # @param inc [Float] Increment value. # @param name [String] Window name. # @return [Wx::SpinCtrlDouble] def initialize(*args) end # Creation function called by the spin control constructor. # See {Wx::SpinCtrlDouble#initialize} for details. # @param parent [Wx::Window] # @param id [Integer] # @param value [String] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param min [Float] # @param max [Float] # @param initial [Float] # @param inc [Float] # @param name [String] # @return [Boolean] def create(parent, id=Wx::StandardID::ID_ANY, value=(''), pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::SP_ARROW_KEYS, min=0, max=100, initial=0, inc=1, name=("Wx::SpinCtrlDouble")) end # Gets precision of the value of the spin control. # @return [Integer] def get_digits; end alias_method :digits, :get_digits # Gets the increment value. # @return [Float] def get_increment; end alias_method :increment, :get_increment # Gets maximal allowable value. # @return [Float] def get_max; end alias_method :max, :get_max # Gets minimal allowable value. # @return [Float] def get_min; end alias_method :min, :get_min # Returns the text in the text entry part of the control. # @return [String] def get_text_value; end alias_method :text_value, :get_text_value # Gets the value of the spin control. # @return [Float] def get_value; end alias_method :value, :get_value # Sets precision of the value of the spin control. # Up to 20 digits are allowed after the decimal point. # @param digits [Integer] # @return [void] def set_digits(digits) end alias_method :digits=, :set_digits # Sets the increment value. # Using this method changes the number of digits used by the control to at least match the value of inc, e.g. using the increment of 0.01 sets the number of digits to 2 if it had been less than 2 before. However it doesn't change the number of digits if it had been already high enough. # In any case, you may call {Wx::SpinCtrlDouble#set_digits} explicitly to override the automatic determination of the number of digits. # @param inc [Float] # @return [void] def set_increment(inc) end alias_method :increment=, :set_increment # Sets range of allowable values. # @param minVal [Float] # @param maxVal [Float] # @return [void] def set_range(minVal, maxVal) end # @overload set_value(text) # Sets the value of the spin control. # It is recommended to use the overload taking a double value instead. If text doesn't represent a valid number, it may not be shown in the text part of the control at all (only empty string is guaranteed to be supported under all platforms) and the numeric value will be changed to {Wx::SpinCtrlDouble#get_min}. # Notice that, unlike {Wx::TextCtrl#set_value}, but like most of the other setter methods in wxWidgets, calling this method does not generate any events as events are only generated for the user actions. # @param text [String] # @return [void] # @overload set_value(value) # Sets the value of the spin control. # Calling this method doesn't generate any {Wx::EVT_SPINCTRLDOUBLE} events. # @param value [Float] # @return [void] def set_value(*args) end alias_method :value=, :set_value end # SpinCtrlDouble end