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

Input widget.

Base classes

template<class UserInterface>
class BasicWidget<UserInterface> new in Git master
Templated abstract base for stateful widgets.

Derived classes

class PasswordInput new in Git master
Password input widget.

Constructors, destructors, conversion operators

Input(Anchor anchor, Containers::StringView text, const TextProperties& textProperties, InputStyle style = InputStyle::Default) explicit
Constructor.
Input(Anchor anchor, Containers::StringView text, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Int>& query, InputStyle style = InputStyle::Default) explicit
Construct an input with an integer data binding.
Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Long>& query, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Construct an input with an integer data binding and a custom decimal formatter and parser.
Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Construct an input with an integer data binding and a custom hexadecimal formatter and parser.
Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<Float>& query, InputStyle style = InputStyle::Default) explicit
Construct an input with a float data binding.
Input(Anchor anchor, const StorageQuery<Double>& query, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Float&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Construct an input with a float data binding and a custom formatter and parser.
Input(Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Double&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, InputStyle style) explicit
Input(Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, InputStyle style = InputStyle::Default) explicit
Construct a non-owned input with an integer data binding.
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Construct a non-owned input with an integer data binding and a custom decimal formatter and parser.
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Construct a non-owned input with an integer data binding and a custom hexadecimal formatter and parser.
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Float>& query, InputStyle style = InputStyle::Default) explicit
Construct a non-owned input with a float data binding.
Input(NonOwnedT, Anchor anchor, const StorageQuery<Double>& query, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Float&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Construct a non-owned input with a float data binding and a custom formatter and parser.
Input(NonOwnedT, Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Double&) parser = nullptr, InputStyle style = InputStyle::Default) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, InputStyle style) explicit
Input(NonOwnedT, Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, InputStyle style) explicit
Input(NoCreateT) explicit
Construct with no underlying node.

Public functions

auto hasDataBinding() const -> bool
Whether the input has a data binding.
auto style() const -> InputStyle
Style.
auto setStyle(InputStyle style) -> Input&
Set style.
auto setStyle(InputStyle style, Nanoseconds time) -> Input&
Set style at given time.
auto text() const -> Containers::StringView
Text.
auto setText(Containers::StringView text, const TextProperties& textProperties = {}) -> Input&
Set text.
auto backgroundData() const -> DataHandle
Background data.
auto textData() const -> DataHandle
Text data or DataHandle::Null.
auto dataBindingData() const -> DataHandle
Data binding data or DataHandle::Null.

Function documentation

Magnum::Ui::Input::Input(Anchor anchor, Containers::StringView text, const TextProperties& textProperties, InputStyle style = InputStyle::Default) explicit

Constructor.

Parameters
anchor Positioning anchor
text Pre-filled input text
textProperties Text shaping and layouting properties
style Input style

Magnum::Ui::Input::Input(Anchor anchor, Containers::StringView text, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Int>& query, InputStyle style = InputStyle::Default) explicit

Construct an input with an integer data binding.

Parameters
anchor Positioning anchor
query DataLayer storage query
style Input style

Formats the value with a default-constructed DecimalFormatter and uses a DecimalFormatter::parse() overload matching the type for parsing the value. Expects that StorageQuery::operations() list at least StorageOperation::Set.

Use the Input(Anchor, const StorageQuery<Int>&, const DecimalFormatter&, ParseState(*)(Containers::StringView, Int&), InputStyle) or Input(Anchor, const StorageQuery<Int>&, const HexadecimalFormatter&, ParseState(*)(Containers::StringView, Int&), InputStyle) constructors and their overloads to explicitly supply a configured DecimalFormatter or HexadecimalFormatter instance and a matching parser.

Note that it's currently not possible to supply custom TextProperties when using a data binding.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Long>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

Construct an input with an integer data binding and a custom decimal formatter and parser.

Parameters
anchor Positioning anchor
query DataLayer storage query
formatter Formatter instance
parser Parser function
style Input style

Expects that StorageQuery::operations() list at least StorageOperation::Set. Passing a nullptr parser is equivalent to using a DecimalFormatter::parse() overload matching the query type.

Use the Input(Anchor, const StorageQuery<Int>&, const HexadecimalFormatter&, InputStyle) constructor and its overloads to format and parse the value as hexadecimal instead. Passing a default-constructed DecimalFormatter instance and nullptr parser is equivalent to using the Input(Anchor, const StorageQuery<Int>&, InputStyle) constructor.

Note that it's currently not possible to supply custom TextProperties when using a data binding.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

Construct an input with an integer data binding and a custom hexadecimal formatter and parser.

Parameters
anchor Positioning anchor
query DataLayer storage query
formatter Formatter instance
parser Parser function
style Input style

Expects that StorageQuery::operations() list at least StorageOperation::Set. Passing a nullptr parser is equivalent to using a HexadecimalFormatter::parse() overload matching the query type.

Use the Input(Anchor, const StorageQuery<Int>&, const DecimalFormatter&, ParseState(*)(Containers::StringView, Int&), InputStyle) constructor and its overloads to format and parse the value as decimal instead, or Input(Anchor, const StorageQuery<Int>&, InputStyle) to use a default-constructed DecimalFormatter instance and a DecimalFormatter::parse() overload matching the type for parsing the value.

Note that it's currently not possible to supply custom TextProperties when using a data binding.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Float>& query, InputStyle style = InputStyle::Default) explicit

Construct an input with a float data binding.

