// $Revision: 1.2 $ // DragSelector.C // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_DRAGSELECTOR #include "DragSelector.h" #endif //................................................................................ TaligentTypeExtensionMacro_Abstract(TDragSelector) TDragSelector::TDragSelector(TDragAndDropItem* adoptedScrap, MGraphic* adoptedGraphic, const TViewHandle& coordinateView, TMouseMovedEvent& mouseMoved) : TDragAndDropInteractor(adoptedScrap, adoptedGraphic), MMouseEventHandler(coordinateView) { StartMouseMovedEvents(*(TMouseInputDevice*)mouseMoved.GetInputDevice()); } TDragSelector::~TDragSelector() { StopMouseMovedEvents(); } bool TDragSelector::MouseDown(TMouseDownEvent& mouseDown) { SetDone(true); return false; } bool TDragSelector::MouseUp(TMouseUpEvent& mouseUp) { DropAt(mouseUp.GetGlobalEventPosition()); StopMouseMovedEvents(); SetDone(true); return true; } bool TDragSelector::MouseMoved(TMouseMovedEvent& mouseMoved) { DragAt(mouseMoved.GetGlobalEventPosition()); return true; }