#include <Magnum/Ui/Anchor.h>
template<class UserInterface>
BasicAnchor class new in Git master
Widget positioning anchor.
Restricts AbstractAnchor to a concrete user interface instance. Meant to be used through concrete a typedef such as Anchor. See the base class documentation for more information.
Base classes
- class AbstractAnchor new in Git master
- Base for widget positioning anchors.
Constructors, destructors, conversion operators
- BasicAnchor(UserInterface& ui, NodeHandle node)
- Constructor.
- BasicAnchor(const BasicWidget<UserInterface>& widget)
- Construct from a widget instance.
- BasicAnchor(UserInterface& ui, NodeHandle parent, const Vector2& offset, const Vector2& size, NodeFlags flags = {})
- Create a custom-positioned anchor.
- BasicAnchor(BasicAnchor<UserInterface> parent, const Vector2& offset, const Vector2& size, NodeFlags flags = {})
- BasicAnchor(UserInterface& ui, const Vector2& offset, const Vector2& size, NodeFlags flags = {})
- Create a custom-positioned root anchor.
Public functions
- auto ui() const -> UserInterface&
- User interface instance.
Function documentation
template<class UserInterface _1>
Magnum:: Ui:: BasicAnchor<_1>:: BasicAnchor(UserInterface& ui,
NodeHandle node)
Constructor.
| Parameters | |
|---|---|
| ui | User interface instance |
| node | Node handle |
The node is expected to be valid in ui.
template<class UserInterface _1>
Magnum:: Ui:: BasicAnchor<_1>:: BasicAnchor(const BasicWidget<UserInterface>& widget)
Construct from a widget instance.
Unlike AbstractAnchor(AbstractUserInterface&, NodeHandle) doesn't perform any checks and just assumes the widget has a live AbstractUserInterface reference and a valid NodeHandle.
template<class UserInterface _1>
Magnum:: Ui:: BasicAnchor<_1>:: BasicAnchor(UserInterface& ui,
NodeHandle parent,
const Vector2& offset,
const Vector2& size,
NodeFlags flags = {})
Create a custom-positioned anchor.
Calls AbstractUserInterface::parent, offset, size and flags, and remembers the created NodeHandle. See its documentation for detailed description of all constraints.
template<class UserInterface _1>
Magnum:: Ui:: BasicAnchor<_1>:: BasicAnchor(BasicAnchor<UserInterface> parent,
const Vector2& offset,
const Vector2& size,
NodeFlags flags = {})
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<class UserInterface _1>
Magnum:: Ui:: BasicAnchor<_1>:: BasicAnchor(UserInterface& ui,
const Vector2& offset,
const Vector2& size,
NodeFlags flags = {})
Create a custom-positioned root anchor.
Equivalent to calling BasicAnchor(UserInterface&, NodeHandle, const Vector2&, const Vector2&, NodeFlags) with NodeHandle::