igor::iDrag Class Reference

#include <iDrag.h>

Public Member Functions

 iDrag (iWidgetPtr source=nullptr)
 
void setMimeData (const iMimeData &mimeData)
 
const iMimeDatagetMimeData () const
 
iWidgetID getSource () const
 
void setTexture (iTexturePtr texture)
 
iTexturePtr getTexture () const
 
void accept ()
 
void reject ()
 
void clear ()
 
iDragState getDragState () const
 
void execute ()
 

Detailed Description

drag data for drag & drop

Constructor & Destructor Documentation

◆ iDrag()

igor::iDrag::iDrag ( iWidgetPtr  source = nullptr)

store source id

Parameters
sourcesource widget

Member Function Documentation

◆ accept()

void igor::iDrag::accept ( )

accept the drag as valid

◆ clear()

void igor::iDrag::clear ( )

reset the drag state to neutral

◆ execute()

void igor::iDrag::execute ( )

execute the drag

◆ getDragState()

iDragState igor::iDrag::getDragState ( ) const
Returns
drag state

◆ getMimeData()

const iMimeData & igor::iDrag::getMimeData ( ) const
Returns
the mime data

◆ getSource()

iWidgetID igor::iDrag::getSource ( ) const
Returns
id of source widget (only if the source was an igor widget)

◆ getTexture()

iTexturePtr igor::iDrag::getTexture ( ) const
Returns
the texture set on the drag

◆ reject()

void igor::iDrag::reject ( )

reject the drag as invalid

◆ setMimeData()

void igor::iDrag::setMimeData ( const iMimeData mimeData)

sets mime data

Parameters
mimeDatathe mime data to set

◆ setTexture()

void igor::iDrag::setTexture ( iTexturePtr  texture)

sets texture displayed along the cursor during drag

Parameters
texturethe texture to display

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