#include <IDragDropTarget.h>
|
| enum | { kDefaultIID = IID_IDRAGDROPTARGET } |
| |
|
| class | CDragDropTargetFlavorHelper |
| |
IDragDropTarget interface, represents the target or destination object in a drag drop operation. Implementors should derive from either CDragDropTarget or CDragDropTarget_Extensible.
- See Also
- IDragDropSource
| virtual bool16 IDragDropTarget::AffectsSameDataAsDragSource | ( | const IDragDropSource * | dragSource | ) | const |
| pure virtual |
Convenience method for determining if the specified drag source and this drag target affect the same data? If true, then data can be "moved" between such a source and target.
- Parameters
| dragSource | IN the drag source |
- Returns
- do they affect the same data? Default implementation in CDragDropTarget compares source->GetSourceDataBase() and this->GetTargetDataBase().
Implemented in CDragDropTarget.
Could the target accept the current drag. Implementors should override CouldAcceptTypes to report whether the target could accept any of the promised flavors in the dragged data. CouldAcceptTypes should not attempt to examine the actual drag data, but should base it's return value only on the flavors of data available. Add kDropTargetDrawsFeedback to result if target will draw its own feedback representing the data as it moves through the target, as does the layout widget. Not to be confused with target hilighting.
- Parameters
| iter | IN iterator based access to drag items in the drag (usually just one) |
| source | IN the drag drop source where the drag originated, used to help determine if operation would result in a move, copy or link. (drags from external apps will have source == nil) |
| controller | IN drag drop controller for this operation |
- Returns
- the action the target intends to perform (nothing, copy, move, link) plus target options for handling the drag
Implemented in CDragDropTarget, and BscDNDDropTarget.
| virtual void IDragDropTarget::DoDragEnter | ( | | ) | |
| protectedpure virtual |
Respond to a drag entering the target. Implementors often override DoDragEnter when implementing non standard drag tracking behavior - especially custom drag hilighting and feedback. If information about the data is needed while tracking it can be obtained from the IDragDropController interface on the session.
Implemented in CDragDropTarget, and BscDNDDropTarget.
| virtual void IDragDropTarget::DoDragLeave | ( | | ) | |
| protectedpure virtual |
Respond to a drag leaving the target. Implementors often override DoDragLeave when implementing non standard drag behavior - especially custom drag hilighting and feedback.
Implemented in CDragDropTarget.
| virtual void IDragDropTarget::DoDragWithin | ( | const PMPoint & | localPt | ) | |
| protectedpure virtual |
Respond to a drag moving over and within the target. Implementors often override DoDragWithin when implementing non standard drag behavior - especially custom drag feedback.
- Parameters
| localPt | IN coordinates of the cursor in local target coordinates. |
Implemented in CDragDropTarget.
| virtual SysWireframe IDragDropTarget::DoMakeDropHiliteRegion | ( | | ) | const |
| pure virtual |
Create a region to be highlighted to show that this target can accept the a drop. Can return constants kNoDropHilite, kDefaultDropHilite, or kTargetWillDrawDropHilite - caller is responsible for releasing the returned region, if any.
- Returns
- SysWireframe region to be highlighted
Implemented in CDragDropTarget.
| virtual void IDragDropTarget::DrawTargetOutline | ( | | ) | |
| pure virtual |
Draw the target's outline feedback. A convenience method for targets that draw their own Highlight/Outlined feedback, so that their flavor helpers can trigger the drawing. This will not be called by the framework.
Implemented in CDragDropTarget.
| virtual PMMatrix IDragDropTarget::GetInternalTransform | ( | | ) | const |
| pure virtual |
Get the transform to convert from window to targets internal coordinates. Not needed unless the target has internal targets.
- Returns
- should this target respond for the given point outside it's bounds
Implemented in CDragDropTarget.
| virtual IDataBase* IDragDropTarget::GetTargetDataBase | ( | | ) | const |
| pure virtual |
INTERNAL_USE_ONLY Return the database that would accept the drag data received by this target. Used to determine if a source and target belonging to different bosses actually view the same data. Can be used to determine if a drag operation should be a move vs. a copy, but not required.
- Returns
- the affected database (usually returns the database of an IDocument, or nil)
Implemented in CDragDropTarget.
| virtual bool16 IDragDropTarget::HitTest_OutsideBounds | ( | const SysPoint & | | ) | const |
| pure virtual |
Target implementors can override this to allow drop targets to respond to drops outside their actual bounds.
Default implementation returns kFalse. Used for autoscrolling a target when cursor over its scroll bars, among other things.
- Parameters
| pt | IN current mouse location |
- Returns
- should this target respond for the given point outside it's bounds
Implemented in CDragDropTarget.
| virtual bool16 IDragDropTarget::IsTargetModifiable | ( | | ) | const |
| pure virtual |
Is the target viewing "read-only" data. A convenience method to determine if a target is viewing "read-only" or modifiable data. Default is kTrue (modifiable).
Implemented in CDragDropTarget.
Create and process (or schedule) the commands needed to complete the drop operation. Normally called on the drop target, this method is also called on sources when the original data needs to be deleted, as in a drag to the trash.
- Parameters
| controller | IN drag drop controller for this operation |
| commandType | IN which operation to perform (targets will only receive kDragMove or kDrop) |
- Returns
- success or failure of the drop
Implemented in BscDNDDropTarget, CDragDropTarget_Extensible, and CDragDropTarget.
Look for non-widget targets inside this target. Used to traverse non-widget hierarchies (like page items, etc.) Transform to internal target must be supplied by this item
- Parameters
| windowPoint | IN current mouse location in window coordinates. |
| localPoint | OUT transform to that of target coordinates. |
| iter | IN iterator based access to drag items in the drag (usually just one) |
| source | IN the drag drop source where the drag originated |
| controller | IN drag drop controller for this operation |
- Returns
- should this target respond for the given point outside it's bounds
Implemented in CDragDropTarget.
Register a target callback object. IDropTargetCallback is an external object that wants to follow the tracking state of a particular drop target (i.e. RulerCarets).
- Parameters
| callback | IN callback to register |
Implemented in CDragDropTarget.
Release a target callback object. IDropTargetCallback is an external object that wants to follow the tracking state of a particular drop target.
- Parameters
| callback | IN callback to unregister and release |
Implemented in CDragDropTarget.
| virtual bool16 IDragDropTarget::SameAsDragSource | ( | const IDragDropSource * | dragSource | ) | const |
| pure virtual |
Convenience method for determining if the specified drag source is equivalent to this drag target?
- Parameters
| dragSource | IN the drag source |
- Returns
- are they the same? Default implementation in CDragDropTarget checks that the source and target are on the same boss object.
Implemented in CDragDropTarget.
| virtual void IDragDropTarget::SetDocument | ( | IDocument * | | ) | |
| pure virtual |
OBSOLETE Set the document on an internal target. This method allows the parent target to set the document on an internal target that might not otherwise be able to find it's document. Is there a better way than passing this from target to target?
- Parameters
| doc | IN the document to remember |
Implemented in CDragDropTarget.
| virtual void IDragDropTarget::SetInternalTransform | ( | PMMatrix | | ) | |
| pure virtual |
Set the transform to convert from window to targets internal coordinates
- Parameters
| controller | IN drag drop controller for this operation |
Implemented in CDragDropTarget.