// $Revision: 1.4 $ //------------------------------------------------------------------------------ // // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. // // Project: TaligentSelectionTool // File: SelectionMapping.h // Build/Version: 1.0.0 // // Description: The MSelectionMapping class defines a concise, five function // protocol for converting between TModelSelections and the // screen real estate the specified data occupies. Since // coordinate systems may 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 itself and its clients. // //------------------------------------------------------------------------------ #ifndef TaligentSamples_SELECTIONMAPPING #define TaligentSamples_SELECTIONMAPPING class MSelectionMapping; #ifndef Taligent_GUICOMPOUNDDOCUMENT #include #endif //................................................................................ class MSelectionMapping { public: MSelectionMapping(const TViewHandle& view); virtual ~MSelectionMapping(); virtual TGArea GetSelectionDisplayArea(const TModelSelection& area) const = 0; virtual TModelSelection* CreateInsertionPoint(const TGPoint& where) const = 0; virtual TModelSelection* CreateSelectionFromPoint(const TGPoint& area) const = 0; virtual TModelSelection* CreateSelectionFromArea(const TGArea& area) const = 0; TViewHandle GetMappingView() const; private: TViewHandle fView; }; #endif