The MSelectionMapping class defines a concise, five-function protocol for converting between TModelSelections and the screen real estate the specified data occupies. Because coordinate systems might vary from view to view, a standard coordinate system needs to be agreed upon to put geometries into their proper screen context. Each MSelectionMapping keeps a reference to a view to establish a coordinate system for geometries passed between MSelectionMapping and its clients.
- GetSelectionDisplayArea returns the area in which the selected data is displayed. The area is expressed in the coordinate system of the view returned by the GetMappingView function. This function is used to support feedback creation.
- CreateInsertionPoint returns an empty selection. The selection is setup so that data inserted into it appears at the specified location. If data can't be inserted at the specified location, the selection returned might be undefined. This function supports creation gestures such as dropping dragged data.
- CreateSelectionFromPoint returns a selection specifying the data located under a specified point. This selection is used to support the click-select gesture. If no data lies below the specified point, the selection returned might be empty or undefined.
- CreateSelectionFromArea returns a selection for the data located in the specified area. This function is used to implement the rubber band and lasso selection gestures. The selection returned may be empty or undefined if no data lies within the specified area. Derived classes are free to decide whether items that only intersect the specified area, and are not wholly contained by it, should be included in the selection.
- GetMappingView returns the coordinate view.