// $Revision: 1.2 $ // InsertionTarget.C // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_INSERTIONTARGET #include "InsertionTarget.h" #endif #ifndef TaligentSamples_SELECTIONMAPPING #include "SelectionMapping.h" #endif #ifndef Taligent_ASSERTIONS #include #endif //................................................................................ TaligentTypeExtensionMacro_Abstract(TInsertionTarget) TInsertionTarget::TInsertionTarget(MSelectionMapping* mapping, MFeedbacker* feedbacker) : TSelectionToolTarget(feedbacker, mapping), fSelection(NIL), fInsertionLocation() { } TInsertionTarget::~TInsertionTarget() { } TGPoint TInsertionTarget::GetInsertionLocation() const { return fInsertionLocation; } void TInsertionTarget::SetInsertionLocation(const TGPoint& location) { fInsertionLocation = location; TGPoint dummy(fInsertionLocation); GetCoordMapping()->TransformPoint(dummy); fSelection = GetMapping()->CreateInsertionPoint(dummy); Assertion(fSelection != NIL, "TInsertionTarget::SetInsertionLocation"); } TModelSelection* TInsertionTarget::GetSelection() const { return fSelection; }