SimpleCxxLib packageclass GCheckBox : public GInteractorGCheckBox has an action command, clicking on the box
generates a GActionEvent.
The display image of a check box is machine-dependent, but the declaration
GCheckBox *traceBox = new GCheckBox("Trace");
typically produces a check box that looks something like this:
| Constructor | |
Creates a GCheckBox with the specified label. | |
| Methods | |
Returns true if the check box is selected. | |
| Sets the state of the check box. | |
GCheckBox(string label);
GCheckBox with the specified label. In contrast
to the GButton constructor, this constructor does not set
an action command.
Usage:
GCheckBox *chkbox = new GCheckBox(label);
void setSelected(bool state);
Usage:
chkbox->setSelected(state);
bool isSelected();
true if the check box is selected.
Usage:
if (chkbox->isSelected()) ...