Parameters
anchor Positioning anchor
query DataLayer storage query
style Input style

Formats the value with a default-constructed FloatFormatter and uses a FloatFormatter::parse() overload matching the type for parsing the value. Expects that StorageQuery::operations() list at least StorageOperation::Set.

Use the Input(Anchor, const StorageQuery<Float>&, ParseState(*)(Containers::StringView, Float&), const FloatFormatter&, InputStyle) constructor and its overloads to explicitly supply a configured FloatFormatter instance and a matching parser.

Note that it's currently not possible to supply custom TextProperties when using a data binding.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Double>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Float&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

Construct an input with a float data binding and a custom formatter and parser.

Parameters
anchor Positioning anchor
query DataLayer storage query
formatter Formatter instance
parser Parser function
style Input style

Expects that StorageQuery::operations() list at least StorageOperation::Set. Passing a nullptr parser is equivalent to using a FloatFormatter::parse() overload matching the query type.

Passing a default-constructed FloatFormatter instance and nullptr parser is equivalent to using the Input(Anchor, const StorageQuery<Float>&, InputStyle) constructor overloads.

Note that it's currently not possible to supply custom TextProperties when using a data binding.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Double&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, InputStyle style = InputStyle::Default) explicit

Construct a non-owned input with an integer data binding.

Like Input(Anchor, const StorageQuery<Int>&, InputStyle) but the widget node doesn't get removed on destruction. Instead, it gets removed either once any parent node is removed, or when AbstractUserInterface::removeNode() is explicitly called on node().

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

Construct a non-owned input with an integer data binding and a custom decimal formatter and parser.

Like Input(Anchor, const StorageQuery<Int>&, const DecimalFormatter&, ParseState(*)(Containers::StringView, Int&), InputStyle) but the widget node doesn't get removed on destruction. Instead, it gets removed either once any parent node is removed, or when AbstractUserInterface::removeNode() is explicitly called on node().

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const DecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Int&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

Construct a non-owned input with an integer data binding and a custom hexadecimal formatter and parser.

Like Input(Anchor, const StorageQuery<Int>&, const HexadecimalFormatter&, ParseState(*)(Containers::StringView, Int&), InputStyle) but the widget node doesn't get removed on destruction. Instead, it gets removed either once any parent node is removed, or when AbstractUserInterface::removeNode() is explicitly called on node().

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedInt&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, Long&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, ParseState(*)(Containers::StringView, UnsignedLong&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Int>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedInt>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Long>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<UnsignedLong>& query, const HexadecimalFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Float>& query, InputStyle style = InputStyle::Default) explicit

Construct a non-owned input with a float data binding.

Like Input(Anchor, const StorageQuery<Float>&, InputStyle) but the widget node doesn't get removed on destruction. Instead, it gets removed either once any parent node is removed, or when AbstractUserInterface::removeNode() is explicitly called on node().

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Double>& query, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Float&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

Construct a non-owned input with a float data binding and a custom formatter and parser.

Like Input(Anchor, const StorageQuery<Float>&, const FloatFormatter&, ParseState(*)(Containers::StringView, Float&), InputStyle) but the widget node doesn't get removed on destruction. Instead, it gets removed either once any parent node is removed, or when AbstractUserInterface::removeNode() is explicitly called on node().

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, ParseState(*)(Containers::StringView, Double&) parser = nullptr, InputStyle style = InputStyle::Default) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Float>& query, const FloatFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NonOwnedT, Anchor anchor, const StorageQuery<Double>& query, const FloatFormatter& formatter, InputStyle style) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Magnum::Ui::Input::Input(NoCreateT) explicit

Construct with no underlying node.

The instance is equivalent to a moved-out state, i.e. not usable for anything. Move another instance over it to make it useful.

bool Magnum::Ui::Input::hasDataBinding() const

Whether the input has a data binding.

Returns true if the input was constructed using a StorageQuery, false otherwise.

Input& Magnum::Ui::Input::setStyle(InputStyle style)

Set style.

Returns Reference to self (for method chaining)

Expects that the input doesn't have a data binding, as in that case the input style changes are driven from outside. Note that calling this function doesn't change the font if the new style uses a different one, you have to call setText() afterwards to make it pick it up.

Input& Magnum::Ui::Input::setStyle(InputStyle style, Nanoseconds time)

Set style at given time.

Returns Reference to self (for method chaining)

Compared to setStyle(InputStyle) may animate the style transition if the theme defines an animation for it. The style() getter is however updated immediately always. Additionally, if the function is called while the Input is focused, ensures that a blinking cursor animation is playing for the new style as well.

Containers::StringView Magnum::Ui::Input::text() const

Text.

The returned view is valid only until any text is created or updated on the user interface text layer.

Input& Magnum::Ui::Input::setText(Containers::StringView text, const TextProperties& textProperties = {})

Set text.

Returns Reference to self (for method chaining)

Expects that the input doesn't have a data binding, as in that case the input updates are driven from outside.

DataHandle Magnum::Ui::Input::backgroundData() const

Background data.

Exposed mainly for testing purposes, not meant to be modified directly.

DataHandle Magnum::Ui::Input::textData() const

Text data or DataHandle::Null.

Exposed mainly for testing purposes, not meant to be modified directly.

DataHandle Magnum::Ui::Input::dataBindingData() const

Data binding data or DataHandle::Null.

Exposed mainly for testing purposes, not meant to be modified directly.