Wt  4.11.1
Public Types | Public Member Functions | List of all members
Wt::WDropEvent Class Reference

A class providing details for a drop event. More...

#include <Wt/WEvent.h>

Public Types

enum class  OriginalEventType { Mouse , Touch }
 The type of the original event. More...
 

Public Member Functions

 WDropEvent (WObject *source, const std::string &mimeType, const WMouseEvent &mouseEvent)
 Constructor.
 
 WDropEvent (WObject *source, const std::string &mimeType, const WTouchEvent &touchEvent)
 Constructor.
 
WObjectsource () const
 Returns the source of the drag&drop operation. More...
 
const std::string & mimeType () const
 Returns the mime type of this drop event.
 
const WMouseEventmouseEvent () const
 Returns the original mouse event. More...
 
const WTouchEventtouchEvent () const
 Returns the original touch event. More...
 
OriginalEventType originalEventType () const
 Returns the type of the original event.
 

Detailed Description

A class providing details for a drop event.

See also
WWidget::dropEvent(WDropEvent)

Member Enumeration Documentation

◆ OriginalEventType

The type of the original event.

Enumerator
Mouse 

The original event was a WMouseEvent.

Touch 

The original event was a WTouchEvent.

Member Function Documentation

◆ mouseEvent()

const WMouseEvent* Wt::WDropEvent::mouseEvent ( ) const

Returns the original mouse event.

If eventType() == OriginalEventType::Mouse, this returns the original mouse event, otherwise this returns null.

◆ source()

WObject* Wt::WDropEvent::source ( ) const

Returns the source of the drag&drop operation.

The source is the widget that was set draggable using WInteractWidget::setDraggable().

◆ touchEvent()

const WTouchEvent* Wt::WDropEvent::touchEvent ( ) const

Returns the original touch event.

If eventType() == OriginalEventType::Touch, this returns the original touch event, otherwise this returns null.