|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <dragdrop.hpp>
Public Types | |
| using | RenderCallback = std::function<void(Graphics&, DragPoint const & screenPos)> |
Public Member Functions | |
| DragPayload (std::shared_ptr< void > data=nullptr) | |
| template<typename T> | |
| T * | get () const |
| RenderCallback | getGhostRenderer () const |
| template<typename T> | |
| std::shared_ptr< T > | getShared () const |
| std::string const & | getTooltip () const |
| bool | hasData () const |
| void | setData (std::shared_ptr< void > data) |
| void | setGhostRenderer (RenderCallback cb) |
| void | setTooltip (std::string tip) |
Container for arbitrary data carried during a drag operation.
Users can attach arbitrary shared data and optionally provide a ghost renderer and tooltip for visual feedback during drag.
Definition at line 82 of file dragdrop.hpp.
| using fcn::DragPayload::RenderCallback = std::function<void(Graphics&, DragPoint const & screenPos)> |
Callback used to render a ghost image at a screen position.
Definition at line 88 of file dragdrop.hpp.
|
explicit |
Construct a payload.
Definition at line 24 of file dragdrop.cpp.
|
inline |
Get raw pointer to stored data.
Definition at line 108 of file dragdrop.hpp.
Referenced by fcn::DragHandler::getPayload().
|
inline |
Get the ghost renderer callback.
Definition at line 138 of file dragdrop.hpp.
|
inline |
Get shared pointer to stored data.
Definition at line 99 of file dragdrop.hpp.
|
inline |
Get the tooltip text.
Definition at line 153 of file dragdrop.hpp.
|
inline |
True if payload stores data.
Definition at line 123 of file dragdrop.hpp.
|
inline |
Set the stored data.
Definition at line 116 of file dragdrop.hpp.
|
inline |
Set the ghost renderer callback.
Definition at line 131 of file dragdrop.hpp.
|
inline |
Set tooltip text for the payload.
Definition at line 146 of file dragdrop.hpp.