Convenience subsystem

The purpose of the Convenience subsystem is to make using the other subsystems easier. It provides several classes that help integrate different levels of functionality into client programs.


MSelectionToolHandler implements a selection tool handler that supports the arrow tool. It creates all three target types from the Target subsystem as well as TSelectionToolInteractors from the Tool subsystem.

In its current implementation, an MSelectionToolHandler is associated with a single model through an MGUIBundle. Therefore, if a program has multiple models, it requires multiple MSelectionToolHandlers or it has to implement its own derived class from MToolHandler (though it can still have a single MSelectionMapping and MFeedbacker if preferred).

MAutoDropAcceptor implements a drop acceptor, complete with acceptance feedback, using the Target subsystem. Clients simply forward MDropAcceptor calls to this class and the drop acceptor does all the work.


Because MAutoDropAcceptor uses TInsertionTarget, MAutoDropAcceptor interprets all drops as insertion operations. Drops never replace the data they are dropped on.

TDOMDocumentComponentView captures all the functionality in one class. It selects, it drags, and it drops. Clients only need to implement four virtual functions.


TDOMDocumentComponentView has an MSelectionToolHandler for its model. The handler creates tool targets for the view's model. It also derives from MDropAcceptor, forwarding all calls to MAutoDropAcceptor, which provides an implementation of drop acceptance. It also takes care of forwarding events to the Cursor Tools framework. TDOMDocumentComponentView manages a TToolNegotiator automatically.

Clients of TDOMComponentView derive complete selection and drag and drop functionality by implementing the pure virtual MSelectionMapping functions.


[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