Graphisoft®

Dialog ManagerVersion: 2.0

RichEditDropTargetObserver::RichEditDragEntered

Event handler for the drag entered notification.

virtual void RichEditDragEntered (
    const RichEditDropTargetEvent & ev,
    DragDrop::Effect *  effect,
    bool *              defBehaviour
);

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.
defBehaviour
true by default. If true, the default target drag and drop behaviour implemented by the Dialog Manager is used. This includes event management and feedback.

Description

Use this event to decide whether to accept or reject the current drag and drop operation. If your application requires this is the place to initialize a drop target user feedback.

Example

// Method Example:
void	TextControl::RichEditDragEntered (const DG::RichEditDropTargetEvent& ev, DG::DragDrop::Effect* effect, bool* defBehaviour)
{
	if (ev.GetSource () == &controlledView->editControl && (ev.HasDataFormat ('TEXT') || ev.HasDataFormat ('FILE'))) {
		*effect = DG::DragDrop::Accept;
		if (ev.HasDataFormat ('TDDE'))
			*defBehaviour = false;
	}
}

Drag entered event handler in rich edit controls.