Tool subsystem

The Tool subsystem implements the arrow cursor tool. The arrow tool can be used in three ways: it can set a new selection, modify an existing selection, or drag the current selection to a new location. You might also combine these operations. For example, a user can click on an item, selecting it, and immediately drag it to a new location. The Tool subsystem has several classes that work in conjunction with classes from the Target subsystem to implement
this behavior.

A cursor tool gets its behavior from an interactor. The Tool subsystem contains three interactors that implement different aspects of the arrow tool's behavior. These interactors handle events from the input system and convert them into the familiar selection and drag gestures.


The behavior of the arrow tool is complex. It is often not possible to determine what the end result of a gesture will be from the first event. For example, when the user clicks on an item, it is not possible to determine if the gesture is a simple click-select or drag gesture until the next event is received. If the next event is a mouseup, then the gesture is a simple select gesture. If it is a mousemove, the gesture turns into a drag gesture. To make things even more difficult, keyboard modifier keys and the current selection also have a bearing on the outcome of a gesture. The TSelectionToolInteractor interprets events until it is able to definitively determine whether the gesture is a selection or drag gesture. Once this is established it begins a second, subordinate interactor, to complete
the gesture.

The TRangeSelector interactor implements rubber band selection, complete with appropriate feedback.

TDragSelector performs drag operations.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker