All classes that would ever require drag and drop functionality (esentially all widgets) derive from this (eventually). Handles both the sending and receiving of all DnD events.
Public Member Functions | |
PG_WidgetDnD (PG_Widget *parent, int dndID, const PG_Rect &r) | |
PG_WidgetDnD (PG_Widget *parent, int dndID, const PG_Rect &r, bool bCreateSurface) | |
~PG_WidgetDnD () | |
bool | GetDrop () |
bool | GetDrag () |
void | RemoveObjectDnD (PG_WidgetDnD *obj) |
void | SetDrop (bool drop) |
void | SetDrag (bool drag) |
void | updateDragArea (PG_Point pt, SDL_Surface *image) |
void | drawDragArea (PG_Point pt, SDL_Surface *image) |
Protected Member Functions | |
PG_WidgetDnD * | FindDropTarget (PG_Point pt) |
bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
bool | eventMouseMotion (const SDL_MouseMotionEvent *motion) |
Overridable Eventhandler for a SDL_MouseMotionEvent message. | |
bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
virtual bool | AcceptDrop (PG_WidgetDnD *source, int dndID) |
virtual bool | eventDragStart () |
virtual bool | eventDragDrop (PG_WidgetDnD *source, int dndID) |
virtual bool | eventDragCancel () |
virtual SDL_Surface * | eventQueryDragImage () |
virtual SDL_Surface * | eventQueryDropImage (SDL_Surface *dragimage=NULL) |
Protected Attributes | |
PG_WidgetDnD * | dnd_next |
Static Protected Attributes | |
PG_WidgetDnD * | dnd_objectlist |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
Overridable Eventhandler for a SDL_MouseMotionEvent message. This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|