Magnum::Ui::FocusEvent class new in Git master

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 isPressed() const -> bool
Whether the event is called on a node that's currently pressed.
auto isHovering() 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 pressed and hover properties are set from AbstractUserInterface event handler internals.

bool Magnum::Ui::FocusEvent::isPressed() const

Whether the event is called on a node that's currently pressed.

Returns true if AbstractUserInterface::currentPressedNode() is the same as the node the event is called on, false otherwise.

bool Magnum::Ui::FocusEvent::isHovering() const

Whether the event is called on a node that's currently hovered.

Returns true if AbstractUserInterface::currentHoveredNode() is the same as the node the event is called on, false otherwise.

bool Magnum::Ui::FocusEvent::isAccepted() const

Whether the event is accepted.

Implicitly false.

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.