vdk 2.4.0
Public Member Functions | Public Attributes | List of all members
VDKDnD Class Reference

Provides dnd support. More...

#include <vdkdnd.h>

Inheritance diagram for VDKDnD:
Inheritance graph
[legend]
Collaboration diagram for VDKDnD:
Collaboration graph
[legend]

Public Member Functions

virtual ~VDKDnD ()
 
void AddTarget (VDKObject *target)
 
void AddSource (VDKObject *source)
 
void RemoveTarget (VDKObject *target)
 
void RemoveSource (VDKObject *source)
 
void SetIcon (VDKObject *object, VDKRawPixmap *pixmap)
 
VDKDnDTableDnDSources ()
 
VDKDnDTableDnDTargets ()
 
- Public Member Functions inherited from VDKRawObject
bool Destroy ()
 

Public Attributes

VDKReadOnlyValueProp< VDKDnD, VDKObject * > DragSource
 
VDKReadOnlyValueProp< VDKDnD, VDKPointDragPoint
 

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::~VDKDnD ( )
virtual

Destructor

Member Function Documentation

◆ AddSource()

void VDKDnD::AddSource ( VDKObject source)

Add a widget as dnd source.

◆ AddTarget()

void VDKDnD::AddTarget ( VDKObject target)

Add a widget as dnd target.

◆ DnDSources()

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.

◆ DnDTargets()

VDKDnDTable* VDKDnD::DnDTargets ( )
inline

Return sources dnd target tables.

◆ RemoveSource()

void VDKDnD::RemoveSource ( VDKObject source)

Remove a target from source list

◆ RemoveTarget()

void VDKDnD::RemoveTarget ( VDKObject target)

Remove a target from target list

◆ SetIcon()

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

Sets widget dragging icon

Member Data Documentation

◆ DragPoint

VDKReadOnlyValueProp<VDKDnD,VDKPoint> VDKDnD::DragPoint

Receiving a dnd_drag_motion signal, DragPoint contains mouse coordinates.

◆ DragSource

VDKReadOnlyValueProp<VDKDnD,VDKObject*> VDKDnD::DragSource

The widget that actually is being dragged


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