# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # A radio box item is used to select one of number of mutually exclusive choices. # It is displayed as a vertical column or horizontal row of labelled buttons. # === Styles # # This class supports the following styles: # # - {Wx::RA_SPECIFY_ROWS}: The major dimension parameter refers to the maximum number of rows. # - {Wx::RA_SPECIFY_COLS}: The major dimension parameter refers to the maximum number of columns. # # === 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_radiobox}(id, meth = nil, &block): Process a {Wx::EVT_RADIOBOX} event, when a radiobutton is clicked. # # === # # 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 Events and Event Handling # @see Wx::RadioButton # @see Wx::CheckBox # # class RadioBox < Control # @overload initialize() # Default constructor. # # @see Wx::RadioBox#create # @see Wx::Validator # @return [RadioBox] # @overload initialize(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, choices=nil, majorDimension=0, style=Wx::RA_SPECIFY_COLS, validator=Wx::DEFAULT_VALIDATOR, name=Wx::RADIO_BOX_NAME_STR) # Constructor, creating and showing a radiobox. # <b>{Wx::Perl} Note:</b> Not supported by {Wx::Perl}. # @see Wx::RadioBox#create # @see Wx::Validator # @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 label [String] Label for the static box surrounding the radio buttons. # @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 choices [Array<String>] An array of choices with which to initialize the radiobox. # @param majorDimension [Integer] Specifies the maximum number of rows (if style contains {Wx::RA_SPECIFY_ROWS}) or columns (if style contains {Wx::RA_SPECIFY_COLS}) for a two-dimensional radiobox. The default value of 0 means to use the number of items, i.e. n. # @param style [Integer] Window style. See {Wx::RadioBox}. # @param validator [Wx::Validator] Window validator. # @param name [String] Window name. # @return [RadioBox] # @overload initialize(parent, id, label, pos, size, choices, majorDimension=0, style=Wx::RA_SPECIFY_COLS, validator=Wx::DEFAULT_VALIDATOR, name=Wx::RADIO_BOX_NAME_STR) # Constructor, creating and showing a radiobox. # <b>{Wx::Perl} Note:</b> Use an array reference for the choices parameter. # @see Wx::RadioBox#create # @see Wx::Validator # @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 label [String] Label for the static box surrounding the radio buttons. # @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 choices [Array<String>] An array of choices with which to initialize the radiobox. # @param majorDimension [Integer] Specifies the maximum number of rows (if style contains {Wx::RA_SPECIFY_ROWS}) or columns (if style contains {Wx::RA_SPECIFY_COLS}) for a two-dimensional radiobox. The default value of 0 means to use the number of items, i.e. number of elements in choices. # @param style [Integer] Window style. See {Wx::RadioBox}. # @param validator [Wx::Validator] Window validator. # @param name [String] Window name. # @return [RadioBox] def initialize(*args) end # @overload create(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, choices=nil, majorDimension=0, style=Wx::RA_SPECIFY_COLS, validator=Wx::DEFAULT_VALIDATOR, name=Wx::RADIO_BOX_NAME_STR) # Creates the radiobox for two-step construction. # See {Wx::RadioBox#radio_box} for further 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 choices [Array<String>] # @param majorDimension [Integer] # @param style [Integer] # @param validator [Wx::Validator] # @param name [String] # @return [true,false] # @overload create(parent, id, label, pos, size, choices, majorDimension=0, style=Wx::RA_SPECIFY_COLS, validator=Wx::DEFAULT_VALIDATOR, name=Wx::RADIO_BOX_NAME_STR) # Creates the radiobox for two-step construction. # See {Wx::RadioBox#radio_box} for further 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 choices [Array<String>] # @param majorDimension [Integer] # @param style [Integer] # @param validator [Wx::Validator] # @param name [String] # @return [true,false] def create(*args) end # Finds a button matching the given string, returning the position if found, or {Wx::NOT_FOUND} if not found. # @param string [String] The string to find. # @param bCase [true,false] Should the search be case-sensitive? # @return [Integer] def find_string(string, bCase=false) end # Returns the number of columns in the radiobox. # @return [Integer] def get_column_count; end alias_method :column_count, :get_column_count # Returns a radio box item under the point, a zero-based item index, or {Wx::NOT_FOUND} if no item is under the point. # @param pt [Array(Integer, Integer), Wx::Point] Point in client coordinates. # @return [Integer] def get_item_from_point(pt) end alias_method :item_from_point, :get_item_from_point # Returns the helptext associated with the specified item if any or {Wx::EmptyString}. # # @see Wx::RadioBox#set_item_help_text # @param item [Integer] The zero-based item index. # @return [String] def get_item_help_text(item) end alias_method :item_help_text, :get_item_help_text # Returns the tooltip associated with the specified item if any or NULL. # # @see Wx::RadioBox#set_item_tool_tip # @see Wx::Window#get_tool_tip # @param item [Integer] # @return [Wx::ToolTip] def get_item_tool_tip(item) end alias_method :item_tool_tip, :get_item_tool_tip # Returns the number of rows in the radiobox. # @return [Integer] def get_row_count; end alias_method :row_count, :get_row_count # Returns true if the item is enabled or false if it was disabled using Enable(n, false). # This function is currently only implemented in {Wx::MSW}, {Wx::GTK}, {Wx::QT} and {Wx::Universal} and always returns true in the other ports. # @param n [Integer] The zero-based button position. # @return [true,false] def is_item_enabled(n) end alias_method :item_enabled?, :is_item_enabled # Returns true if the item is currently shown or false if it was hidden using Show(n, false). # Note that this function returns true for an item which hadn't been hidden even if the entire radiobox is not currently shown. # This function is currently only implemented in {Wx::MSW}, {Wx::GTK}, {Wx::QT} and {Wx::Universal} and always returns true in the other ports. # @param n [Integer] The zero-based button position. # @return [true,false] def is_item_shown(n) end alias_method :item_shown?, :is_item_shown # Sets the helptext for an item. # Empty string erases any existing helptext. # @see Wx::RadioBox#get_item_help_text # @param item [Integer] The zero-based item index. # @param helptext [String] The help text to set for the item. # @return [void] def set_item_help_text(item, helptext) end # Sets the tooltip text for the specified item in the radio group. # This function is currently only implemented in {Wx::MSW} and {Wx::GTK2} and does nothing in the other ports. # @see Wx::RadioBox#get_item_tool_tip # @see Wx::Window#set_tool_tip # @param item [Integer] Index of the item the tooltip will be shown for. # @param text [String] Tooltip text for the item, the tooltip is removed if empty. # @return [void] def set_item_tool_tip(item, text) end # Sets the selection to the given item. # Notice that a radio box always has selection, so n must be valid here and passing {Wx::NOT_FOUND} is not allowed. # @param n [Integer] # @return [void] def set_selection(n) end alias_method :selection=, :set_selection # Shows or hides individual buttons. # true if the item has been shown or hidden or false if nothing was done because it already was in the requested state. # @see Wx::Window#show # @param item [Integer] The zero-based position of the button to show or hide. # @param show [true,false] true to show, false to hide. # @return [true,false] def show(item, show=true) end # Returns the number of items in the control. # # @see Wx::RadioBox#is_empty # @return [Integer] def get_count; end alias_method :count, :get_count # Returns the label of the item with the given index. # The index must be valid, i.e. less than the value returned by {Wx::RadioBox#get_count}, otherwise an assert is triggered. Notably, this function can't be called if the control is empty. # # The label of the item. # @param n [Integer] The zero-based index. # @return [String] def get_string(n) end alias_method :string, :get_string # Sets the label for the given item. # @param n [Integer] The zero-based item index. # @param string [String] The label to set. # @return [void] def set_string(n, string) end # Returns the index of the selected item. # As radio boxes always have a selected item, the return value is never {Wx::NOT_FOUND} for this class. # @return [Integer] def get_selection; end alias_method :selection, :get_selection # Returns true if the control is empty or false if it has some items. # # @see get_count # @return [true,false] def is_empty; end alias_method :empty?, :is_empty # Returns the array of the labels of all items in the control. # @return [Array<String>] def get_strings; end alias_method :strings, :get_strings # Selects the item with the specified string in the control. # This method doesn't cause any command events to be emitted. # Notice that this method is case-insensitive, i.e. the string is compared with all the elements of the control case-insensitively and the first matching entry is selected, even if it doesn't have exactly the same case as this string and there is an exact match afterwards. # # true if the specified string has been selected, false if it wasn't found in the control. # @param string [String] The string to select. # @return [true,false] def set_string_selection(string) end alias_method :string_selection=, :set_string_selection # Returns the label of the selected item or an empty string if no item is selected. # # @see get_selection # @return [String] def get_string_selection; end alias_method :string_selection, :get_string_selection # This is the same as {set_selection} and exists only because it is slightly more natural for controls which support multiple selection. # @param n [Integer] # @return [void] def select(n) end end # RadioBox end