Graphisoft®

Dialog ManagerVersion: 2.0

UserItemDragSourceObserver::UserItemDragStarted

Event handler for the drag started notification.

virtual void UserItemDragStarted (
    const UserItemDragSourceEvent & 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	DragTab3Observer::UserItemDragStarted (const DG::UserItemDragSourceEvent& ev, UShort* /*effect*/)
{
	DG::DragSourceEventProperty* dragSourceData = ev.GetDragData ();
	DG::Point pos = dragSourceData->GetSourcePosition ();
	DG::Rect metaRect (0, 0, 300, 300);
	dragSourceData->SetSourceFeedback (CreateUserItemFeedback (pos), &metaRect);
	dragSourceData->SetDelayedData ('TEXT', DG::DragDrop::Application);
}

Drag started event handling in user item controls.