A drag and drop target for Player data objects. The class wxPlayerDropTarget is in actuality a Proxy design pattern class that takes a pointer to any IPlayerDropTarget-derived class and passes the drop target messages along. This allows for wxPlayerDropTarget to have absolutely no knowledge of any particular UI object, but instead just forwards messages to the real drop target.
wxDropTarget (see http://www.wxwindows.org/manuals/2.4.2/wx126.htm)
PlayerDataTarget.h
A drag and drop target for Player data objects. | |
The wxPlayerDropTarget constructor. | |
Handles a drop event. | |
Determines whether the dropped data should be accepted. | |
Handles a drag event over the drop target. | |
The target IPlayerDropTarget. |
|
The wxPlayerDropTarget constructor. Stores the given IPlayerDropTarget pointer for later use.
| pTarget | The IPlayerDropTarget-derived class that actually receives the drop messags. Must not be NULL. |
|
Handles a drop event. Retrieves the data from the internal wxPlayerDataObject and passes it along with the coordinates to the target IPlayerDropTarget.
| x | The x coordinate of the drop position. |
| y | The y coordinate of the drop position. |
| def | The suggested (by wxWidgets) return value. |
The suggested return value given in def.
|
Determines whether the dropped data should be accepted. Always called immediately before OnData, and always returns true to accept the data.
| x | The x coordinate of the drop position. |
| y | The y coordinate of the drop position. |
A bool indicating if the drop is accepted. Always returns true.
|
Handles a drag event over the drop target. Calls the similarly named function on the target IPlayerDropTarget so it can handle the drag over event.
| x | The x coordinate of the drag position. |
| y | The y coordinate of the drag position. |
| def | The suggested (by wxWidgets) return value. |
The suggested return value given in def.
The target IPlayerDropTarget. |
| IPlayerDropTarget *mpTarget |
The target IPlayerDropTarget. All important drag and drop messages are funneled to it.
|
|
|
|
| IPlayerDropTarget *mpTarget |