CommandControl, PanelControl, HPanelControl, VPanelCon-
trol, CommandInteractor, PanelInteractor - predefined
UControl and UControlInteractor subclasses for common con-
trols
SYNOPSIS
#include <Unidraw/uctrls.h>
DESCRIPTION
CommandControl is a UControl subclass that executes a Com-
mand. CommandControl instances are most commonly used in
menus. CommandInteractor is a UControlInteractor subclass
that CommandControls create to define their appearance.
PanelControl is a subclass of UControl that provides a
radiobutton-like interface to selecting from a set of
mutually-exclusive choices. A PanelControl is passed an
interactor when it is created to define its appearance.
PanelControls are often used to create ``palettes'' of
interactors that engage the current Tool instance.
PanelInteractor is a UControlInteractor subclass that
defines an appearance that is often appropriate for Panel-
Controls. HPanelControl and VPanelControl are subclasses
of PanelControl that use PanelInteractor instances by
default.
COMMANDCONTROL PUBLIC OPERATIONS
CommandControl(ControlInfo*)
CommandControl(const char*, ControlInfo*)
Create a CommandControl, optionally supplying an
instance name. The constructors automatically cre-
ate and insert a ControlInteractor to define the
CommandControl's appearance.
virtual void Do()
If the ControlInfo's owner is a reversible command,
then Do will create a copy of the command, execute
it, and log it (if it remains reversible following
execution). If the owner is an irreversible com-
mand, then Do will execute it without copying or
logging it.
COMMANDINTERACTOR PUBLIC OPERATIONS
CommandInteractor(ControlInfo*)
Create a CommandInteractor with the given Con-
trolInfo object. The CommandInteractor displays
the ControlInfo's label and keylabel side-by-side
as would befit a menu entry.
PANELCONTROL PUBLIC OPERATIONS
PanelControl(Interactor*, ControlInfo*, ControlState* =
const char*, Interactor*, ControlInfo*,
ControlState* = nil
)
Create a PanelControl, supplying an interactor that
defines its appearance, a ControlInfo object, and
optionally an instance name and a ControlState,
which all PanelControls in a palette should share
to ensure mutual exclusion.
virtual void Do()
Do simply calls Down. Thus when the KeyMap exe-
cutes the keyboard equivalent specified in the Con-
trolInfo, it has the same effect as clicking on the
PanelControl instance.
PANELCONTROL SUBCLASS PUBLIC OPERATIONS
HPanelControl(ControlInfo*, ControlState* = nil)
HPanelControl(const char*, ControlInfo*, ControlState* =
nil)
VPanelControl(ControlInfo*, ControlState* = nil)
VPanelControl(const char*, ControlInfo*, ControlState* =
nil)
HPanelControls and VPanelControls simply create an
instance of PanelInteractor and pass it to the Pan-
elControl constructor. HPanelControls should be
used in row-oriented palettes, and VPanelControls
should be used in column-oriented palettes.
PANELINTERACTOR PUBLIC OPERATIONS
PanelInteractor(ControlInfo*, Orientation)
Create a PanelInteractor with the given orientation
and ControlInfo object. The PanelInteractor will
draw the ControlInfo's label in the center of its
canvas and the keylabel in the lower right. Hori-
zontal orientation is appropriate for row-oriented
instances, while Vertical orientation is appropri-
ate for column-oriented instances.
SEE ALSO
Command(3U), ControlInfo(3U), KeyMap(3U), Tool(3U), UCon-
trol(3U), globals(3U)
Man(1) output converted with
man2html