# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx
#
CHK_2STATE = 16384
#
CHK_3STATE = 4096
#
CHK_ALLOW_3RD_STATE_FOR_USER = 8192
# The possible states of a 3-state {Wx::CheckBox} (Compatible with the 2-state {Wx::CheckBox}).
#
#
#
class CheckBoxState < Wx::Enum
#
#
CHK_UNCHECKED = Wx::CheckBoxState.new(0)
#
#
CHK_CHECKED = Wx::CheckBoxState.new(1)
# 3-state checkbox only
#
CHK_UNDETERMINED = Wx::CheckBoxState.new(2)
end # CheckBoxState
# A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmark).
# Optionally (when the {Wx::CHK_3STATE} style flag is set) it can have a third state, called the mixed or undetermined state. Often this is used as a "Does Not Apply" state.
# === Styles
#
# This class supports the following styles:
#
# - {Wx::CHK_2STATE}: Create a 2-state checkbox. This is the default.
#
# - {Wx::CHK_3STATE}: Create a 3-state checkbox.
#
# - {Wx::CHK_ALLOW_3RD_STATE_FOR_USER}: By default a user can't set a 3-state checkbox to the third state. It can only be done from code. Using this flags allows the user to set the checkbox to the third state by clicking.
#
# - {Wx::Alignment::ALIGN_RIGHT}: Makes the text appear on the left of the checkbox.
#
# === 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_checkbox}(id, meth = nil, &block): Process a {Wx::EVT_CHECKBOX} event, when the checkbox is clicked.
#
# ===
#
# Category: {Wx::Controls}
Appearance: wxMSW Appearance
# | wxGTK Appearance
# | wxOSX Appearance
# |
# @see Wx::RadioButton
# @see Wx::CommandEvent
#
#
class CheckBox < Control
# @overload initialize()
# Default constructor.
#
# @see Wx::CheckBox#create
# @see Wx::Validator
# @return [Wx::CheckBox]
# @overload initialize(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::CheckBoxNameStr)
# Constructor, creating and showing a checkbox.
#
# @see Wx::CheckBox#create
# @see Wx::Validator
# @param parent [Wx::Window] Parent window. Must not be NULL.
# @param id [Integer] Checkbox identifier. The value {Wx::StandardID::ID_ANY} indicates a default value.
# @param label [String] Text to be displayed next to the checkbox.
# @param pos [Array(Integer, Integer), Wx::Point] Checkbox position. If {Wx::DEFAULT_POSITION} is specified then a default position is chosen.
# @param size [Array(Integer, Integer), Wx::Size] Checkbox size. If {Wx::DEFAULT_SIZE} is specified then a default size is chosen.
# @param style [Integer] Window style. See {Wx::CheckBox}.
# @param validator [Wx::Validator] Window validator.
# @param name [String] Window name.
# @return [Wx::CheckBox]
def initialize(*args) end
# Creates the checkbox for two-step construction.
# See {Wx::CheckBox#initialize} 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 validator [Wx::Validator]
# @param name [String]
# @return [Boolean]
def create(parent, id, label, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=0, validator=Wx::DEFAULT_VALIDATOR, name=Wx::CheckBoxNameStr) end
# Gets the state of a 2-state checkbox.
# Returns true if it is checked, false otherwise.
# @return [Boolean]
def get_value; end
alias_method :value, :get_value
# Gets the state of a 3-state checkbox.
# Asserts when the function is used with a 2-state checkbox.
# @return [Wx::CheckBoxState]
def get3state_value; end
# Returns whether or not the checkbox is a 3-state checkbox.
# true if this checkbox is a 3-state checkbox, false if it's a 2-state checkbox.
# @return [Boolean]
def is3state; end
# Returns whether or not the user can set the checkbox to the third state.
# true if the user can set the third state of this checkbox, false if it can only be set programmatically or if it's a 2-state checkbox.
# @return [Boolean]
def is3rd_state_allowed_for_user; end
# This is just a maybe more readable synonym for {Wx::CheckBox#get_value}: just as the latter, it returns true if the checkbox is checked and false otherwise.
# @return [Boolean]
def is_checked; end
alias_method :checked?, :is_checked
# Sets the checkbox to the given state.
# This does not cause a {Wx::EVT_CHECKBOX} event to get emitted.
# @param state [Boolean] If true, the check is on, otherwise it is off.
# @return [void]
def set_value(state) end
alias_method :value=, :set_value
# Sets the checkbox to the given state.
# This does not cause a {Wx::EVT_CHECKBOX} event to get emitted.
# Asserts when the checkbox is a 2-state checkbox and setting the state to {Wx::CheckBoxState::CHK_UNDETERMINED}.
# @param state [Wx::CheckBoxState]
# @return [void]
def set3state_value(state) end
end # CheckBox
end