VCF::DropTarget Class Reference
The
DropTarget class represents a way to control and be notified when a something is "dropped" ( or just "dragged over" ) as a result of a drag-drop operation.
More...
#include <DropTarget.h>
Inheritance diagram for VCF::DropTarget:
List of all members.
Detailed Description
The
DropTarget class represents a way to control and be notified when a something is "dropped" ( or just "dragged over" ) as a result of a drag-drop operation.
In this way, for example, the mouse cursor can be modified according to the control is over.
A drop target works by being registered with a control. This registration is accomplished by calling the addTargetControl() on the drop target and passing in a control instance. For example:
TextControl* textControl = ...
Panel* somePanel = ...
DropTarget dropTarget;
dropTarget.addTargetControl( textControl );
dropTarget.addTargetControl( somePanel );
- Event Delegates for this class:
-
Member Enumeration Documentation
|
|
- Enumerator:
-
| DRAGGING_OVER |
|
| DRAG_DROPPED |
|
| DRAG_LEFT |
|
| DRAG_ENTERED |
|
|
Constructor & Destructor Documentation
| VCF::DropTarget::DropTarget |
( |
Control * |
control |
) |
|
|
| VCF::DropTarget::DropTarget |
( |
|
) |
|
|
| VCF::DropTarget::DropTarget |
( |
Component * |
owner |
) |
|
|
| VCF::DropTarget::DropTarget |
( |
const String & |
name |
) |
|
|
| virtual VCF::DropTarget::~DropTarget |
( |
|
) |
[virtual] |
|
Member Function Documentation
| void VCF::DropTarget::addTargetControl |
( |
Control * |
control |
) |
|
|
|
|
Adds a new target control to the drop target's collection and registers it.
|
| Control* VCF::DropTarget::getTarget |
( |
|
) |
|
|
|
|
gets the first control in the target collection.
Typically a DropTarget will just have a single control that it's associated with (though it may certainly have more than one). |
|
|
Returns all the control targets for this drop target.
|
| virtual void VCF::DropTarget::handleEvent |
( |
Event * |
event |
) |
[virtual] |
|
|
|
generic handler method for events.
All UI events are sent here and then dispatched accordingly to a more specific event handler. If an Application class is present, then it is given a chance to "see" the event first before delegating it to the Component.
All events are dispatched by their type so it is important to correctly identify the event objects type if you would like it to be dispatched correctly. The method will call the appropriate component method, like afterCreate(), beforeDestroy(), etc. - Parameters:
-
Reimplemented from VCF::Component. |
| void VCF::DropTarget::removeTargetControl |
( |
Control * |
control |
) |
|
|
Member Data Documentation
|
|
- Event Delegate:
- DropTargetDraggingOver is fired by the underlying windowing system when a dataobject is being dragged over a registered drop target.
event class: DropTargetEvent
event type: DropTarget::DRAGGING_OVER
|
|
|
- Event Delegate:
- DropTargetDropped this is fired by the windowing system when something is "dropped" on a control registered with the drop target
event class: DropTargetEvent
event type:
|
|
|
- Event Delegate:
- DropTargetEntered this is fired by the underlying windowing system when something that is being dragged first enters the control registered with this drop target.
event class: DropTargetEvent
event type: DropTarget::DRAG_ENTERED
|
|
|
- Event Delegate:
- DropTargetLeft is fired by the underlying windowing system when the "something" being dragged has left the control registered with this drop target.
event class: DropTargetEvent
event type: DropTarget::DRAG_LEFT
|
The documentation for this class was generated from the following file: