|
htmlInputCheckBoxGroup
Checkbox group control class | [Previous] [Main] [Next] |
| htmlInputCheckBoxGroup organizes and manages groups of htmlInputCheckBox object instantiations, used to create checkbox input areas in documents. This class is similar in functionality to the htmlInputRadioGroup class.
| |
|
| |
| HTML doesn't provide a mechanism for grouping input controls. Instead controls that are to be logically grouped must be output separately and coded with common attributes, such as the NAME tag.
| |
|
| |
| The htmlInputCheckBoxGroup class allows multiple htmlInputCheckBox objects to be collected into a single group object, enabling them to share common characteristics, such as name, alignment, and initial state. Individual htmlInputCheckBox objects are added to the group using the << operator or the Add() method.
| |
|
| |
| #include <dcmicro/htmlpp/checkgrp.h>
| |
|
| |
| |
|
| |
| htmlForm, htmlInputCheckBox, htmlInputRadioGroup
| |
|
| |
| #define STATE_CHECKED TRUE
| |
| #define STATE_NOT_CHECKED FALSE
| |
|
| |
| typedef enum {
| |
| align_default = 0,
| |
| align_left,
| |
| align_center,
| |
| align_right,
| |
| align_justify
| |
| } Alignment ;
| |
|
| |
| typedef enum {
| |
| horizontal,
| |
| vertical
| |
| } Arrangement ;
| |
|
| |
| htmlInputCheckBoxGroup( const String& name,
| ||
| Arrangement arrange = vertical,
| ||
| Alignment align_position = align_right )
| ||
| Constructs an empty group using the specified name, arrangement and alignment settings.
| |
|
| |
| htmlInputCheckBoxGroup( const htmlCheckBoxGroup& rhs )
| |
| Copy Constructor.
| |
|
| |
| virtual ~htmlInputCheckBoxGroup()
| |
| Destroys the object.
| |
|
| |
| = | htmlInputCheckBoxGroup& operator= (
| |
| const htmlInputCheckBox& rhs )
| ||
| Replaces group contents with a copy of rhs and returns a reference to the group.
| |
|
| |
| << | htmlInputCheckBoxGroup& operator<< (
| |
| const htmlInputCheckBox& checkbox )
| ||
| Adds the checkbox object to the group and returns a reference to the group.
| |
|
| |
| Add | htmlObject FAR * Add( const htmlInputCheckBox& checkbox )
| |
| Adds checkbox to the group and returns a pointer to the new object.
| |
|
| |
| Name | htmlInputCheckBoxGroup& Name( const String& name )
| |
| Sets the name for all checkboxes in the group to name and returns a reference to the group. Subsequent checkbox object additions will use name by default.
| |
|
| |
| Name | String Name() const
| |
| Returns the name used for all checkbox objects in the group as a string.
| |
|
| |
| Arrange | htmlInputCheckBoxGroup& Arrange( Arrangement arrange )
| |
| Sets the arrangement for all checkboxes in the group to arrange and returns a reference to the group. Subsequent checkbox object additions will use arrange by default.
| |
|
| |
| Arrange | Arrangement Arrange() const
| |
| Returns the Arrangement setting used for all checkbox objects in the group as an integer. The default value is vertical.
| |
|
| |
| Align | htmlInputCheckBoxGroup& Align( Alignment align )
| |
| Set the alignment for all checkboxes in the group to align and returns a reference to the group. Subsequent checkbox object additions will use align by default.
| |
|
| |
| Align | int Align() const
| |
| Returns the Alignment setting used for all checkbox objects in the group. The default value is align_right.
| |
|
| |
| Check | htmlInputCheckBoxGroup& Check( Boolean initial_check_state = STATE_CHECKED )
| |
| Sets the check state (TRUE or FALSE, STATE_CHECKED, or STATE_NOT_CHECKED) for all checkboxes in the group to initial_check_state and returns a reference to the group. Subsequent checkbox object additions will not use initial_check_state by default.
| |
|
| |
| IsChecked | Boolean IsChecked() const
| |
| Returns the initial check state for all checkboxes in the group (TRUE or FALSE).
| |
|
| |
| Clone | htmlObject FAR * Clone() const
| |
| Returns a base-class pointer to a deep copy of the object.
| |
|
| |
|
| |
| See the example in Tutorial:Forms:Checkboxes
| |
|
| |
