class new in Git master
#include <Magnum/Ui/Event.h>
TextInputEvent Text input event.
Constructors, destructors, conversion operators
-
TextInputEvent(Nanoseconds time,
Containers::
StringView text) explicit - Constructor.
Public functions
- auto time() const -> Nanoseconds
- Time at which the event happened.
-
auto text() const -> Containers::
StringView - Input text.
- auto isAccepted() const -> bool
- Whether the event is accepted.
- void setAccepted(bool accepted = true)
- Set the event as accepted.
Function documentation
Magnum:: Ui:: TextInputEvent:: TextInputEvent(Nanoseconds time,
Containers:: StringView text) explicit
Constructor.
Parameters | |
---|---|
time | Time at which the event happened |
text | Text produced by the event |
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. Expects that text
is valid for the whole lifetime of the text input event.
bool Magnum:: Ui:: TextInputEvent:: isAccepted() const
Whether the event is accepted.
Implicitly false
.
void Magnum:: Ui:: TextInputEvent:: setAccepted(bool accepted = true)
Set the event as accepted.
Once an event is accepted, it doesn't propagate further.