VDKDnD Class Reference

Provides dnd support. More...

#include <vdkdnd.h>

Inheritance diagram for VDKDnD:

VDKRawObject

List of all members.

Public Member Functions

Public Attributes


Detailed Description

Provides dnd support.

Description
This class provides support for gtk+ drag an drop VDKDnD can be viewed from two sides:
  • Source side: the widget that is dragged. Source widget are normally non-containers widgets.
  • Target side: the widget that accept (is the target) of a dragged widget. Target widgets are normally containers widget even if not compulsory
Widgets can be both sources and targets, so VDKDnD class supports m:n relationship between widgets interested in dnd. VDKDnD class provides support for both sides.
SIGNALS
Both signals for static and dynamic tables are provided.
  • dnd_dropped_signal
  • "dnd_dropped"
Received by target when a dragged widget is dropped into target
  • dnd_get_data_signal
  • "dnd_get_data"
Received when source data are transferred to dnd widget (not very useful for a normal user)
  • dnd_drag_motion_signal
  • "dnd_drag_motion"
Received by target when a dragged widget icon mouves over the target widget
  • dnd_drag_leave_signal
  • "dnd_drag_leave"
Received by target when a dragged widget icon leaves the target widget
TIP
Signals using dynamic tables are handled by vdk overriding gtk+, thus user must connect with dynamic tables setting <gtk> arg always false.
  SignalConnect(target,"dnd_dropped",&DndForm::OnDrop,false);
EXAMPLES
In ./testvdk/dnd.cc

Constructor & Destructor Documentation

VDKDnD::~VDKDnD (  )  [virtual]

Destructor


Member Function Documentation

void VDKDnD::AddTarget ( VDKObject target  ) 

Add a widget as dnd target.

void VDKDnD::AddSource ( VDKObject source  ) 

Add a widget as dnd source.

void VDKDnD::RemoveTarget ( VDKObject target  ) 

Remove a target from target list

void VDKDnD::RemoveSource ( VDKObject source  ) 

Remove a target from source list

void VDKDnD::SetIcon ( VDKObject object,
VDKRawPixmap pixmap 
)

Sets widget dragging icon

VDKDnDTable* VDKDnD::DnDSources (  )  [inline]

Return sources dnd tables.

Tip
VDKDnDTable class is a VDKList of VDKDnDEntry class objects. Each VDKDnDEntry object has a method Object() that returns source/target widget address. VDKDnDIterator class for accessing table is provided as well.

VDKDnDTable* VDKDnD::DnDTargets (  )  [inline]

Return sources dnd target tables.


Member Data Documentation

VDKReadOnlyValueProp<VDKDnD,VDKObject*> VDKDnD::DragSource

The widget that actually is being dragged

VDKReadOnlyValueProp<VDKDnD,VDKPoint> VDKDnD::DragPoint

Receiving a dnd_drag_motion signal, DragPoint contains mouse coordinates.


The documentation for this class was generated from the following files:

Generated on Tue May 6 03:40:10 2008 for vdk 2.4.0 by  doxygen 1.5.5