Graphisoft®

Dialog ManagerVersion: 2.0

EditDragSourceObserver::EditDragStarted

Event handler for the drag started notification.

virtual void EditDragStarted (
    const EditDragSourceEvent & ev,
    UShort *            effect
);

Parameters

ev
A reference to the event.
effect
Drag and drop effect can take the following values: DragDrop::Reject, DragDrop::Accept, DragDrop::Copy, DragDrop::Move, DragDrop::Link, DragDrop::Delete.

Description

Use this event to set custom drag and drop data in the drag source control.

Example

// Method Example:
void	TextControl::EditDragStarted (const DG::EditDragSourceEvent& ev, UShort* /*effect*/)
{
	if (ev.GetSource () == &controlledView->editControl) {
		DG::DragSourceEventProperty*	dsep = ev.GetDragData ();
		dsep->SetData ('GDCE', &sourceDocument, sizeof (TextDocument*), DG::DragDrop::Module);
	}
}

Attaching custom data to the actual drag and drop operation.