Selection feedback graphic

A canvas graphic that supports graphic-specific feedback returns a non-Nil feedback graphic (TSRTBoxFeedbacker or TSRTHandleFeedbacker) with its CreateFeedbacker function. A feedback graphic appears in place of the canvas graphic to indicate that the canvas graphic is selected. The feedback graphic allows the end user to interact with the canvas graphic to do such things as transformations or editing.

The feedback graphic created by this function is not generic. Therefore, you cannot create a feedback graphic with this function when the feedback appearance and functionality are general to all canvas graphics such as the feedback graphic for transforming a canvas graphic described in "Selecting canvas graphics" on page 28. See also "Defining a new way to manipulate a selection" on page 56, for more information on how to create a generic feedback graphic.

However, you would create a feedback graphic with this function for an operation such as editing. In this case the feedback graphic and functionality can differ from one canvas graphic to another; for example, editing a rectangle is different from editing a curve where the end user moves the curve control points one at a time.

The Mars application uses the TSRTBoxFeedbacker described in Chapter 3, "Using GrafEdit sample programs." The TSRTBoxFeedbacker class derives from the TSRTFeedbacker class, provided to assist developers in creating other types of feedbackers.

GrafEdit also provides, through TSRTHandleFeedbacker, a second feedbacker not displayed in Mars. The handle feedbacker, shown in Figure 26, is a traditional feedbacker in common drawing applications. This feedbacker graphic has four corners for stretching the selected graphic, as well as providing for translation of the graphic (by clicking in the center). The handle feedbacker, however, does not provide rotation.



[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