// $Revision: 1.6 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | MAutoDropAcceptor > Taxonomy Category: | Documented Samples | GlobalSelectionTool > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | None. > Purpose: | Provides an implementation that can be used to implement MDropAcceptors. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | TDOMDocumentComponentView > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | This class only provides an implementation for drop acceptance. Client applications must still derive from MDropAcceptor and forward calls to this implementation. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::MAutoDropAcceptor ; | 1. MAutoDropAcceptor () | 2. MAutoDropAcceptor (TInsertionTarget * target) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Constructor with a prespecified insertion target. > Calling Context: | 1. Called by the stream-in operators and clients. | 2. Called by clients. > Parameters: = 1. Takes no parameters. = 2. TInsertionTarget * target -The insertion target to drop into. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | If the first constructor is used (the default constructor), clients must call AdoptTarget before drops can be accepted. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::~ MAutoDropAcceptor ; | virtual ~ MAutoDropAcceptor () > Interface Category: | Sample. > Purpose: | Destructor. > Calling Context: | Called to destroy an object. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::AdoptTarget ; | virtual void AdoptTarget (TInsertionTarget * target) > Interface Category: | Sample. > Purpose: | Sets the insertion target used for drop acceptance. > Calling Context: | Called by clients to enable drop acceptance. > Parameters: = TInsertionTarget * target -The target to use for drop acceptance. NIL is a valid value and results in drop acceptance being diasabled. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::DragItemEntered ; | virtual void DragItemEntered (const TGPoint & whereEntered, const TSequenceOf < TTypeDescription > & availableTypes) > Interface Category: | Sample. > Purpose: | Provides drop acceptance feedback. > Calling Context: | Called by the client's MDropAcceptor derived class. > Parameters: = const TGPoint & whereEntered -The mouse location. = const TSequenceOf < TTypeDescription > & availableTypes -The available scrap types. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::DragItemMoved ; | virtual void DragItemMoved (const TGPoint & whereMoved, const TSequenceOf < TTypeDescription > & availableTypes) > Interface Category: | Sample. > Purpose: | Provides drop acceptance feedback. > Calling Context: | Called by the client's MDropAcceptor derived class. > Parameters: = const TGPoint & whereEntered -The mouse location. = const TSequenceOf < TTypeDescription > & availableTypes -The available scrap types. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::DragItemExited ; | virtual void DragItemExited (const TGPoint & whereExited) > Interface Category: | Sample. > Purpose: | Removes drop acceptance feedback. > Calling Context: | Called by the client's MDropAcceptor derived class. > Parameters: = const TGPoint & whereExited -The mouse location. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::ChoosePreferredType ; | virtual bool ChoosePreferredType (const TGPoint & whereDropped, const TSequenceOf < TTypeDescription > & availableTypes, TTypeDescription & chosenType) const > Interface Category: | Sample. > Purpose: | Chooses a type from the supplied type list that should be dropped onto the target. > Calling Context: | Called by the Drag and Drop framework. > Parameters: = const TGPoint & whereDropped -The drop position. = const TSequenceOf < TTypeDescription > & availableTypes -The types available from dropping. = TTypeDescription & chosenType -The type that should be dropped. > Return Value: | Returns true if the data can be accepted, false otherwise. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::AcceptDrop ; | virtual bool AcceptDrop (const TGPoint & whereDropped, const TTypeDescription & type, const TScrapItem & item) > Interface Category: | Sample. > Purpose: | Performs a drop operation. > Calling Context: | Called by the Drag and Drop framework. > Parameters: = const TGPoint & whereDropped -The drop location. = const TTypeDescription & type -The type of data contained in the scrap item. = const TScrapItem & item -The dropped data. > Return Value: | Returns true if the data can be accepted, false otherwise. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::AdjustFeedbackGraphic ; | void AdjustFeedbackGraphic (const TSequenceOf < TTypeDescription > & types) > Interface Category: | Sample. > Purpose: | Updates the drop acceptance feedback. > Calling Context: | Called by DragItemEntered and DragItemMoved. > Parameters: = const TSequenceOf < TTypeDescription > & types - The possible drop data types. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: MAutoDropAcceptor::NegotiateType ; | TTypeDescription * NegotiateType (MDataExchanger * exchanger, const TSequenceOf < TTypeDescription > & availableTypes) const > Interface Category: | Sample. > Purpose: | Determines which types can be accepted for drop. > Calling Context: | Called by DropItemEntered, DropItemMoved, DropItemExited, and AdjustDropFeedback. > Parameters: = MDataExchanger * exchanger -The data exchanger (selection) that data will be dropped through. = const TSequenceOf < TTypeDescription > & availableTypes -The available data types. > Return Value: | The type of data that can be dropped into the exchanger. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif