Graphisoft®

Dialog ManagerVersion: 2.0

ListBoxDropTargetObserver::ListBoxDragMoved

Event handler for the drag moved notification.

virtual void ListBoxDragMoved (
    const ListBoxDropTargetEvent & ev,
    DragDrop::Effect *  effect,
    DragDrop::Feedback * denyFeedback
);

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.
denyFeedback
Use this parameter to control the amount of target feedback. Can take the following values: DragDrop::AcceptSelAndIns, DragDrop::RejectSelection, DragDrop::RejectInsertion, DragDrop::RejectSelAndIns.

Description

This virtual member tracks the movement over a drop target in a drag and drop operation. It is possible to control the allowed effects over the drag target or draw custom feedback.

Example

// Method Example:
void	DragTab2Observer::ListBoxDragMoved (const DG::ListBoxDropTargetEvent& ev, DG::DragDrop::Effect* /*effect*/,
											DG::DragDrop::Feedback* denyFeedback)
{
	short actListItem = ev.GetInsertPosition ();
	if (actListItem > 0) {
		long size = tabPage->listBox.GetTabItemTextLength (actListItem, 1);
		char* text = BMAllocatePtr (size, ALLOCATE_CLEAR, 0);
		if (DBERROR (text == NULL))
			return;
		tabPage->listBox.GetTabItemText (actListItem, 1, text, size);
		if (CHCompareASCII (text, ARCHICAD_TEXT) == 0)
			*denyFeedback = DG::DragDrop::RejectSelAndIns;
		BMKillPtr (&text);
	}
}

Drag moved event handler for list box controls.