SelectTool(3)
tool for modifying an editor's current selection
SYNOPSIS
#include <Unidraw/Tools/select.h>
DESCRIPTION
SelectTool lets a user change the current selection by direct
manipulation, thus affecting the enclosing editor's selection object.
A single click directly on a component view selects that view and
unselects all others. Clicking while holding the Shift key down adds
the target component to the selection if it was not already selected
and removes it if it was selected. The user can select all components
within a rectangular area in the viewer by clicking somewhere outside
the nearest component and dragging to specify the rectangular area.
All components completely within the area will be selected.
PUBLIC OPERATIONS
- SelectTool(ControlInfo* = nil)
-
Create a new SelectTool.
- virtual Manipulator* CreateManipulator(
-
- Viewer*, Event&, Transformer*
-
- )
-
- virtual void InterpretManipulator(Manipulator*)
-
If the user did not click on a component, then CreateManipulator
creates a DragManip with a RubberRect for dragging out a rectangular
area. Otherwise, CreateManipulator clears the editor's selection and
selects the hit component. If the user holds the Shift key down in
either case, the components that would have otherwise been selected
will be unselected, and vice versa. InterpretManipulator will only be
called if CreateManipulator returned a non-nil manipulator; in this
case InterpretManipulator will examine the DragManipulator's
RubberRect and select the component views falling completely within
it.
PROTECTED OPERATIONS
- virtual void Localize(Selection*, Viewer*)
-
Localize ensures that the given selection object contains only those
views displayed in the given viewer. CreateManipulator calls this
function to avoid possibly shift-selecting views from different
components.