SDLWidgetDnD(3)

NAME
SDLWidgetDnD - Drag and drop handler.

SYNOPSIS

#include <sdlwidgetdnd.h>

Inherits SDLWidget.

Inherited by SDLGradientWidget.

  Public Methods
SDLWidgetDnD (SDLWidget* parent, int dndID, SDL_Rect& r)
~SDLWidgetDnD ()
bool GetDrop ()
bool GetDrag ()
void RemoveObjectDnD (SDLWidgetDnD* obj)
void SetDrop (bool drop)
void SetDrag (bool drag)
void updateDragArea (SDL_Point pt, SDL_Surface* image)
void drawDragArea (SDL_Point pt, SDL_Surface* image)

  Protected Methods
SDLWidgetDnD* FindDropTarget (SDL_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 (SDLWidgetDnD* source, int dndID)
virtual bool eventDragStart ()
virtual bool eventDragDrop (SDLWidgetDnD* source, int dndID)
virtual bool eventDragCancel ()
virtual SDL_Surface* eventQueryDragImage ()
virtual SDL_Surface* eventQueryDropImage (SDL_Surface* dragimage = NULL)

  Protected Attributes
SDLWidgetDnD* dnd_next

  Static Protected Attributes
SDLWidgetDnD* dnd_objectlist

DETAILED DESCRIPTION

Drag and drop handler.

Author(s):
 Alexander Pipelka

 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.

Definition at line 52 of file sdlwidgetdnd.h.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  SDLWidgetDnD::SDLWidgetDnD (SDLWidget * parent, int dndID, SDL_Rect & r)

  SDLWidgetDnD::~SDLWidgetDnD ()

MEMBER FUNCTION DOCUMENTATION

  bool SDLWidgetDnD::AcceptDrop (SDLWidgetDnD * source, int dndID) [protected, virtual]

  SDLWidgetDnD * SDLWidgetDnD::FindDropTarget (SDL_Point pt) [protected]

  bool SDLWidgetDnD::GetDrag ()

  bool SDLWidgetDnD::GetDrop ()

  void SDLWidgetDnD::RemoveObjectDnD (SDLWidgetDnD * obj)

  void SDLWidgetDnD::SetDrag (bool drag)

  void SDLWidgetDnD::SetDrop (bool drop)

  void SDLWidgetDnD::drawDragArea (SDL_Point pt, SDL_Surface * image)

  bool SDLWidgetDnD::eventDragCancel () [protected, virtual]

  bool SDLWidgetDnD::eventDragDrop (SDLWidgetDnD * source, int dndID) [protected, virtual]

  bool SDLWidgetDnD::eventDragStart () [protected, virtual]

  bool SDLWidgetDnD::eventMouseButtonDown (const SDL_MouseButtonEvent * button) [protected, virtual]

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.

Parameters:

button SDL_MouseButtonEvent message

Returns:
 Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLMessageObject.

Reimplemented in SDLLineEdit, SDLListBox, SDLScrollBar, and SDLWindow.

  bool SDLWidgetDnD::eventMouseButtonUp (const SDL_MouseButtonEvent * button) [protected, virtual]

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.

Parameters:

button SDL_MouseButtonEvent message

Returns:
 Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLMessageObject.

Reimplemented in SDLCheckButton, SDLListBox, SDLRadioButton, SDLScrollBar, SDLSlider, and SDLWindow.

  bool SDLWidgetDnD::eventMouseMotion (const SDL_MouseMotionEvent * motion) [protected, virtual]

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.

Parameters:

motion SDL_MouseMotionEvent message

Returns:
 Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from SDLMessageObject.

Reimplemented in SDLListBox, SDLScrollBar, and SDLWindow.

  SDL_Surface * SDLWidgetDnD::eventQueryDragImage () [protected, virtual]

  SDL_Surface * SDLWidgetDnD::eventQueryDropImage (SDL_Surface * dragimage = NULL) [protected, virtual]

  void SDLWidgetDnD::updateDragArea (SDL_Point pt, SDL_Surface * image)

MEMBER DATA DOCUMENTATION

  SDLWidgetDnD * SDLWidgetDnD::dnd_next [protected]

Definition at line 111 of file sdlwidgetdnd.h.

  SDLWidgetDnD * SDLWidgetDnD::dnd_objectlist [static, protected]

Definition at line 112 of file sdlwidgetdnd.h.

AUTHOR

Generated automatically by Doxygen for ParaGUI from the source code.