# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx
# A {Wx::SpinButton} has two small up and down (or left and right) arrow buttons.
#
# It is often used next to a text control for incrementing and decrementing a value. Portable programs should try to use {Wx::SpinCtrl} instead as {Wx::SpinButton} is not implemented for all platforms but {Wx::SpinCtrl} is as it degenerates to a simple {Wx::TextCtrl} on such platforms.
#
#
#
Note:
#
the range supported by this control (and {Wx::SpinCtrl}) depends on the platform but is at least -0x8000
to 0x7fff. Under GTK and Win32 with sufficiently new version of comctrl32.dll (at least 4.71 is required, 5.80 is recommended) the full 32 bit range is supported.
#
#
#
# ### Styles
#
# This class supports the following styles:
#
# - {Wx::SP_HORIZONTAL}: Specifies a horizontal spin button (note that this style is not supported in WXGTK).
#
# - {Wx::SP_VERTICAL}: Specifies a vertical spin button.
#
# - {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::SpinEvent} events.
# Event handler methods for events emitted by this class:
#
# - {Wx::EvtHandler#evt_spin}(id, meth = nil, &block): Generated whenever pressing an arrow changed the spin button value.
#
# - {Wx::EvtHandler#evt_spin_up}(id, meth = nil, &block): Generated whenever pressing left/up arrow changed the spin button value.
#
# - {Wx::EvtHandler#evt_spin_down}(id, meth = nil, &block): Generated whenever pressing right/down arrow changed the spin button value.
#
# Note that if you handle both SPIN and UP or DOWN events, you will be notified about each of them twice: first the UP/DOWN event will be received and then, if it wasn't vetoed, the SPIN event will be sent.
#
# Category: {Wx::Controls} Appearance: WXMSW Appearance
# | WXGTK Appearance
# | WXOSX Appearance
# |
# @see Wx::SpinCtrl
#
#
# @wxrb_require USE_SPINBTN
class SpinButton < Control
# @overload initialize()
# Default constructor.
# @return [Wx::SpinButton]
# @overload initialize(parent, id=-1, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::SP_VERTICAL, name=("SPIN_BUTTON"))
# Constructor, creating and showing a spin button.
#
#
# @see Wx::SpinButton#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 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} class description.
# @param name [String] Window name.
# @return [Wx::SpinButton]
def initialize(*args) end
# Scrollbar creation function called by the spin button constructor.
#
# See {Wx::SpinButton#initialize} for details.
# @param parent [Wx::Window]
# @param id [Integer]
# @param pos [Array(Integer, Integer), Wx::Point]
# @param size [Array(Integer, Integer), Wx::Size]
# @param style [Integer]
# @param name [String]
# @return [Boolean]
def create(parent, id=-1, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::SP_VERTICAL, name=("Wx::SpinButton")) end
# Get the value for increment for a spin control.
#
# The default value is 1 but it can be changed using {Wx::SpinButton#set_increment}.
# @return [Integer]
def get_increment; end
alias_method :increment, :get_increment
# Returns the maximum permissible value.
#
#
# @see Wx::SpinButton#set_range
# @return [Integer]
def get_max; end
alias_method :max, :get_max
# Returns the minimum permissible value.
#
#
# @see Wx::SpinButton#set_range
# @return [Integer]
def get_min; end
alias_method :min, :get_min
# Returns the current spin button value.
#
#
# @see Wx::SpinButton#set_value
# @return [Integer]
def get_value; end
alias_method :value, :get_value
# Sets the increment for the control.
#
# The increment is the number by which the value changes when the up or down arrow is used.
# The default is 1.
# This function is currently implemented only in WXMSW and does nothing under the other platforms.
# @see Wx::SpinCtrl#set_increment
# @param value [Integer]
# @return [void]
def set_increment(value) end
alias_method :increment=, :set_increment
# Sets the range of the spin button.
#
# In portable code, min should be less than or equal to max. In WXMSW it is possible to specify minimum greater than maximum and the native control supports the same range as if they were reversed, but swaps the meaning of up and down arrows, however this dubious feature is not supported on other platforms.
# @see Wx::SpinButton#get_min
# @see Wx::SpinButton#get_max
# @param min [Integer] The minimum value for the spin button.
# @param max [Integer] The maximum value for the spin button.
# @return [void]
def set_range(min, max) end
# Sets the value of the spin button.
# @param value [Integer] The value for the spin button.
# @return [void]
def set_value(value) end
alias_method :value=, :set_value
end # SpinButton
end