template<class UserInterface>
Magnum::Ui::BasicAnchor class new in Git master

Templated base for widget positioning anchors.

Restricts AbstractAnchor to a concrete user interface instance. 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, LayoutHandle layout) explicit
Constructor.
BasicAnchor(UserInterface& ui, NodeHandle parent, const Vector2& offset, const Vector2& size, NodeFlags flags = {})
Create a custom-positioned anchor.
BasicAnchor(UserInterface& ui, NodeHandle parent, const Vector2& size, NodeFlags flags = {})
Create a custom-sized anchor.
BasicAnchor(UserInterface& ui, const Vector2& offset, const Vector2& size, NodeFlags flags = {})
Create a custom-positioned top-level anchor.
BasicAnchor(UserInterface& ui, const Vector2& size, NodeFlags flags = {})
Create a custom-sized top-level anchor.
BasicAnchor(UserInterface& ui, const AbstractAnchor& anchor) explicit
Construct from an abstract anchor and a concrete user interface reference.

Public functions

auto ui() const -> UserInterface&
User interface instance.

Function documentation

template<class UserInterface _1>
Magnum::Ui::BasicAnchor<_1>::BasicAnchor(UserInterface& ui, NodeHandle node, LayoutHandle layout) explicit

Constructor.

Parameters
ui User interface instance
node Node handle
layout Layout associated with given node or LayoutHandle::Null

The node is expected to be valid in ui. If layout is not LayoutHandle::Null, it's expected to be valid in ui and associated with node.

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::createNode() with parent, offset, size and flags, and remembers the created NodeHandle. The layout() is LayoutHandle::Null.

template<class UserInterface _1>
Magnum::Ui::BasicAnchor<_1>::BasicAnchor(UserInterface& ui, NodeHandle parent, const Vector2& size, NodeFlags flags = {})

Create a custom-sized anchor.

Calls AbstractUserInterface::createNode() with parent, zero offset, size and flags, and remembers the created NodeHandle. The layout() is LayoutHandle::Null.

template<class UserInterface _1>
Magnum::Ui::BasicAnchor<_1>::BasicAnchor(UserInterface& ui, const Vector2& offset, const Vector2& size, NodeFlags flags = {})

Create a custom-positioned top-level anchor.

Equivalent to calling BasicAnchor(UserInterface&, NodeHandle, const Vector2&, const Vector2&, NodeFlags) with NodeHandle::Null as the parent.

template<class UserInterface _1>
Magnum::Ui::BasicAnchor<_1>::BasicAnchor(UserInterface& ui, const Vector2& size, NodeFlags flags = {})

Create a custom-sized top-level anchor.

Equivalent to calling BasicAnchor(UserInterface&, NodeHandle, const Vector2&, NodeFlags) with NodeHandle::Null as the parent.

template<class UserInterface _1>
Magnum::Ui::BasicAnchor<_1>::BasicAnchor(UserInterface& ui, const AbstractAnchor& anchor) explicit

Construct from an abstract anchor and a concrete user interface reference.

Expects that AbstractAnchor::ui() matches ui.