FocusEvent class new in Git master
#include <Magnum/Ui/Event.h>
Focus or blur event.
Constructors, destructors, conversion operators
- FocusEvent(Nanoseconds time) explicit
- Constructor.
Public functions
- auto time() const -> Nanoseconds
- Time at which the event happened.
- auto isNodePressed() const -> bool
- Whether the event is called on a node that's currently pressed.
- auto isNodeHovered() const -> bool
- Whether the event is called on a node that's currently hovered.
- auto isAccepted() const -> bool
- Whether the event is accepted.
- void setAccepted(bool accepted = true)
- Set the event as accepted.
Function documentation
Magnum:: Ui:: FocusEvent:: FocusEvent(Nanoseconds time) explicit
Constructor.
| Parameters | |
|---|---|
| time | Time at which the event happened |
The time may get used for UI animations. A default-constructed value causes an animation play time to be in the past, thus immediately transitioning to a stopped state. The node-related properties are set from AbstractUserInterface event handler internals.
bool Magnum:: Ui:: FocusEvent:: isNodePressed() const
Whether the event is called on a node that's currently pressed.
Returns true if AbstractUserInterface::false otherwise.
bool Magnum:: Ui:: FocusEvent:: isNodeHovered() const
Whether the event is called on a node that's currently hovered.
Returns true if AbstractUserInterface::false otherwise.
void Magnum:: Ui:: FocusEvent:: setAccepted(bool accepted = true)
Set the event as accepted.
The node receiving the event is treated as focused only if the event is accepted.