The MFeedbacker class defines a protocol and provides an implementation for feedback management. Although it's seldom needed, derived classes are free to override parts of the implementation. The interface is cleanly divided into an external client (caller) portion and a portion of interest to derived classes (the protected functions). MFeedbacker keeps a reference to a view for use as a coordinate system for the exchange of graphic data, much like the MSelectionMapping class does.
- AdoptFeedback, OrphanFeedback, and ReplaceFeedback are used to manipulate onscreen feedback display. All adopted feedback is displayed until it is either replaced or orphaned.
- DrawFeedback draws all adopted feedback graphics to a port. It is typically called by a view's DrawContents function during updates. If feedback is actually drawn (something has been adopted by the MFeedbacker), a value of true is returned, signalling that current selection feedback should not be drawn by the caller.
- GetFeedbackView returns the coordinate system view used by the MFeedbacker.
- HandleHideCurrentSelectionFeedback is called when the first feedback graphic is added to the feedbacker. Current selection feedback is generally unwanted during interactive gestures, so it is removed until the gesture is complete and interaction feedback is removed. By default, this function simple invalidates the feedback view.
- HandleShowCurrentSelectionFeedback is called after the last feedback graphic is orphaned. By default this function simply invalidates the feedback view.
- HandleFeedbackChanged is called whenever feedback is adopted, orphaned, or replaced. By default, this function simply invalidates the feedback view.