# :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}
Appearance: WXMSW Appearance
# | WXGTK Appearance
# | WXOSX Appearance
# |
# @see Events and Event Handling
# @see Wx::RadioButton
# @see Wx::CheckBox
#
#
# @wxrb_require USE_RADIOBOX
class RadioBox < Control
# @overload initialize()
# Default constructor.
#
#
# @see Wx::RadioBox#create
# @see Wx::Validator
# @return [Wx::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.
#
#
# @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] 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 [Wx::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.
#
#
# @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] 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 [Wx::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#initialize} 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]
# @param majorDimension [Integer]
# @param style [Integer]
# @param validator [Wx::Validator]
# @param name [String]
# @return [Boolean]
# @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#initialize} 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]
# @param majorDimension [Integer]
# @param style [Integer]
# @param validator [Wx::Validator]
# @param name [String]
# @return [Boolean]
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 [Boolean] 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 WXMSW, WXGTK, {Wx::QT} and {Wx::Universal} and always returns true in the other ports.
# @param n [Integer] The zero-based button position.
# @return [Boolean]
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 WXMSW, WXGTK, {Wx::QT} and {Wx::Universal} and always returns true in the other ports.
# @param n [Integer] The zero-based button position.
# @return [Boolean]
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 WXMSW and WXGTK2 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
# 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 [Boolean]
def is_empty; end
alias_method :empty?, :is_empty
# Returns the array of the labels of all items in the control.
# @return [Array]
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 [Boolean]
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