#include "ginteractors.h"

class GCheckBox : public GInteractor

This interactor subclass represents an onscreen check box. Clicking once on the check box selects it; clicking again removes the selection. If a GCheckBox 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:

GCheckBox
Constructor
GCheckBox(label) Creates a GCheckBox with the specified label.
Methods
isSelected() Returns true if the check box is selected.
setSelected(state) Sets the state of the check box.

Constructor detail


GCheckBox(string label);
Creates a 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);

Method detail


void setSelected(bool state);
Sets the state of the check box.

Usage:

chkbox->setSelected(state);

bool isSelected();
Returns true if the check box is selected.

Usage:

if (chkbox->isSelected()) ...