os_input_checkbox |
An input checkbox within a form.
An os_input_checkbox
presents a choice that can either be checked or unchecked within an os_form
. An os_input_checkbox is rendered as a checkbox
icon. An os_input_checkbox is initially unchecked
by default. The default can be changed to initially checked through either a
constructor or the check() member function.
Each os_input_checkbox
has a name, a value, and a marker, which are specified in a constructor and can
be modified through the name() , value()
, and marker() member functions. The same name can
be specified for more than one os_input_checkbox to
indicate that all represent choices within the same category.
If an os_input_checkbox
is checked when the containing os_form is
submitted, the name and value pair are transmitted. os_input_checkbox
allows multiple choices within the same category to be selected. All os_input_checkbox
elements with the same name are part of the same category. If you want to
restrict the category to a single choice, use the class os_input_radio
instead.
By default, a marker that labels
the choice is positioned on the right of the checkbox icon. The position of the
marker can be specified through either a constructor or the position()
member function.
An os_input_checkbox
need not specify a name if it is created for insertion into an os_checkbox_group
. Upon insertion, the os_input_checkbox assumes
both the name and marker position specified in the os_checkbox_group
.
enum os_input_checkbox::marker_position
{
marker_right, // Places the marker to the right of the checkbox.
marker_left // Places the marker to the left of the checkbox.
};
enum os_input_checkbox::check_type
{
not_checked, // Sets the checkbox to the unselected state.
checked // Sets the checkbox to the selected state.
};
marker_right ). Starts in the check
(default not_checked ) state.os_text element created from text
at position (default marker_right
). Starts in the check (default not_checked
) state.
and value , and attaches a copy of element
at position (default marker_right
). Starts in the check (default not_checked
) state.os_text element created from text
at position (default marker_right
). Starts in the check (default not_checked
) state.os_text element created from text
and returns a reference to the input checkbox.Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved