|
htmlInputRadioGroup
Radio button group control class | [Previous] [Main] [Next] |
| htmlInputRadioGroup organizes and manages groups of htmlInputRadio object instantiations, used to create radio button input areas in documents. This class is similar in functionality to the htmlInputCheckBoxGroup class, but without the Check() and IsChecked() methods which don't apply to radio button groups.
| |
|
| |
| 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 htmlInputRadioGroup class make such grouping easy. Using it, htmlInputRadio objects can be collected into a single group object, enabling them to share common characteristics, such as name, alignment, and initial state. Individual htmlInputRadio objects are added to the group using the << operator or the Add() method.
| |
|
| |
| #include <dcmicro/htmlpp/radiogrp.h>
| |
|
| |
| |
|
| |
| htmlForm, htmlInputRadio, htmlInputCheckBoxGroup
| |
|
| |
| #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 ;
| |
|
| |
| htmlInputRadioGroup( | const String& name,
| |
| Arrangement arrange = vertical,
| ||
| Alignment align_position = align_right )
| ||
| Constructs an empty object using the specified arrangement and alignment settings.
| |
|
| |
| htmlInputRadioGroup( const htmlInputRadioGroup& rhs )
| |
| Copy constructor.
| |
|
| |
| virtual ~htmlInputRadioGroup()
| |
| Destroys the object.
| |
|
| |
| = | htmlInputRadioGroup& operator= ( const htmlInputRadioGroup& rhs )
| |
| Replaces group contents with a copy of rhs and returns a reference to the group.
| |
|
| |
| << | htmlInputRadioGroup& operator<< (
| |
| const htmlInputRadio& radio_button )
| ||
| Adds the radio_button object to the group and returns a reference to the group.
| |
|
| |
| Add | htmlObject FAR * Add( const htmlInputRadio& radio_button )
| |
| Adds the radio_button object to the group and returns a pointer to the new object.
| |
|
| |
| Name | htmlInputRadioGroup& Name( const String& name )
| |
| Sets the name for all radio buttons in the group to name and returns a reference to the group. Subsequent radio button object additions will use name by default.
| |
|
| |
| Name | String Name() const
| |
| Returns the name used for all radio button objects in the group as a string.
| |
|
| |
| Arrange | htmlInputRadioGroup& Arrange( Arrangement arrange )
| |
| Sets the arrangement for all radio buttons in the group to arrange and returns a reference to the group. Subsequent radio button object additions will use arrange by default.
| |
|
| |
| Arrange | Arrangement Arrange() const
| |
| Returns the Arrangement setting used for all radio button objects in the group as an integer. The default value is vertical.
| |
|
| |
| Align | htmlInputRadioGroup& Align( Alignment align )
| |
| Set the alignment for all radio buttons in the group to align and returns a reference to the group. Subsequent radio button object additions will use align by default.
| |
|
| |
| Align | int Align() const
| |
| Returns the Alignment setting used for all radio button objects in the group. The default value is align_right.
| |
|
| |
| Clone | htmlObject FAR * Clone() const
| |
| Returns a base-class pointer to a deep copy of the object.
| |
|
| |
| See the example in Tutorial:Forms:Radio Buttons
| |
