|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <dragevent.hpp>
Public Types | |
| enum class | Type : std::uint8_t { Enter , Leave , Hover , Drop , Cancel } |
Public Member Functions | |
| DragEvent (Widget *source, DragPayload const *payload, Type type, int x, int y, int screenX, int screenY) | |
| DragPayload const * | getPayload () const |
| int | getScreenX () const |
| int | getScreenY () const |
| Type | getType () const |
| int | getX () const |
| int | getY () const |
| Public Member Functions inherited from fcn::Event | |
| Event (Widget *source) | |
| Widget * | getSource () const |
Protected Attributes | |
| DragPayload const * | mPayload |
| int | mScreenX |
| int | mScreenY |
| Type | mType |
| int | mX |
| int | mY |
| Protected Attributes inherited from fcn::Event | |
| Widget * | mSource {nullptr} |
Friends | |
| class | DragHandler |
Drag and drop event type container.
Represents drag related events such as entering a widget, hovering, dropping or cancellation.
Definition at line 22 of file dragevent.hpp.
|
strong |
Event for drag and drop actions.
Definition at line 28 of file dragevent.hpp.
| fcn::DragEvent::DragEvent | ( | Widget * | source, |
| DragPayload const * | payload, | ||
| Type | type, | ||
| int | x, | ||
| int | y, | ||
| int | screenX, | ||
| int | screenY ) |
Construct a drag event.
Definition at line 15 of file dragevent.cpp.
References fcn::Event::Event(), mPayload, mScreenX, mScreenY, mType, mX, and mY.
| DragPayload const * fcn::DragEvent::getPayload | ( | ) | const |
| int fcn::DragEvent::getScreenX | ( | ) | const |
Get the X coordinate on the screen.
Definition at line 41 of file dragevent.cpp.
References mScreenX.
| int fcn::DragEvent::getScreenY | ( | ) | const |
Get the Y coordinate on the screen.
Definition at line 45 of file dragevent.cpp.
References mScreenY.
| DragEvent::Type fcn::DragEvent::getType | ( | ) | const |
| int fcn::DragEvent::getX | ( | ) | const |
Get the X coordinate relative to the widget.
Definition at line 33 of file dragevent.cpp.
References mX.
| int fcn::DragEvent::getY | ( | ) | const |
Get the Y coordinate relative to the widget.
Definition at line 37 of file dragevent.cpp.
References mY.
|
friend |
Definition at line 103 of file dragevent.hpp.
|
protected |
The associated payload for this event.
Definition at line 81 of file dragevent.hpp.
Referenced by DragEvent(), and getPayload().
|
protected |
X coordinate on the screen.
Definition at line 96 of file dragevent.hpp.
Referenced by DragEvent(), and getScreenX().
|
protected |
Y coordinate on the screen.
Definition at line 101 of file dragevent.hpp.
Referenced by DragEvent(), and getScreenY().
|
protected |
The event type.
Definition at line 76 of file dragevent.hpp.
Referenced by DragEvent(), and getType().
|
protected |
X coordinate relative to the widget.
Definition at line 86 of file dragevent.hpp.
Referenced by DragEvent(), and getX().
|
protected |
Y coordinate relative to the widget.
Definition at line 91 of file dragevent.hpp.
Referenced by DragEvent(), and getY().