# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # # EVT_TOGGLEBUTTON = 10188 # {Wx::ToggleButton} is a button that stays pressed when clicked by the user. # In other words, it is similar to {Wx::CheckBox} in functionality but looks like a {Wx::Button}. # Since wxWidgets version 2.9.0 this control emits an update UI event. # You can see {Wx::ToggleButton} in action in Widgets Sample. # === Events emitted by this class # # The following event-handler methods redirect the events to member method or handler blocks for {Wx::CommandEvent} events. # Event handler methods for events emitted by this class: # - {Wx::EvtHandler#evt_togglebutton}(id, meth = nil, &block): Handles a {Wx::EVT_TOGGLEBUTTON} event. # # === # # Category: {Wx::Controls} <div class='appearance'><span class='appearance'>Appearance:</span><table><tr><td> {Wx::MSW} Appearance # </td><td> {Wx::GTK} Appearance # </td><td> {Wx::OSX} Appearance # </td></tr></table></div> # @see Wx::CheckBox # @see Wx::Button # @see Wx::BitmapToggleButton # # class ToggleButton < AnyButton # @overload initialize() # Default constructor. # @return [ToggleButton] # @overload initialize(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, val=Wx::DEFAULT_VALIDATOR, name=Wx::CHECK_BOX_NAME_STR) # Constructor, creating and showing a toggle button. # # @see Wx::ToggleButton#create # @see Wx::Validator # @param parent [Wx::Window] Parent window. Must not be NULL. # @param id [Integer] Toggle button identifier. The value {Wx::StandardID::ID_ANY} indicates a default value. # @param label [String] Text to be displayed next to the toggle button. # @param pos [Array(Integer, Integer), Wx::Point] Toggle button position. If {Wx::DEFAULT_POSITION} is specified then a default position is chosen. # @param size [Array(Integer, Integer), Wx::Size] Toggle button size. If {Wx::DEFAULT_SIZE} is specified then a default size is chosen. # @param style [Integer] Window style. See {Wx::ToggleButton}. # @param val [Wx::Validator] Window validator. # @param name [String] Window name. # @return [ToggleButton] def initialize(*args) end # Creates the toggle button for two-step construction. # See {Wx::ToggleButton#toggle_button} for details. # @param parent [Wx::Window] # @param id [Integer] # @param label [String] # @param pos [Array(Integer, Integer), Wx::Point] # @param size [Array(Integer, Integer), Wx::Size] # @param style [Integer] # @param val [Wx::Validator] # @param name [String] # @return [true,false] def create(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, val=Wx::DEFAULT_VALIDATOR, name=Wx::CHECK_BOX_NAME_STR) end # Gets the state of the toggle button. # Returns true if it is pressed, false otherwise. # @return [true,false] def get_value; end alias_method :value, :get_value # Sets the toggle button to the given state. # This does not cause a EVT_TOGGLEBUTTON event to be emitted. # @param state [true,false] If true, the button is pressed. # @return [void] def set_value(state) end alias_method :value=, :set_value end # ToggleButton end