#include <Magnum/Ui/Widget.h>
template<class UserInterface>
BasicWidget class new in Git master
Templated abstract base for stateful widgets.
Restricts AbstractWidget to a concrete user interface instance. See the base class documentation for more information.
Base classes
- class AbstractWidget new in Git master
- Abstract base for stateful widgets.
Derived classes
- class Button new in Git master
- Button widget.
- class Input new in Git master
- Input widget.
- class Label new in Git master
- Label widget.
Constructors, destructors, conversion operators
- BasicWidget(UserInterface& ui, NodeHandle node) explicit
- Constructor.
- BasicWidget(const BasicAnchor<UserInterface>& anchor) explicit
- Construct from a positioning anchor.
- BasicWidget(NoCreateT, UserInterface& ui) explicit
- Construct with no underlying node.
- BasicWidget(const BasicWidget<UserInterface>&) deleted
- Copying is not allowed.
- BasicWidget(BasicWidget<UserInterface>&& other) defaulted noexcept
- Move constructor.
Public functions
- auto operator=(const BasicWidget&) -> BasicWidget& deleted
- Copying is not allowed.
- auto operator=(BasicWidget&& other) -> BasicWidget& defaulted noexcept
- Move assignment.
- auto ui() const -> UserInterface&
- User interface instance this widget is part of.
Function documentation
template<class UserInterface _1>
Magnum:: Ui:: BasicWidget<_1>:: BasicWidget(UserInterface& ui,
NodeHandle node) explicit
Constructor.
Parameters | |
---|---|
ui | User interface instance |
node | Node to create the widget on |
The node
is expected to be valid in ui
.
template<class UserInterface _1>
Magnum:: Ui:: BasicWidget<_1>:: BasicWidget(const BasicAnchor<UserInterface>& anchor) explicit
Construct from a positioning anchor.
The ui() and node() is set to AbstractAnchor::
template<class UserInterface _1>
Magnum:: Ui:: BasicWidget<_1>:: BasicWidget(NoCreateT,
UserInterface& ui) 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.
template<class UserInterface _1>
Magnum:: Ui:: BasicWidget<_1>:: BasicWidget(BasicWidget<UserInterface>&& other) defaulted noexcept
Move constructor.
Performs a destructive move, i.e. the other
node() becomes NodeHandle::