Magnum::Ui namespace

UI library.

Efficient, styleable and extensible user interfaces.

This library is built if MAGNUM_WITH_UI is enabled when building Magnum Extras. To use this library with CMake, put FindMagnumExtras.cmake into your modules/ directory, request the Ui component of the MagnumExtras package and link to the MagnumExtras::Ui target:

find_package(MagnumExtras REQUIRED)

# ...
target_link_libraries(your-app PRIVATE MagnumExtras::Ui)

Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-extras repository and do the following before calling find_package():

set(MAGNUM_WITH_UI ON CACHE BOOL "" FORCE)
add_subdirectory(magnum-extras EXCLUDE_FROM_ALL)

Additional apps are built separately. See the magnum-ui-gallery app documentation, Downloading and building extras and Extras library usage with CMake for more information.

Classes

class AbstractAnchor new in Git master
Base for widget positioning anchors.
class AbstractAnimator new in Git master
Base for animators.
class AbstractDataAnimator new in Git master
Base for data animators.
class AbstractGenericAnimator new in Git master
Base for generic animators.
class AbstractLayer new in Git master
Base for data layers.
class AbstractLayouter new in Git master
Base for layouters.
class AbstractNodeAnimator new in Git master
Base for node animators.
class AbstractRenderer new in Git master
Base for renderer implementations.
class AbstractSnapLayout new in Git master
Base for SnapLayouter layout creation helpers.
class AbstractStyle new in Git master
Base for UserInterface styles.
class AbstractStyleAnimator new in Git master
Base for style animators.
class AbstractUserInterface new in Git master
Base for the main user interface.
class AbstractVisualLayer new in Git master
Base for visual data layers.
class AbstractVisualLayerStyleAnimator new in Git master
Base for AbstractVisualLayer style animators.
class AbstractWidget new in Git master
Abstract base for stateful widgets.
class BaseLayer new in Git master
Base layer.
struct BaseLayerCommonStyleUniform new in Git master
Properties common to all BaseLayer style uniforms.
class BaseLayerGL new in Git master
OpenGL implementation of the base layer.
class BaseLayerStyleAnimator new in Git master
Base layer style animator.
struct BaseLayerStyleUniform new in Git master
BaseLayer style uniform
template<class UserInterface>
class BasicAnchor new in Git master
Templated base for widget positioning anchors.
template<class UserInterface>
class BasicSnapLayout new in Git master
Templated base for SnapLayouter layout creation helpers.
template<class UserInterface>
class BasicWidget new in Git master
Templated abstract base for stateful widgets.
class Button new in Git master
Button widget.
class EventConnection new in Git master
Connection in the EventLayer.
class EventLayer new in Git master
Event handling layer.
class FocusEvent new in Git master
Focus or blur event.
class Input new in Git master
Input widget.
class KeyEvent new in Git master
Key press or release event.
class Label new in Git master
Label widget.
class McssDarkStyle new in Git master
Style for builtin widgets based on the m.css dark theme.
class PointerEvent new in Git master
Pointer press or release event.
class PointerMoveEvent new in Git master
Pointer move event.
class RendererGL new in Git master
OpenGL renderer implementation.
class SnapLayouter new in Git master
Snap layouter.
class TextFeatureValue new in Git master
OpenType feature value.
class TextInputEvent new in Git master
Text input event.
class TextLayer new in Git master
Text layer.
struct TextLayerCommonEditingStyleUniform new in Git master
Properties common to all TextLayer editing style uniforms.
struct TextLayerCommonStyleUniform new in Git master
Properties common to all TextLayer style uniforms.
struct TextLayerEditingStyleUniform new in Git master
TextLayer editing style uniform
class TextLayerGL new in Git master
OpenGL implementation of the text layer.
class TextLayerStyleAnimator new in Git master
Text layer style animator.
struct TextLayerStyleUniform new in Git master
TextLayer style uniform
class TextProperties new in Git master
Text properties.
class UserInterface new in Git master
Main user interface.
class UserInterfaceGL new in Git master
OpenGL implementation of the main user interface.
class VisibilityLostEvent new in Git master
Visibility lost event.

Enums

enum class AnimatorFeature: UnsignedByte { NodeAttachment = 1 << 0, DataAttachment = 1 << 1 } new in Git master
Features supported by an animator.
enum class AnimatorState: UnsignedByte { NeedsAdvance = 1 << 0 } new in Git master
Animator state.
enum class AnimationFlag: UnsignedByte { KeepOncePlayed = 1 << 0 } new in Git master
Animation flag.
enum class AnimationState: UnsignedByte { Scheduled, Playing, Paused, Stopped } new in Git master
Animation state.
enum class NodeAnimation: UnsignedByte { OffsetSize = 1 << 0, Enabled = 1 << 1, Clip = 1 << 2, Removal = 1 << 3 } new in Git master
Node properties that are being animated.
enum class LayerFeature: UnsignedByte { Draw = 1 << 0, DrawUsesBlending = Draw|(1 << 1), DrawUsesScissor = Draw|(1 << 2), Composite = (1 << 3)|Draw, Event = 1 << 4, AnimateData = 1 << 5, AnimateStyles = 1 << 6 } new in Git master
Features supported by a layer.
enum class LayerState: UnsignedShort { NeedsNodeEnabledUpdate = 1 << 0, NeedsNodeOrderUpdate = NeedsNodeEnabledUpdate|(1 << 1), NeedsNodeOffsetSizeUpdate = NeedsNodeOrderUpdate|(1 << 2), NeedsAttachmentUpdate = NeedsNodeOrderUpdate|(1 << 3), NeedsDataUpdate = 1 << 4, NeedsCommonDataUpdate = 1 << 5, NeedsSharedDataUpdate = 1 << 6, NeedsCompositeOffsetSizeUpdate = 1 << 7, NeedsDataClean = 1 << 8 } new in Git master
Layer state.
enum class LayouterState: UnsignedByte { NeedsUpdate = 1 << 0, NeedsAssignmentUpdate = NeedsUpdate|(1 << 1) } new in Git master
Layouter state.
enum class RendererFeature { Composite = 1 << 0 } new in Git master
Renderer feature.
enum class RendererTargetState { Initial, Draw, Composite, Final } new in Git master
Renderer target state.
enum class RendererDrawState { Blending = 1 << 0, Scissor = 1 << 1 } new in Git master
Renderer draw state.
enum class StyleFeature: UnsignedByte { BaseLayer = 1 << 0, TextLayer = 1 << 1, TextLayerImages = 1 << 2, EventLayer = 1 << 3, SnapLayouter = 1 << 4 } new in Git master
Feature supplied by a style.
enum class UserInterfaceState: UnsignedShort { NeedsDataUpdate = 1 << 0, NeedsDataAttachmentUpdate = NeedsDataUpdate|(1 << 1), NeedsNodeEnabledUpdate = NeedsDataAttachmentUpdate|(1 << 2), NeedsNodeClipUpdate = NeedsNodeEnabledUpdate|(1 << 3), NeedsLayoutUpdate = NeedsNodeClipUpdate|(1 << 4), NeedsLayoutAssignmentUpdate = NeedsLayoutUpdate|(1 << 5), NeedsNodeUpdate = NeedsLayoutAssignmentUpdate|(1 << 6), NeedsDataClean = 1 << 7, NeedsNodeClean = NeedsNodeUpdate|NeedsDataClean|(1 << 8), NeedsAnimationAdvance = 1 << 9 } new in Git master
User interface state.
enum class BaseLayerSharedFlag: UnsignedByte { Textured = 1 << 0, BackgroundBlur = 1 << 1, NoRoundedCorners = 1 << 2, NoOutline = 1 << 3, TextureMask = Textured|(1 << 4), SubdividedQuads = 1 << 5 } new in Git master
Base layer shared state flag.
enum class BaseLayerStyleAnimation: UnsignedByte { Uniform = 1 << 0, Padding = 1 << 1, Style = 1 << 2 } new in Git master
Base layer style properties that are being animated.
enum class ButtonStyle: UnsignedByte { Default, Primary, Success, Warning, Danger, Info, Dim, Flat } new in Git master
Button style.
enum class PointerEventSource: UnsignedByte { Mouse = 1, Touch, Pen } new in Git master
Pointer event source.
enum class Pointer: UnsignedByte { MouseLeft = 1 << 0, MouseMiddle = 1 << 1, MouseRight = 1 << 2, Finger = 1 << 3, Pen = 1 << 4, Eraser = 1 << 5 } new in Git master
Pointer type.
enum class Key: UnsignedShort { Backspace = '\x08', Tab = '\t', Enter = '\n', Esc = '\x1b', Space = ' ', Percent = '%', Quote = '\'', Plus = '+', Comma = ',', Minus = '-', Period = '.', Slash = '/', Zero = '0', One = '1', Two = '2', Three = '3', Four = '4', Five = '5', Six = '6', Seven = '7', Eight = '8', Nine = '9', Semicolon = ';', Equal = '=', LeftBracket = '[', Backslash = '\\', RightBracket = ']', Backquote = '`', A = 'a', B = 'b', C = 'c', D = 'd', E = 'e', F = 'f', G = 'g', H = 'h', I = 'i', J = 'j', K = 'k', L = 'l', M = 'm', N = 'n', O = 'o', P = 'p', Q = 'q', R = 'r', S = 's', T = 't', U = 'u', V = 'v', W = 'w', X = 'x', Y = 'y', Z = 'z', Delete = '\x7f', LeftShift = 256, RightShift, LeftCtrl, RightCtrl, LeftAlt, RightAlt, LeftSuper, RightSuper, Up, Down, Left, Right, Home, End, PageUp, PageDown, Insert, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, CapsLock, ScrollLock, NumLock, PrintScreen, Pause, Menu, NumZero, NumOne, NumTwo, NumThree, NumFour, NumFive, NumSix, NumSeven, NumEight, NumNine, NumDecimal, NumDivide, NumMultiply, NumSubtract, NumAdd, NumEnter, NumEqual } new in Git master
Keyboard key.
enum class Modifier: UnsignedByte { Shift = 1 << 0, Ctrl = 1 << 1, Alt = 1 << 2, Super = 1 << 3 } new in Git master
Keyboard modifier.
enum class LayerHandle: UnsignedShort { Null = 0 } new in Git master
Layer handle.
enum class LayerDataHandle: UnsignedInt { Null = 0 } new in Git master
Layer data handle.
enum class DataHandle: UnsignedLong { Null = 0 } new in Git master
Layer data handle.
enum class NodeHandle: UnsignedInt { Null = 0 } new in Git master
Node handle.
enum class LayouterHandle: UnsignedShort { Null = 0 } new in Git master
Layouter handle.
enum class LayouterDataHandle: UnsignedInt { Null = 0 } new in Git master
Layouter data handle.
enum class LayoutHandle: UnsignedLong { Null = 0 } new in Git master
Layout handle.
enum class AnimatorHandle: UnsignedShort { Null = 0 } new in Git master
Animator handle.
enum class AnimatorDataHandle: UnsignedInt { Null = 0 } new in Git master
Animator data handle.
enum class AnimationHandle: UnsignedLong { Null = 0 } new in Git master
Animation handle.
enum class InputStyle: UnsignedByte { Default, Success, Warning, Danger, Flat } new in Git master
Input style.
enum class LabelStyle: UnsignedByte { Default, Primary, Success, Warning, Danger, Info, Dim } new in Git master
Label style.
enum class NodeFlag: UnsignedByte { Hidden = 1 << 0, Clip = 1 << 1, NoEvents = 1 << 2, Disabled = NoEvents|(1 << 3), Focusable = 1 << 4 } new in Git master
Node behavior flag.
enum class Snap: UnsignedByte { Left = 1 << 0, Top = 1 << 1, Right = 1 << 2, Bottom = 1 << 3, TopLeft = Top|Left new in Git master, BottomLeft = Bottom|Left new in Git master, TopRight = Top|Right new in Git master, BottomRight = Bottom|Right new in Git master, FillX = Left|Right new in Git master, FillY = Top|Bottom new in Git master, Fill = FillX|FillY new in Git master, InsideX = 1 << 4, InsideY = 1 << 5, Inside = InsideX|InsideY new in Git master, NoPadX = 1 << 6 new in Git master, NoPadY = 1 << 7 new in Git master, NoPad = NoPadX | NoPadY new in Git master }
Layout snap.
enum class Icon: UnsignedInt { None = 0, Yes, No } new in Git master
Icon.
enum class FontHandle: UnsignedShort { Null = 0 } new in Git master
Font handle.
enum class TextDataFlag: UnsignedByte { Editable = 1 << 0 } new in Git master
Text layer data flag.
enum class TextEdit: UnsignedByte { MoveCursorLeft, ExtendSelectionLeft, MoveCursorRight, ExtendSelectionRight, MoveCursorLineBegin, ExtendSelectionLineBegin, MoveCursorLineEnd, ExtendSelectionLineEnd, RemoveBeforeCursor, RemoveAfterCursor, InsertBeforeCursor, InsertAfterCursor }
Text edit operation.
enum class TextLayerStyleAnimation: UnsignedByte { Uniform = 1 << 0, Padding = 1 << 1, EditingUniform = 1 << 2, EditingPadding = 1 << 3, Style = 1 << 4 } new in Git master
Text layer style properties that are being animated.

Typedefs

using AnimatorFeatures = Containers::EnumSet<AnimatorFeature> new in Git master
Set of features supported by an animator.
using AnimatorStates = Containers::EnumSet<AnimatorState> new in Git master
Animator states.
using AnimationFlags = Containers::EnumSet<AnimationFlag> new in Git master
Animation flags.
using NodeAnimations = Containers::EnumSet<NodeAnimation> new in Git master
Set of node properties that are being animated.
using LayerFeatures = Containers::EnumSet<LayerFeature> new in Git master
Set of features supported by a layer.
using LayerStates = Containers::EnumSet<LayerState> new in Git master
Layer states.
using LayouterStates = Containers::EnumSet<LayouterState> new in Git master
Layouter states.
using RendererFeatures = Containers::EnumSet<RendererFeature> new in Git master
Renderer features.
using RendererDrawStates = Containers::EnumSet<RendererDrawState> new in Git master
Renderer draw states.
using StyleFeatures = Containers::EnumSet<StyleFeature> new in Git master
Features supplied by a style.
using UserInterfaceStates = Containers::EnumSet<UserInterfaceState> new in Git master
User interface states.
using Anchor = BasicAnchor<UserInterface> new in Git master
Widget positioning anchor for use with UserInterface.
using BaseLayerSharedFlags = Containers::EnumSet<BaseLayerSharedFlag> new in Git master
Base layer shared state flag.
using BaseLayerStyleAnimations = Containers::EnumSet<BaseLayerStyleAnimation> new in Git master
Set of base layer style properties that are being animated.
using Pointers = Containers::EnumSet<Pointer> new in Git master
Pointer types.
using Modifiers = Containers::EnumSet<Modifier> new in Git master
Set of keyboard modifiers.
using NodeFlags = Containers::EnumSet<NodeFlag> new in Git master
Node behavior flags.
using Snaps = Containers::EnumSet<Snap>
Layout snaps.
using SnapLayout = BasicSnapLayout<UserInterface> new in Git master
SnapLayouter layout creation helper for use with UserInterface
using TextDataFlags = Containers::EnumSet<TextDataFlag> new in Git master
Text layer data flags.
using TextLayerStyleAnimations = Containers::EnumSet<TextLayerStyleAnimation> new in Git master
Set of text layer style properties that are being animated.
using Widget = BasicWidget<UserInterface> new in Git master
Base for stateful widgets for use with UserInterface.

Functions

auto operator<<(Debug& debug, AnimatorFeature value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, AnimatorFeatures value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, AnimatorState value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, AnimatorStates value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, AnimationFlag value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, AnimationFlags value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, AnimationState value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, NodeAnimation value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, NodeAnimations value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LayerFeature value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LayerFeatures value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LayerState value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LayerStates value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LayouterState value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LayouterStates value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, RendererFeature value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, RendererFeatures value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, RendererTargetState value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, RendererDrawState value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, RendererDrawStates value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, StyleFeature value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, StyleFeatures value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, UserInterfaceState value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, UserInterfaceStates value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, BaseLayerSharedFlag value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, BaseLayerSharedFlags value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, BaseLayerStyleAnimation value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, BaseLayerStyleAnimations value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, ButtonStyle value) -> Debug& new in Git master
Debug output operator.
auto button(const Anchor& anchor, Icon icon, ButtonStyle style = ButtonStyle::Default) -> Anchor new in Git master
Stateless icon button widget.
auto button(const Anchor& anchor, Containers::StringView text, const TextProperties& textProperties, ButtonStyle style = ButtonStyle::Default) -> Anchor new in Git master
Stateless text button widget.
auto button(const Anchor& anchor, Containers::StringView text, ButtonStyle style = ButtonStyle::Default) -> Anchor
auto button(const Anchor& anchor, Icon icon, Containers::StringView text, const TextProperties& textProperties, ButtonStyle style = ButtonStyle::Default) -> Anchor new in Git master
Stateless icon + text button widget.
auto button(const Anchor& anchor, Icon icon, Containers::StringView text, ButtonStyle style = ButtonStyle::Default) -> Anchor
auto operator<<(Debug& debug, PointerEventSource value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, Pointer value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, Pointers value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, Key value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, Modifier value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, Modifiers value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LayerHandle value) -> Debug& new in Git master
Debug output operator.
auto layerHandle(UnsignedInt id, UnsignedInt generation) -> LayerHandle constexpr new in Git master
Compose a layer handle from an ID and a generation.
auto layerHandleId(LayerHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a layer handle.
auto layerHandleGeneration(LayerHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a layer handle.
auto operator<<(Debug& debug, LayerDataHandle value) -> Debug& new in Git master
Debug output operator.
auto layerDataHandle(UnsignedInt id, UnsignedInt generation) -> LayerDataHandle constexpr new in Git master
Compose a layer data handle from an ID and a generation.
auto layerDataHandleId(LayerDataHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a layer data handle.
auto layerDataHandleGeneration(LayerDataHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a layer data handle.
auto operator<<(Debug& debug, DataHandle value) -> Debug& new in Git master
Debug output operator.
auto dataHandle(LayerHandle layerHandle, UnsignedInt id, UnsignedInt generation) -> DataHandle constexpr new in Git master
Compose a data handle from a layer handle, a data ID and a data generation.
auto dataHandle(LayerHandle layerHandle, LayerDataHandle layerDataHandle) -> DataHandle constexpr new in Git master
Compose a data handle from a layer handle and a layer data handle.
auto dataHandleLayer(DataHandle handle) -> LayerHandle constexpr new in Git master
Extract layer handle from a data handle.
auto dataHandleData(DataHandle handle) -> LayerDataHandle constexpr new in Git master
Extract layer data handle from a data handle.
auto dataHandleLayerId(DataHandle handle) -> UnsignedInt constexpr new in Git master
Extract layer ID from a data handle.
auto dataHandleLayerGeneration(DataHandle handle) -> UnsignedInt constexpr new in Git master
Extract layer generation from a data handle.
auto dataHandleId(DataHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a data handle.
auto dataHandleGeneration(DataHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a data handle.
auto operator<<(Debug& debug, NodeHandle value) -> Debug& new in Git master
Debug output operator.
auto nodeHandle(UnsignedInt id, UnsignedInt generation) -> NodeHandle constexpr new in Git master
Compose a node handle from an ID and a generation.
auto nodeHandleId(NodeHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a node handle.
auto nodeHandleGeneration(NodeHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a node handle.
auto operator<<(Debug& debug, LayouterHandle value) -> Debug& new in Git master
Debug output operator.
auto layouterHandle(UnsignedInt id, UnsignedInt generation) -> LayouterHandle constexpr new in Git master
Compose a layouter handle from an ID and a generation.
auto layouterHandleId(LayouterHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a layouter handle.
auto layouterHandleGeneration(LayouterHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a layouter handle.
auto operator<<(Debug& debug, LayouterDataHandle value) -> Debug& new in Git master
Debug output operator.
auto layouterDataHandle(UnsignedInt id, UnsignedInt generation) -> LayouterDataHandle constexpr new in Git master
Compose a layouter data handle from an ID and a generation.
auto layouterDataHandleId(LayouterDataHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a layouter data handle.
auto layouterDataHandleGeneration(LayouterDataHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a layouter data handle.
auto operator<<(Debug& debug, LayoutHandle value) -> Debug& new in Git master
Debug output operator.
auto layoutHandle(LayouterHandle layouterHandle, UnsignedInt id, UnsignedInt generation) -> LayoutHandle constexpr new in Git master
Compose a layout handle from a layouter handle, a layouter data ID and a layouter data generation.
auto layoutHandle(LayouterHandle layouterHandle, LayouterDataHandle layouterDataHandle) -> LayoutHandle constexpr new in Git master
Compose a layout handle from a layouter handle and a layouter data handle.
auto layoutHandleLayouter(LayoutHandle handle) -> LayouterHandle constexpr new in Git master
Extract layouter handle from a layout handle.
auto layoutHandleData(LayoutHandle handle) -> LayouterDataHandle constexpr new in Git master
Extract layouter data handle from a layout handle.
auto layoutHandleLayouterId(LayoutHandle handle) -> UnsignedInt constexpr new in Git master
Extract layouter ID from a layout handle.
auto layoutHandleLayouterGeneration(LayoutHandle handle) -> UnsignedInt constexpr new in Git master
Extract layouter generation from a layout handle.
auto layoutHandleId(LayoutHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a layout handle.
auto layoutHandleGeneration(LayoutHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a layout handle.
auto operator<<(Debug& debug, AnimatorHandle value) -> Debug& new in Git master
Debug output operator.
auto animatorHandle(UnsignedInt id, UnsignedInt generation) -> AnimatorHandle constexpr new in Git master
Compose an animator handle from an ID and a generation.
auto animatorHandleId(AnimatorHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from an animator handle.
auto animatorHandleGeneration(AnimatorHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from an animator handle.
auto operator<<(Debug& debug, AnimatorDataHandle value) -> Debug& new in Git master
Debug output operator.
auto animatorDataHandle(UnsignedInt id, UnsignedInt generation) -> AnimatorDataHandle constexpr new in Git master
Compose an animator data handle from an ID and a generation.
auto animatorDataHandleId(AnimatorDataHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from an animator data handle.
auto animatorDataHandleGeneration(AnimatorDataHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from an animator data handle.
auto operator<<(Debug& debug, AnimationHandle value) -> Debug& new in Git master
Debug output operator.
auto animationHandle(AnimatorHandle animatorHandle, UnsignedInt id, UnsignedInt generation) -> AnimationHandle constexpr new in Git master
Compose an animation handle from an animator handle, an animator data ID and an animator data generation.
auto animationHandle(AnimatorHandle animatorHandle, AnimatorDataHandle animatorDataHandle) -> AnimationHandle constexpr new in Git master
Compose a animation handle from an animator handle and an animator data handle.
auto animationHandleAnimator(AnimationHandle handle) -> AnimatorHandle constexpr new in Git master
Extract animator handle from an animation handle.
auto animationHandleData(AnimationHandle handle) -> AnimatorDataHandle constexpr new in Git master
Extract animator data handle from an animation handle.
auto animationHandleAnimatorId(AnimationHandle handle) -> UnsignedInt constexpr new in Git master
Extract animator ID from an animation handle.
auto animationHandleAnimatorGeneration(AnimationHandle handle) -> UnsignedInt constexpr new in Git master
Extract animator generation from an animation handle.
auto animationHandleId(AnimationHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from an animation handle.
auto animationHandleGeneration(AnimationHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from an animation handle.
auto operator<<(Debug& debug, InputStyle value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, LabelStyle value) -> Debug& new in Git master
Debug output operator.
auto label(const Anchor& anchor, Icon icon, LabelStyle style = LabelStyle::Default) -> Anchor new in Git master
Stateless icon label widget.
auto label(const Anchor& anchor, Containers::StringView text, const TextProperties& textProperties, LabelStyle style = LabelStyle::Default) -> Anchor new in Git master
Stateless text label widget.
auto label(const Anchor& anchor, Containers::StringView text, LabelStyle style = LabelStyle::Default) -> Anchor
auto operator<<(Debug& debug, NodeFlag value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, NodeFlags value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, RendererGL::Flag value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, RendererGL::Flags value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, Snap value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, Snaps value) -> Debug& new in Git master
Debug output operator.
auto snap(AbstractUserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, const Vector2& size, NodeFlags flags = {}) -> AbstractAnchor new in Git master
Create a node layouted with SnapLayouter.
auto snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, const Vector2& size, NodeFlags flags = {}) -> Anchor
auto snap(UserInterface& ui, Snaps snap, NodeHandle target, const Vector2& size, NodeFlags flags = {}) -> Anchor new in Git master
Create a node layouted with the default SnapLayouter.
auto snap(AbstractUserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) -> AbstractAnchor new in Git master
Create a node layouted with SnapLayouter with custom offset.
auto snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) -> Anchor
auto snap(UserInterface& ui, Snaps snap, NodeHandle target, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) -> Anchor new in Git master
Create a node layouted with the default SnapLayouter with custom offset.
auto snap(AbstractUserInterface& ui, SnapLayouter& layouter, Snaps snap, const Vector2& size, NodeFlags flags = {}) -> AbstractAnchor new in Git master
Create a root node layouted with SnapLayouter.
auto snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, const Vector2& size, NodeFlags flags = {}) -> Anchor
auto snap(UserInterface& ui, Snaps snap, const Vector2& size, NodeFlags flags = {}) -> Anchor new in Git master
Create a root node layouted with the default SnapLayouter.
auto snap(AbstractUserInterface& ui, SnapLayouter& layouter, Snaps snap, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) -> AbstractAnchor new in Git master
Create a root node layouted with SnapLayouter with custom offset.
auto snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) -> Anchor
auto snap(UserInterface& ui, Snaps snap, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) -> Anchor new in Git master
Create a root node layouted with the default SnapLayouter with custom offset.
auto operator<<(Debug& debug, Icon value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, FontHandle value) -> Debug& new in Git master
Debug output operator.
auto fontHandle(UnsignedInt id, UnsignedInt generation) -> FontHandle constexpr new in Git master
Compose a font handle from an ID and a generation.
auto fontHandleId(FontHandle handle) -> UnsignedInt constexpr new in Git master
Extract ID from a font handle.
auto fontHandleGeneration(FontHandle handle) -> UnsignedInt constexpr new in Git master
Extract generation from a font handle.
auto operator<<(Debug& debug, TextDataFlag value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, TextDataFlags value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, TextEdit value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, TextLayerStyleAnimation value) -> Debug& new in Git master
Debug output operator.
auto operator<<(Debug& debug, TextLayerStyleAnimations value) -> Debug& new in Git master
Debug output operator.

Enum documentation

enum class Magnum::Ui::AnimatorFeature: UnsignedByte new in Git master

Features supported by an animator.

Enumerators
NodeAttachment

The animations may be attached to nodes and are meant to be automatically removed when given node is removed. Mutually exclusive with AnimatorFeature::DataAttachment, is expected to be always advertised on AbstractNodeAnimator subclasses.

DataAttachment

The animations may be attached to layer data and are meant to be automatically removed when given data is removed. Mutually exclusive with AnimatorFeature::NodeAttachment.

enum class Magnum::Ui::AnimatorState: UnsignedByte new in Git master

Animator state.

Used to decide whether AbstractGenericAnimator::advance(), AbstractNodeAnimator::advance(), BaseLayerStyleAnimator::advance() or TextLayerStyleAnimator::advance() (called from AbstractUserInterface::advanceAnimations()) needs to be called. See UserInterfaceState for interface-wide state.

Enumerators
NeedsAdvance

AbstractAnimator::update(), then optionally a corresponding animator-specific advance function such as AbstractGenericAnimator::advance(), AbstractNodeAnimator::advance() or layer-specific AbstractLayer::advanceAnimations(), and then optionally AbstractAnimator::clean() (which are all called from AbstractUserInterface::advanceAnimations()) needs to be called to advance active animations. Set implicitly after AbstractAnimator::create(), play(), pause() and update() that results in at least one animation being AnimationState::Scheduled, AnimationState::Playing or AnimationState::Paused, is reset once update() results in no animation being in that state anymore.

enum class Magnum::Ui::AnimationState: UnsignedByte new in Git master

Animation state.

Enumerators
Scheduled

The animation is scheduled to be played. Returned if AbstractAnimator::stopped() is greater than AbstractAnimator::played() for given animation and the time the animation is played at is greater than current AbstractAnimator::time(). Can transition to AnimationState::Playing, AnimationState::Paused or AnimationState::Stopped after the next AbstractAnimator::update().

Playing

The animation is currently playing. Returned if AbstractAnimator::stopped() is greater than AbstractAnimator::played() for given animation and than current AbstractAnimator::time(), the time the animation is played at is less than or equal to current time, either AbstractAnimator::repeatCount() for given animation is 0 or played + duration*repeatCount > time, where duration is AbstractAnimator::duration() for given animation, and AbstractAnimator::paused() for given animation is greater than current time. Can transition to AnimationState::Paused or AnimationState::Stopped after the next AbstractAnimator::update().

Paused

The animation is currently paused. Returned if AbstractAnimator::stopped() is greater than AbstractAnimator::played() for given animation and than current AbstractAnimator::time(), the time the animation is played at is less than or equal to current time, either AbstractAnimator::repeatCount() for given animation is 0 or played + duration*repeatCount > time, where duration is AbstractAnimator::duration() for given animation, and AbstractAnimator::paused() for given animation is less than or equal to current time. Can transition to AnimationState::Playing or AnimationState::Stopped after the next AbstractAnimator::update().

Stopped

The animation is currently stopped. Returned if AbstractAnimator::stopped() is less than or equal to AbstractAnimator::played() for given animation, if the stopped time is less than or equial to current AbstractAnimator::time() or if AbstractAnimator::played() for given animation is less than or equal to current time, AbstractAnimator::repeatCount() for given animation is non-zero and played + duration*repeatCount <= time, where duration is AbstractAnimator::duration() for given animation.

Note that AbstractAnimator::update() automatically schedules stopped animations for removal in a subsequent AbstractAnimator::clean() call unless AnimationFlag::KeepOncePlayed is set.

enum class Magnum::Ui::NodeAnimation: UnsignedByte new in Git master

Node properties that are being animated.

Depending on which of these are returned from AbstractNodeAnimator::advance(), causes various UserInterfaceState flags to be set after an AbstractUserInterface::advanceAnimations() call.

Enumerators
OffsetSize

Node offset or size. Equivalently to calling AbstractUserInterface::setNodeOffset() / setNodeSize(), causes UserInterfaceState::NeedsLayoutUpdate to be set.

Enabled

NodeFlag::NoEvents or NodeFlag::Disabled being added or cleared. Equivalently to calling AbstractUserInterface::setNodeFlags() with these, causes UserInterfaceState::NeedsNodeEnabledUpdate to be set.

Clip

NodeFlag::Clip being added or cleared. Equivalently to calling AbstractUserInterface::setNodeFlags() with that flag, causes UserInterfaceState::NeedsNodeClipUpdate to be set.

Removal

Scheduling a node for removal. Equivalently to calling AbstractUserInterface::removeNode(), causes UserInterfaceState::NeedsNodeClean to be set.

enum class Magnum::Ui::LayerFeature: UnsignedByte new in Git master

Features supported by a layer.

Enumerators
Draw

Drawing using AbstractLayer::draw()

DrawUsesBlending

Drawing using AbstractLayer::draw() uses blending. Causes RendererDrawState::Blending to be passed to AbstractRenderer::transition() before drawing the layer. Implies LayerFeature::Draw.

DrawUsesScissor

Drawing using AbstractLayer::draw() uses blending. Causes RendererDrawState::Scissor to be passed to AbstractRenderer::transition() before drawing the layer. Implies LayerFeature::Draw.

Composite

Compositing contents drawn underneath this layer using AbstractLayer::composite(), such as for example background blur, and then uses the result of the composition for actual drawing. It's assumed that the composition operation copies contents of the framebuffer or processes them in some way so that a subsequent AbstractLayer::draw() can be performed to the same framebuffer without causing a cyclic dependency. Implies LayerFeature::Draw.

Event

Event handling using AbstractLayer::pointerPressEvent(), pointerReleaseEvent() and pointerMoveEvent().

AnimateData

Assigning data animators using AbstractLayer::assignAnimator(AbstractDataAnimator&) const and animating data using AbstractLayer::advanceAnimations(Nanoseconds, Containers::MutableBitArrayView, const Containers::StridedArrayView1D<Float>&, Containers::MutableBitArrayView, const Containers::Iterable<AbstractDataAnimator>&).

AnimateStyles

Assigning style animators using AbstractLayer::assignAnimator(AbstractStyleAnimator&) const and animating styles using AbstractLayer::advanceAnimations(Nanoseconds, Containers::MutableBitArrayView, const Containers::StridedArrayView1D<Float>&, Containers::MutableBitArrayView, const Containers::Iterable<AbstractStyleAnimator>&).

enum class Magnum::Ui::LayerState: UnsignedShort new in Git master

Layer state.

Used to decide whether AbstractLayer::cleanData() (called from AbstractUserInterface::clean()) or AbstractLayer::update() (called from AbstractUserInterface::update()) need to be called to refresh the internal state before the interface is drawn or an event is handled. See UserInterfaceState for interface-wide state.

Enumerators
NeedsNodeEnabledUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate and reupload node-disabled-related state after the set of enabled nodes changed. Transitively set after every AbstractLayer::create() with a non-null NodeHandle and after every AbstractLayer::attach() call that attaches data to a different non-null NodeHandle. Is reset next time AbstractLayer::update() is called with this flag present. Is reset next time AbstractLayer::update() is called with this flag present. Implied by LayerState::NeedsNodeEnabledUpdate.

Gets passed to AbstractLayer::update() when UserInterfaceState::NeedsNodeEnabledUpdate or anything that implies it is set on the user interface. Is never returned by AbstractLayer::state() alone.

NeedsNodeOrderUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate and reupload draw-order-related state such as index buffers after node order changed. Transitively set after every AbstractLayer::create() with a non-null NodeHandle and after every AbstractLayer::attach() call that attaches data to a different non-null NodeHandle. Is reset next time AbstractLayer::update() is called with with this flag present. Implies LayerState::NeedsNodeEnabledUpdate, as a change in the set of visible nodes may cause the set of enabled nodes to change. Implied by NeedsNodeOffsetSizeUpdate and NeedsAttachmentUpdate.

Gets passed to AbstractLayer::update() when UserInterfaceState::NeedsNodeClipUpdate, UserInterfaceState::NeedsDataAttachmentUpdate or anything that implies those is set on the user interface. Is only returned together with LayerState::NeedsAttachmentUpdate by AbstractLayer::state(), never alone.

NeedsNodeOffsetSizeUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate and reupload position-related state after offsets and sizes of nodes the data are attached to changed, including the case when data get attached to a different node without the node offsets or sizes itself changing. Set implicitly after every AbstractLayer::create() with a non-null NodeHandle and after every AbstractLayer::attach() call that attaches data to a different non-null NodeHandle. Is reset next time AbstractLayer::update() is called with this flag present. Implies LayerState::NeedsNodeOrderUpdate, as nodes changing their offsets or sizes may cause the set of visible nodes, and thus their order, to change; often gets set together with LayerState::NeedsAttachmentUpdate by AbstractLayer::attach() and AbstractLayer::create().

Besides being present in AbstractLayer::state() gets passed to AbstractLayer::update() when UserInterfaceState::NeedsLayoutUpdate or anything that implies it is set on the user interface.

NeedsAttachmentUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to refresh the data attached to visible node hierarchy after the node attachments were changed. Set implicitly after every AbstractLayer::attach() call, after AbstractLayer::create() with a non-null NodeHandle and after AbstractLayer::remove() for a data that's attached to a node, is reset next time AbstractLayer::update() is called with this flag present. Implies LayerState::NeedsNodeOrderUpdate, as node attachment change may cause the set of visible nodes, and thus their order, to change; often gets set together with LayerState::NeedsNodeOffsetSizeUpdate by AbstractLayer::attach() and AbstractLayer::create().

If set on a layer, causes UserInterfaceState::NeedsDataAttachmentUpdate to be set on the user interface. Gets passed to AbstractLayer::update() only if the layer itself has it set, independently of UserInterfaceState::NeedsDataAttachmentUpdate being present.

NeedsDataUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate and reupload data after they've been changed. Set implicitly after every AbstractLayer::create() independently of whether also attached to a NodeHandle or not and whether that node is currently visible. Can also be returned by AbstractLayer::doState() or be explicitly set by the layer implementation using AbstractLayer::setNeedsUpdate(). Is reset next time AbstractLayer::update() is called with this flag present.

If set on a layer, causes UserInterfaceState::NeedsDataUpdate to be set on the user interface. Gets passed to AbstractLayer::update() only if the layer itself has it set, independently of UserInterfaceState::NeedsDataUpdate being present.

NeedsCommonDataUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate or reupload common layer data such as dynamic style data after they've been changed. Can be returned by AbstractLayer::doState(), can also be explicitly set by the layer implementation using AbstractLayer::setNeedsUpdate(), is reset next time AbstractLayer::update() is called with this flag present.

If set on a layer, causes UserInterfaceState::NeedsDataUpdate to be set on the user interface. Gets passed to AbstractLayer::update() only if the layer itself has it set, independently of UserInterfaceState::NeedsDataUpdate being present.

NeedsSharedDataUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate or reupload shared layer data such as shared style data after they've been changed. Can be returned by AbstractLayer::doState(), can also be explicitly set by the layer implementation using AbstractLayer::setNeedsUpdate(). Is reset next time AbstractLayer::update() is called with this flag present.

If set on a layer, causes UserInterfaceState::NeedsDataUpdate to be set on the user interface. Gets passed to AbstractLayer::update() only if the layer itself has it set, independently of UserInterfaceState::NeedsDataUpdate being present.

NeedsCompositeOffsetSizeUpdate

AbstractLayer::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate and reupload compositing-related data after node sizes and offsets changed. Set on layers that advertise LayerFeature::Composite implicitly after every AbstractLayer::create() with a non-null NodeHandle and after every AbstractLayer::attach() call that attaches data to a different non-null NodeHandle. Can also be returned by AbstractLayer::doState() or be explicitly set by the layer implementation using AbstractLayer::setNeedsUpdate() if the layer advertises LayerFeature::Composite. Is reset next time AbstractLayer::update() is called with this flag present.

Besides being present in AbstractLayer::state() gets passed to AbstractLayer::update() when UserInterfaceState::NeedsLayoutUpdate or anything that implies it is set on the user interface and the layer advertises LayerFeature::Composite.

NeedsDataClean

AbstractLayer::cleanData() (which is called from AbstractUserInterface::clean()) needs to be called to prune animations attached to removed data. Set implicitly after every AbstractLayer::remove() call, is reset next time AbstractLayer::cleanData() is called with this flag present.

If set on a layer, causes UserInterfaceState::NeedsDataClean to be set on the user interface.

enum class Magnum::Ui::LayouterState: UnsignedByte new in Git master

Layouter state.

Used to decide whether AbstractLayouter::update() (called from AbstractUserInterface::update()) need to be called to relayout the nodes before the interface is drawn. See UserInterfaceState for interface-wide state.

Enumerators
NeedsUpdate

AbstractLayouter::update() (which is called from AbstractUserInterface::update()) needs to be called to recalculate the layout after a change. Has to be explicitly set by the layouter implementation using AbstractLayouter::setNeedsUpdate(), is reset next time AbstractLayouter::update() is called. Implied by LayouterState::NeedsAssignmentUpdate.

Note that there's also interface-wide UserInterfaceState::NeedsLayoutAssignmentUpdate, which is set when the node hierarchy or the node layout assignments changed. The two flags are set independently, but both of them imply AbstractLayouter::update() needs to be called.

NeedsAssignmentUpdate

AbstractLayouter::update() (which is called from AbstractUserInterface::update()) needs to be called to refresh the layouts assigned to visible node hierarchy after the assignments were changed. Set implicitly after every AbstractLayouter::add() and AbstractLayouter::remove() call, is reset next time AbstractLayouter::update() is called. Implies LayouterState::NeedsUpdate.

enum class Magnum::Ui::RendererFeature new in Git master

Renderer feature.

Enumerators
Composite

Ability to composite from the default framebuffer. If supported, the renderer is able to not only draw into the default framebuffer but also read from it, making it possible for AbstractLayer::doComposite() to access framebuffer contents in a renderer-implementation-specific way. If supported, it's possible to transition from and to RendererTargetState::Composite.

enum class Magnum::Ui::RendererTargetState new in Git master

Renderer target state.

Enumerators
Initial

Initial state. Can be transitioned from:

The corresponding RendererDrawStates are expected to be empty when transitioning to this state. Can be only transitioned to Initial, Draw or Final.

Draw

Drawing a layer. Can be transitioned from:

  • RendererTargetState::Initial, in which case the default framebuffer should be bound for drawing;
  • Draw, in which case the default framebuffer should stay bound;
  • Composite, in which case the default framebuffer should be bound for drawing, with the assumption that the compositing operation used some other framebuffer.

Can be only transitioned to Draw, Composite and Final.

Composite

Compositing a layer. Used only if RendererFeature::Composite is supported. Can be transitioned from:

The corresponding RendererDrawStates are expected to be empty when transitioning to this state. Can be only transitioned to Draw.

Final

Final state. Can be transitioned from:

The corresponding RendererDrawStates are expected be empty when transitioning to this state. Can be only transitioned to Initial.

enum class Magnum::Ui::RendererDrawState new in Git master

Renderer draw state.

Enumerators
Blending

Blending is active. Gets enabled when drawing a layer that advertises LayerFeature::DrawUsesBlending, and disabled again when drawing a layer that doesn't advertise it, or after drawing everything.

Scissor

Scissor is active. Gets enabled when drawing a layer that advertises LayerFeature::DrawUsesScissor, and disabled again when drawing a layer that doesn't advertise it, or after drawing everything.

enum class Magnum::Ui::StyleFeature: UnsignedByte new in Git master

Feature supplied by a style.

Enumerators
BaseLayer

BaseLayer style. Ensures a BaseLayer instance with a compatible BaseLayer::Shared state is set up on the UserInterface, the style implementation then calls setStyle() and setStyleTransition() on it.

TextLayer

TextLayer style and fonts. Ensures a TextLayer instance with a compatible TextLayer::Shared state is set up on the UserInterface, the style implementation then calls addFont(), setStyle() and setStyleTransition() on it.

TextLayerImages

Additional images such as icons for use with TextLayer::createGlyph(). Can only be used with AbstractStyle::apply() if a TextLayer instance is already set up on the UserInterface; can only be used with UserInterfaceGL::setStyle() / trySetStyle() if set together with StyleFeature::TextLayer or if a TextLayer instance is already set up on the UserInterface.

EventLayer

EventLayer style. Ensures an EventLayer instance is set up on the UserInterface.

SnapLayouter

SnapLayouter style. Ensures a SnapLayouter instance is set up on the UserInterface, the style implementation then calls setPadding() and setMargin() on it.

enum class Magnum::Ui::UserInterfaceState: UnsignedShort new in Git master

User interface state.

Used to decide whether AbstractUserInterface::clean() or AbstractUserInterface::update() need to be called to refresh the internal state before the interface is drawn or an event is handled. See also LayerState for layer-specific state, LayouterState for layouter-specific state and AnimatorState for animator-specific state.

Enumerators
NeedsDataUpdate

AbstractUserInterface::update() needs to be called to recalculate or reupload data attached to visible node hierarchy after they've been changed. Set implicitly if any of the layers have LayerState::NeedsDataUpdate, NeedsCommonDataUpdate or NeedsSharedDataUpdate set, is reset next time AbstractUserInterface::update() is called. Implied by UserInterfaceState::NeedsDataAttachmentUpdate, NeedsNodeEnabledUpdate, NeedsNodeClipUpdate, NeedsLayoutUpdate, NeedsLayoutAssignmentUpdate, NeedsNodeUpdate and NeedsNodeClean, so it's also set by everything that sets those flags.

NeedsDataAttachmentUpdate

AbstractUserInterface::update() needs to be called to refresh the data attached to visible node hierarchy after new data were attached or after existing attachments were removed and AbstractUserInterface::clean() was called. Set implicitly if any of the layers have LayerState::NeedsAttachmentUpdate set, after every AbstractUserInterface::removeLayer() call and transitively after every AbstractUserInterface::attachData() call, is reset next time AbstractUserInterface::update() is called. Implies UserInterfaceState::NeedsDataUpdate. Implied by NeedsNodeEnabledUpdate, NeedsNodeClipUpdate, NeedsLayoutUpdate, NeedsLayoutAssignmentUpdate, NeedsNodeUpdate and NeedsNodeClean, so it's also set by everything that sets those flags.

NeedsNodeEnabledUpdate

AbstractUserInterface::update() needs to be called to refresh the enabled node set after node flags changed. Set implicitly after every setNodeFlags(), addNodeFlags() and clearNodeFlags() that changes the presence of the NodeFlag::NoEvents, NodeFlag::Disabled or NodeFlag::Focusable flag; is reset next time AbstractUserInterface::update() is called. Implies UserInterfaceState::NeedsDataAttachmentUpdate. Implied by NeedsNodeClipUpdate, NeedsLayoutUpdate, NeedsLayoutAssignmentUpdate, NeedsNodeUpdate and NeedsNodeClean, so it's also set by everything that sets those flags.

NeedsNodeClipUpdate

AbstractUserInterface::update() needs to be called to refresh the visible node set after the user interface size or node flags changed. Set implicitly after every setSize() call that changes the user interface size if any nodes were already created and after every setNodeFlags(), addNodeFlags() and clearNodeFlags() that changes the presence of the NodeFlag::Clip flag; is reset next time AbstractUserInterface::update() is called. Implies UserInterfaceState::NeedsNodeEnabledUpdate. Implied by NeedsLayoutUpdate, NeedsLayoutAssignmentUpdate, NeedsNodeUpdate and NeedsNodeClean, so it's also set by everything that sets those flags.

NeedsLayoutUpdate

AbstractUserInterface::update() needs to be called to refresh the visible node hierarchy layout after node sizes or offsets changed. Set implicitly if any of the layouters have LayouterState::NeedsUpdate set and after every AbstractUserInterface::setNodeOffset() and AbstractUserInterface::setNodeSize(), is reset next time AbstractUserInterface::update() is called. Implies UserInterfaceState::NeedsNodeClipUpdate. Implied by NeedsLayoutAssignmentUpdate, NeedsNodeUpdate and NeedsNodeClean, so it's also set by everything that sets those flags.

NeedsLayoutAssignmentUpdate

AbstractUserInterface::update() needs to be called to refresh the layouts assigned to visible node hierarchy after new layouts were added or after existing layouts were removed and AbstractUserInterface::clean() was called. Set implicitly if any of the layouters have LayouterState::NeedsAssignmentUpdate set and after every AbstractUserInterface::removeLayouter() call, is reset next time AbstractUserInterface::update() is called. Implies UserInterfaceState::NeedsLayoutUpdate. Implied by NeedsNodeUpdate and NeedsNodeClean, so it's also set by everything that sets those flags.

NeedsNodeUpdate

AbstractUserInterface::update() needs to be called to refresh the visible node hierarchy and data attached to it after nodes were added or removed, made hidden or visible again or the top-level node order changed. Set implicitly after every AbstractUserInterface::createNode(), setNodeOrder() and clearNodeOrder() call and after every setNodeFlags(), addNodeFlags() and clearNodeFlags() call that changes the presence of the NodeFlag::Hidden flag; is reset next time AbstractUserInterface::update() is called. Implies UserInterfaceState::NeedsLayoutAssignmentUpdate. Implied by NeedsNodeClean, so it's also set by everything that sets that flag.

NeedsDataClean

AbstractUserInterface::clean() needs to be called to prune animations attached to removed data. Set implicitly if any of the layers have LayerState::NeedsDataClean set and transitively after every AbstractUserInterface::removeNode() call, is reset next time AbstractUserInterface::clean() is called. Implied by UserInterfaceState::NeedsNodeClean.

NeedsNodeClean

AbstractUserInterface::clean() needs to be called to prune child hierarchies of removed nodes and data, layouts and animation assigned to those. Set implicitly after every AbstractUserInterface::removeNode() call, is reset to UserInterfaceState::NeedsNodeUpdate next time AbstractUserInterface::clean() is called. Implies UserInterfaceState::NeedsNodeUpdate and NeedsDataClean.

NeedsAnimationAdvance

AbstractUserInterface::advanceAnimations() needs to be called to advance active animations. Set implicitly if any of the animators have AnimatorState::NeedsAdvance set, is reset next time AbstractUserInterface::advanceAnimations() is called if no animations are AnimationState::Scheduled, AnimationState::Playing or AnimationState::Paused anymore.

enum class Magnum::Ui::BaseLayerSharedFlag: UnsignedByte new in Git master

Base layer shared state flag.

Enumerators
Textured

Textured drawing. If enabled, the BaseLayerStyleUniform::topColor and bottomColor is multiplied with a color coming from a texture set in BaseLayerGL::setTexture() and texture coordinates specified with BaseLayer::setTextureCoordinates().

BackgroundBlur

Blur the background of semi-transparent quads. If enabled, the alpha value of BaseLayerStyleUniform::topColor, bottomColor and outlineColor is used to interpolate between the color and the blurred background, instead of performing a classical blending of the color and the framebuffer contents underneath.

Use BaseLayer::Shared::Configuration::setBackgroundBlurRadius() and BaseLayer::setBackgroundBlurPassCount() to control the blur radius and BaseLayerCommonStyleUniform::backgroundBlurAlpha to achieve additional effects.

NoRoundedCorners

Disable support for rounded corners. If set, the BaseLayerStyleUniform::cornerRadius and innerOutlineCornerRadius fields are not used and the behavior is the same as if they were both set to 0.0f. Can result in rendering performance improvement, useful for example when BaseLayerSharedFlag::Textured is enabled and the layer is used just to draw (alpha blended) images, or if a particular widget style doesn't use rounded corners at all.

Mutually exclusive with the BaseLayerSharedFlag::SubdividedQuads optimization.

NoOutline

Disable support for rounded corners. If set, the BaseLayerCommonStyleUniform::innerOutlineSmoothness, BaseLayerStyleUniform::outlineColor, outlineWidth and innerOutlineCornerRadius fields are not used and BaseLayer::setOutlineWidth() has no effect. The behavior is then the same as if the outline width was set to 0.0f on all sides both in the style and for all data. Can result in rendering performance improvement, useful for example when BaseLayerSharedFlag::Textured is enabled and the layer is used just to draw (alpha blended) images, or if a particular widget style doesn't use outlines at all.

Mutually exclusive with the BaseLayerSharedFlag::SubdividedQuads optimization.

TextureMask

Use alpha channel of the texture to mask out the outline and background blur. By default the outline is drawn over the texture without taking the texture color or alpha into account; and the background is blurred for the whole area of the quad, with transparent areas of the texture causing just the blurred background to be shown. Enabling this flag causes the transparent areas to make holes in both the outline and the blurred background. Implies BaseLayerSharedFlag::Textured.

SubdividedQuads

Render the quads subdivided into 9 quads, where each contains either a corner, an edge with an outline or the inside. This significantly simplifies the fragment shader at the cost of uploading much more data to the GPU. May improve rendering speed on low performance GPUs but the extra bandwidth may have a negative effect on GPUs where the rendering wasn't bottlenecked by fragment shading.

Mutually exclusive with the BaseLayerSharedFlag::NoRoundedCorners and NoOutline optimizations.

enum class Magnum::Ui::BaseLayerStyleAnimation: UnsignedByte new in Git master

Base layer style properties that are being animated.

Depending on which of these are returned from BaseLayerStyleAnimator::advance(), causes various LayerState flags and other internal AbstractLayer state to be set after an AbstractUserInterface::advanceAnimations() (and transitively AbstractLayer::advanceAnimations(Nanoseconds, Containers::MutableBitArrayView, const Containers::StridedArrayView1D<Float>&, Containers::MutableBitArrayView, const Containers::Iterable<AbstractStyleAnimator>&)) call.

Enumerators
Uniform

Style uniform data. Equivalently to calling BaseLayer::setDynamicStyle(), causes LayerState::NeedsCommonDataUpdate to be set.

Padding

Style padding. Equivalently to calling BaseLayer::setDynamicStyle() with a different padding value, causes LayerState::NeedsDataUpdate to be set.

Style

Style assignment. Equivalently to calling BaseLayer::setStyle(), causes LayerState::NeedsDataUpdate to be set.

enum class Magnum::Ui::ButtonStyle: UnsignedByte new in Git master

Button style.

Enumerators
Default

Default

Primary

Primary

Success

Success

Warning

Warning

Danger

Danger

Info

Info

Dim

Dim

Flat

Flat

enum class Magnum::Ui::PointerEventSource: UnsignedByte new in Git master

Pointer event source.

Enumerators
Mouse

The event is coming from a mouse

Touch

The event is coming from a touch contact

Pen

The event is coming from a pen stylus

enum class Magnum::Ui::Pointer: UnsignedByte new in Git master

Pointer type.

Enumerators
MouseLeft

Left mouse button

MouseMiddle

Middle mouse button

MouseRight

Right mouse button

Finger

Finger

Pen

Pen

Eraser

Eraser

enum class Magnum::Ui::Key: UnsignedShort new in Git master

Keyboard key.

Enumerators
Backspace

Backspace

Tab

Tab

Enter

Enter

Esc

Escape

Space

Space

Percent

Percent. On the US keyboard layout this may only be representable as Shift 5.

Quote

Quote (')

Plus

Plus. On the US keyboard layout this may only be representable as Shift =.

Comma

Comma

Minus

Minus

Period

Period

Slash

Slash

Zero

Zero

One

One

Two

Two

Three

Three

Four

Four

Five

Five

Six

Six

Seven

Seven

Eight

Eight

Nine

Nine

Semicolon

Semicolon

Equal

Equal

LeftBracket

Left bracket ([)

Backslash

Backslash (\)

RightBracket

Right bracket (])

Backquote

Backquote (`)

A

Letter A

B

Letter B

C

Letter C

D

Letter D

E

Letter E

F

Letter F

G

Letter G

H

Letter H

I

Letter I

J

Letter J

K

Letter K

L

Letter L

M

Letter M

N

Letter N

O

Letter O

P

Letter P

Q

Letter Q

R

Letter R

S

Letter S

T

Letter T

U

Letter U

V

Letter V

W

Letter W

X

Letter X

Y

Letter Y

Z

Letter Z

Delete
LeftShift

Left Shift

RightShift

Right Shift

LeftCtrl

Left Ctrl

RightCtrl

Right Ctrl

LeftAlt

Left Alt

RightAlt

Right Alt

LeftSuper

Left Super key (Windows/⌘)

RightSuper

Right Super key (Windows/⌘)

Up

Up arrow

Down

Down arrow

Left

Left arrow

Right

Right arrow

Home

Home

End

End

PageUp

Page up

PageDown

Page down

Insert

Insert

F1

F1

F2

F2

F3

F3

F4

F4

F5

F5

F6

F6

F7

F7

F8

F8

F9

F9

F10

F10

F11

F11

F12

F12

CapsLock

Caps lock

ScrollLock

Scroll lock

NumLock

Num lock

PrintScreen

Print screen

Pause

Pause

Menu

Menu

NumZero

Numpad zero

NumOne

Numpad one

NumTwo

Numpad two

NumThree

Numpad three

NumFour

Numpad four

NumFive

Numpad five

NumSix

Numpad six

NumSeven

Numpad seven

NumEight

Numpad eight

NumNine

Numpad nine

NumDecimal

Numpad decimal

NumDivide

Numpad divide

NumMultiply

Numpad multiply

NumSubtract

Numpad subtract

NumAdd

Numpad add

NumEnter

Numpad enter

NumEqual

Numpad equal

enum class Magnum::Ui::Modifier: UnsignedByte new in Git master

Keyboard modifier.

Enumerators
Shift

Shift

Ctrl

Ctrl

Alt

Alt

Super

Super key (Windows/⌘)

enum class Magnum::Ui::LayerHandle: UnsignedShort new in Git master

Layer handle.

Uses 8 bits for storing an ID and 8 bits for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::LayerDataHandle: UnsignedInt new in Git master

Layer data handle.

Uses 20 bits for storing an ID and 12 bits for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::DataHandle: UnsignedLong new in Git master

Layer data handle.

A combination of a LayerHandle and a LayerDataHandle. Uses 8 bits for storing a layer ID, 8 bits for a layer generation, 20 bits for storing a data ID and 12 bits for a data generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::NodeHandle: UnsignedInt new in Git master

Node handle.

Uses 20 bits for storing an ID and 12 bits for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::LayouterHandle: UnsignedShort new in Git master

Layouter handle.

Uses 8 bits for storing an ID and 8 bits for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::LayouterDataHandle: UnsignedInt new in Git master

Layouter data handle.

Uses 20 bits for storing an ID and 12 bits for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::LayoutHandle: UnsignedLong new in Git master

Layout handle.

A combination of a LayouterHandle and a LayouterDataHandle. Uses 8 bits for storing a layouter ID, 8 bits for a layouter generation, 20 bits for storing a layouter data ID and 12 bits for a layouter data generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::AnimatorHandle: UnsignedShort new in Git master

Animator handle.

Uses 8 bits for storing an ID and 8 bits for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::AnimatorDataHandle: UnsignedInt new in Git master

Animator data handle.

Uses 20 bits for storing an ID and 12 bits for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::AnimationHandle: UnsignedLong new in Git master

Animation handle.

A combination of an AnimatorHandle and an AnimatorDataHandle. Uses 8 bits for storing an animator ID, 8 bits for an animator generation, 20 bits for storing an animator data ID and 12 bits for an animator data generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::InputStyle: UnsignedByte new in Git master

Input style.

Enumerators
Default

Default

Success

Success

Warning

Warning

Danger

Danger

Flat

Flat

enum class Magnum::Ui::LabelStyle: UnsignedByte new in Git master

Label style.

Enumerators
Default

Default

Primary

Primary

Success

Success

Warning

Warning

Danger

Danger

Info

Info

Dim

Dim

enum class Magnum::Ui::NodeFlag: UnsignedByte new in Git master

Node behavior flag.

Enumerators
Hidden

The node, all nested nodes including nested top-level nodes, and all attached data are hidden, i.e. not drawn and excluded from event processing.

For top-level nodes (i.e., nodes for which AbstractUserInterface::nodeParent() is NodeHandle::Null) a draw order is managed in addition to the hidden state, using AbstractUserInterface::setNodeOrder() and clearNodeOrder(). A top-level node that isn't in the draw order list behaves the same as if NodeFlag::Hidden was set for it. For performance reasons it's however recommended to keep the draw list small rather than having it full of mostly hidden nodes.

Changing this flag causes UserInterfaceState::NeedsNodeUpdate to be set.

Clip

The node clips its contents. When enabled, child nodes that are completely outside of the node rectangle are culled and not even drawn, nodes that are partially outside are clipped. Nested top-level nodes are not affected by this flag.

Changing this flag causes UserInterfaceState::NeedsNodeClipUpdate to be set.

NoEvents

The node, all nested nodes and all attached data don't get any events even if a particular layer implements event handlers. Nested top-level nodes are not affected by this flag. Doesn't have any visual effect, see NodeFlag::Disabled or NodeFlag::Hidden for alternatives. Setting this flag causes NodeFlag::Focusable to be ignored on the node and all its children.

Changing this flag causes UserInterfaceState::NeedsNodeEnabledUpdate to be set.

Disabled

The node, all nested nodes and all attached data are disabled. Implies NodeFlag::NoEvents and additionally has a visual effect on layers that implement a disabled state. Nested top-level nodes are not affected by this flag. Setting this flag causes NodeFlag::Focusable to be ignored on the node and all its children.

Changing this flag causes UserInterfaceState::NeedsNodeEnabledUpdate to be set.

Focusable

The node can be focused, after which all key events are directed to it instead of to a node currently under pointer. Focusing is done either by a tap or a click or programmatically via AbstractUserInterface::focusEvent(). If NodeFlag::NoEvents or NodeFlag::Disabled is set on the same node or any of its parents, this flag is ignored.

Changing this flag causes UserInterfaceState::NeedsNodeEnabledUpdate to be set.

enum class Magnum::Ui::Snap: UnsignedByte

Layout snap.

See particular values for detailed documentation.

Specifying neither Snap::Left nor Snap::Right will result in horizontal centering. Specifying both Snap::Left and Snap::Right (or the Snap::FillX alias) will cause the node width to match width of the target node or the user interface. In both cases it's as if Snap::InsideX was specified as well, taking horizontal SnapLayouter::padding() into account.

Specifying neither Snap::Top nor Snap::Bottom will result in verical centering. Specifying both Snap::Top and Snap::Bottom (or the Snap::FillX alias) will cause the node height to match height the target node or user interface. In both cases it's as if Snap::InsideY was specified as well, taking vertical SnapLayouter::padding() into account.

Specifying Snap::NoPadX and/or Snap::NoPadY will ignore horizontal and/or vertical SnapLayouter::padding() and SnapLayouter::margin().

Enumerators
Left

Snaps right side of a node to left side of the target node, taking horizontal SnapLayouter::margin() into account.

If combined with Snap::InsideX, snaps left side of a node to left side of the target node or user interface, taking left-side SnapLayouter::padding() into account.

Top

Snaps bottom side of a node to top side of the target node, taking vertical SnapLayouter::margin() into account.

If combined with Snap::InsideY, snaps top side of a node to top side of the target node or user interface, taking top-side SnapLayouter::padding() into account.

Right

Snaps left side of a node to right side of the target node, taking horizontal SnapLayouter::margin() into account.

If combined with Snap::InsideX, snaps right side of a node to right side of the target node or user interface, taking right-side SnapLayouter::padding() into account.

Bottom

Snaps top side of a node to bottom side of the target node, taking vertical SnapLayouter::margin() into account.

If combined with Snap::InsideY, snaps bottom side of a node to bottom side of the target node or user interface, taking top-side SnapLayouter::padding() into account.

TopLeft new in Git master

Alias to specifying both Snap::Top and Snap::Left.

BottomLeft new in Git master

Alias to specifying both Snap::Bottom and Snap::Left.

TopRight new in Git master

Alias to specifying both Snap::Top and Snap::Right.

BottomRight new in Git master

Alias to specifying both Snap::Bottom and Snap::Right.

FillX new in Git master

Alias to specifying both Snap::Left and Snap::Right.

FillY new in Git master

Alias to specifying both Snap::Top and Snap::Bottom.

Fill new in Git master

Alias to specifying both Snap::FillX and Snap::FillY, or all of Snap::Left, Snap::Right, Snap::Top and Snap::Bottom.

InsideX

When combined with either Snap::Left or Snap::Right, snaps horizontally inside the target node instead of outside. Implicit when either both or neither Snap::Left and Snap::Right are specified, implicit also if snapping relative to the whole user interface (i.e., when the target node is NodeHandle::Null).

InsideY

When combined with either Snap::Top or Snap::Bottom, snaps horizontally inside the target node instead of outside. Implicit when either both or neither Snap::Top and Snap::Bottom are specified, implicit also if snapping relative to the whole user interface (i.e., when the target node is NodeHandle::Null).

Inside new in Git master

Alias to specifying both Snap::InsideX and Snap::InsideY.

NoPadX new in Git master

Ignore horizontal SnapLayouter::padding() and SnapLayouter::margin().

NoPadY new in Git master

Ignore vertical SnapLayouter::padding() and SnapLayouter::margin().

NoPad new in Git master

Alias to specifying both Snap::NoPadX and Snap::NoPadY.

enum class Magnum::Ui::Icon: UnsignedInt new in Git master

Icon.

For use in Button and other widgets.

Enumerators
None

No icon. When returned, means given widget has no icon. When passed as an argument, causes a widget icon to be unset.

Yes

Yes

No

No

enum class Magnum::Ui::FontHandle: UnsignedShort new in Git master

Font handle.

Uses 15 bits for storing an ID and 1 bit for a generation.

Enumerators
Null

Null handle

enum class Magnum::Ui::TextDataFlag: UnsignedByte new in Git master

Text layer data flag.

Enumerators
Editable

Editable text. If data that have it enabled are attached to a currently focused node, the layer reacts to text input and key events, allowing to edit the contents. Unlike non-editable text, the contents are also accessible through TextLayer::text().

If editing styles are present and used by given style, the cursor position and/or selection is drawn as well.

enum class Magnum::Ui::TextEdit: UnsignedByte

Text edit operation.

Enumerators
MoveCursorLeft

Move cursor one character to the left and discard any selection, equivalent to the Left key. The TextLayer::editText() text is expected to be empty.

If the character on the left to the TextLayer::cursor() is a valid UTF-8 byte sequence, it moves past the whole sequence, otherwise just by one byte. Note that, currently, if a character is combined out of multiple Unicode codepoints (such as combining diacritics), the cursor will not jump over the whole combined sequence but move inside.

By default, the cursor moves backward in the byte stream, which is optically to the left for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, the cursor still moves optically to the left, although it's forward in the byte stream.

ExtendSelectionLeft

Extend or shrink selection to the left of the cursor, equivalent to the Shift Left key combination. The TextLayer::editText() text is expected to be empty.

If the character on the left to the TextLayer::cursor() is a valid UTF-8 byte sequence, it extends past the whole sequence, otherwise just by one byte. Note that, currently, if a character is combined out of multiple Unicode codepoints (such as combining diacritics), the cursor will not jump over the whole combined sequence but move inside.

By default, the cursor moves backward in the byte stream, which is optically to the left for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, the cursor still moves optically to the left, although it's forward in the byte stream.

MoveCursorRight

Move cursor one character to the right and discard any selection, equivalent to the Right key. The TextLayer::editText() text is expected to be empty.

If the character on the right to the TextLayer::cursor() is a valid UTF-8 byte sequence, it moves past the whole sequence, otherwise just by one byte. Note that, currently, if a character is combined out of multiple Unicode codepoints (such as combining diacritics), the cursor will not jump over the whole combined sequence but move inside.

By default, the cursor moves backward in the byte stream, which is optically to the left for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, the cursor still moves optically to the right, although it's forward in the byte stream.

ExtendSelectionRight

Extend or shrink selection to the right of the cursor, equivalent to the Shift Right key combination. The TextLayer::editText() text is expected to be empty.

If the character on the right to the TextLayer::cursor() is a valid UTF-8 byte sequence, it moves past the whole sequence, otherwise just by one byte. Note that, currently, if a character is combined out of multiple Unicode codepoints (such as combining diacritics), the cursor will not jump over the whole combined sequence but move inside.

By default, the cursor moves backward in the byte stream, which is optically to the left for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, the cursor still moves optically to the right, although it's forward in the byte stream.

MoveCursorLineBegin

Move cursor at the beginning of the line and discard any selection, equivalent to the Home key. The TextLayer::editText() text is expected to be empty.

The cursor moves to the begin of the byte stream, which is optically on the left for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, it's still the begin of the byte stream, but optically after the rightmost character.

ExtendSelectionLineBegin

Extend selection to the beginning of the line, equivalent to the Shift Home key combination. The TextLayer::editText() text is expected to be empty.

The cursor moves to the begin of the byte stream, which is optically on the left for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, it's still the begin of the byte stream, but optically after the rightmost character.

MoveCursorLineEnd

Move cursor at the end of the line and discard any selection, equivalent to the End key. The TextLayer::editText() text is expected to be empty.

The cursor moves to the end of in the byte stream, which is optically on the right for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, it's still the end ofthe byte stream, but optically before the leftmost character.

ExtendSelectionLineEnd

Extend selection to the end of the line, equivalent to the Shift End key combination. The TextLayer::editText() text is expected to be empty.

The cursor moves to the end of in the byte stream, which is optically on the right for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, it's still the end ofthe byte stream, but optically before the leftmost character.

RemoveBeforeCursor

Remove selection or character before cursor, equivalent to the Backspace key. The TextLayer::editText() text is expected to be empty.

If the character before TextLayer::cursor() is a valid UTF-8 byte sequence, it deletes the whole sequence, otherwise just one byte. Note that, currently, if a character is combined out of multiple Unicode codepoints (such as combining diacritics), the cursor will not delete the whole combined sequence but only a part.

The deletion goes backward in the byte stream, which is optically to the left for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, the deletion still goes backward in the byte stream, but optically it's to the right.

For a non-empty selection the behavior is the same as TextEdit::RemoveAfterCursor.

RemoveAfterCursor

Remove selection or character after cursor, equivalent to the Delete key. The TextLayer::editText() text is expected to be empty.

If the character after TextLayer::cursor() is a valid UTF-8 byte sequence, it deletes the whole sequence, otherwise just one byte. Note that, currently, if a character is combined out of multiple Unicode codepoints (such as combining diacritics), the cursor will not delete the whole combined sequence but only a part.

The deletion goes forward in the byte stream, which is optically to the right for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, the deletion still goes forward in the byte stream, but optically it's to the left.

For a non-empty selection the behavior is the same as TextEdit::RemoveBeforeCursor.

InsertBeforeCursor

Insert text before the cursor, replacing the selection if any. This will cause the cursor to advance after the inserted text, which is the usual text editing behavior.

No UTF-8 byte sequence adjustment is performed in this case, i.e. it's assumed that the cursor is at a valid UTF-8 character boundary and the inserted text ends with a valid UTF-8 character as well.

The insertion goes forward in the byte stream, which is optically to the right for left-to-right alphabets. If TextProperties::shapeDirection() is Text::ShapeDirection::RightToLeft or if it's Unspecified and was detected to be RightToLeft after calling Text::AbstractShaper::shape() internally, the insertion still goes forward in the byte stream, but optically it's to the left.

InsertAfterCursor

Insert text after the cursor, replacing the selection if any. Compared to TextEdit::InsertBeforeCursor, the cursor stays at the original position, before the inserted text, other than that the behavior is the same. Useful for autocompletion hints, for example.

Like with TextEdit::InsertBeforeCursor, no UTF-8 byte sequence adjustment is performed in this case, i.e. it's assumed that the cursor is at a valid UTF-8 character boundary and the inserted text ends with a valid UTF-8 character as well.

enum class Magnum::Ui::TextLayerStyleAnimation: UnsignedByte new in Git master

Text layer style properties that are being animated.

Depending on which of these are returned from TextLayerStyleAnimator::advance(), causes various LayerState flags and other internal AbstractLayer state to be set after an AbstractUserInterface::advanceAnimations() (and transitively AbstractLayer::advanceAnimations(Nanoseconds, Containers::MutableBitArrayView, const Containers::StridedArrayView1D<Float>&, Containers::MutableBitArrayView, const Containers::Iterable<AbstractStyleAnimator>&)) call.

Enumerators
Uniform

Style uniform data. Equivalently to calling TextLayer::setDynamicStyle(), causes LayerState::NeedsCommonDataUpdate to be set.

Padding

Style padding. Equivalently to calling TextLayer::setDynamicStyle() with a different padding value, causes LayerState::NeedsDataUpdate to be set.

EditingUniform

Editing style uniform data. Equivalently to calling TextLayer::setDynamicStyleWithCursorSelection(), setDynamicStyleWithCursor() or setDynamicStyleWithSelection(), causes LayerState::NeedsCommonDataUpdate to be set.

EditingPadding

Editing style padding. Equivalently to calling TextLayer::setDynamicStyleWithCursorSelection(), setDynamicStyleWithCursor() or setDynamicStyleWithSelection() with a different editing padding value, causes LayerState::NeedsDataUpdate to be set.

Style

Style assignment. Equivalently to calling TextLayer::setStyle(), causes LayerState::NeedsDataUpdate to be set.

Typedef documentation

typedef Containers::EnumSet<AnimatorFeature> Magnum::Ui::AnimatorFeatures new in Git master

Set of features supported by an animator.

typedef Containers::EnumSet<NodeAnimation> Magnum::Ui::NodeAnimations new in Git master

Set of node properties that are being animated.

typedef Containers::EnumSet<LayerFeature> Magnum::Ui::LayerFeatures new in Git master

Set of features supported by a layer.

typedef BasicAnchor<UserInterface> Magnum::Ui::Anchor new in Git master

Widget positioning anchor for use with UserInterface.

See the AbstractAnchor class documentation for more information.

typedef Containers::EnumSet<BaseLayerStyleAnimation> Magnum::Ui::BaseLayerStyleAnimations new in Git master

Set of base layer style properties that are being animated.

typedef Containers::EnumSet<Pointer> Magnum::Ui::Pointers new in Git master

Pointer types.

typedef Containers::EnumSet<Modifier> Magnum::Ui::Modifiers new in Git master

Set of keyboard modifiers.

typedef Containers::EnumSet<Snap> Magnum::Ui::Snaps

Layout snaps.

typedef BasicSnapLayout<UserInterface> Magnum::Ui::SnapLayout new in Git master

SnapLayouter layout creation helper for use with UserInterface

See the AbstractSnapLayout class documentation for more information.

typedef Containers::EnumSet<TextLayerStyleAnimation> Magnum::Ui::TextLayerStyleAnimations new in Git master

Set of text layer style properties that are being animated.

typedef BasicWidget<UserInterface> Magnum::Ui::Widget new in Git master

Base for stateful widgets for use with UserInterface.

See the AbstractWidget class documentation for more information.

Function documentation

Debug& Magnum::Ui::operator<<(Debug& debug, AnimatorFeature value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimatorFeatures value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimatorState value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimatorStates value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimationFlag value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimationFlags value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimationState value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, NodeAnimation value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, NodeAnimations value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LayerFeature value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LayerFeatures value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LayerState value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LayerStates value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LayouterState value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LayouterStates value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, RendererFeature value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, RendererFeatures value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, RendererTargetState value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, RendererDrawState value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, RendererDrawStates value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, StyleFeature value)

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, StyleFeatures value)

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, BaseLayerSharedFlag value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, BaseLayerSharedFlags value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, ButtonStyle value) new in Git master

Debug output operator.

Anchor Magnum::Ui::button(const Anchor& anchor, Icon icon, ButtonStyle style = ButtonStyle::Default) new in Git master

Stateless icon button widget.

Parameters
anchor Positioning anchor
icon Button icon. Passing Icon::None makes the button empty.
style Button style
Returns The anchor verbatim

Compared to Button::Button(const Anchor&, Icon, ButtonStyle) this creates a stateless button that doesn't have any class instance that would need to be kept in scope and eventually destructed, making it more lightweight. As a consequence it can't have its style, icon or text subsequently changed and is removed only when the node or its parent get removed.

Anchor Magnum::Ui::button(const Anchor& anchor, Containers::StringView text, const TextProperties& textProperties, ButtonStyle style = ButtonStyle::Default) new in Git master

Stateless text button widget.

Parameters
anchor Positioning anchor
text Button text. Passing an empty string makes the button empty.
textProperties Text shaping and layouting properties
style Button style
Returns The anchor verbatim

Compared to Button::Button(const Anchor&, Containers::StringView, const TextProperties&, ButtonStyle) this creates a stateless button that doesn't have any class instance that would need to be kept in scope and eventually destructed, making it more lightweight. As a consequence it can't have its style, icon or text subsequently changed and is removed only when the node or its parent get removed.

Anchor Magnum::Ui::button(const Anchor& anchor, Containers::StringView text, ButtonStyle style = ButtonStyle::Default)

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

Anchor Magnum::Ui::button(const Anchor& anchor, Icon icon, Containers::StringView text, const TextProperties& textProperties, ButtonStyle style = ButtonStyle::Default) new in Git master

Stateless icon + text button widget.

Parameters
anchor Positioning anchor
icon Button icon. Passing Icon::None creates the button without an icon.
text Button text. Passing an empty string creates the button without a text.
textProperties Text shaping and layouting properties
style Button style
Returns The anchor verbatim

Compared to Button::Button(const Anchor&, Icon, Containers::StringView, const TextProperties&, ButtonStyle) this creates a stateless button that doesn't have any class instance that would need to be kept in scope and eventually destructed, making it more lightweight. As a consequence it can't have its style, icon or text subsequently changed and is removed only when the node or its parent get removed.

Anchor Magnum::Ui::button(const Anchor& anchor, Icon icon, Containers::StringView text, ButtonStyle style = ButtonStyle::Default)

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

Debug& Magnum::Ui::operator<<(Debug& debug, PointerEventSource value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, Pointer value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, Pointers value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, Key value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, Modifier value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, Modifiers value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LayerHandle value) new in Git master

Debug output operator.

LayerHandle Magnum::Ui::layerHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a layer handle from an ID and a generation.

Expects that the ID fits into 8 bits and the generation into 8 bits. Use layerHandleId() and layerHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::layerHandleId(LayerHandle handle) constexpr new in Git master

Extract ID from a layer handle.

Expects that handle is not LayerHandle::Null. Use layerHandleGeneration() for extracting the generation and layerHandle() for an inverse operation.

UnsignedInt Magnum::Ui::layerHandleGeneration(LayerHandle handle) constexpr new in Git master

Extract generation from a layer handle.

For LayerHandle::Null returns 0. A valid handle has always a non-zero generation. Use layerHandleId() for extracting the ID and layerHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, LayerDataHandle value) new in Git master

Debug output operator.

LayerDataHandle Magnum::Ui::layerDataHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a layer data handle from an ID and a generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use layerDataHandleId() and layerDataHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::layerDataHandleId(LayerDataHandle handle) constexpr new in Git master

Extract ID from a layer data handle.

Expects that handle is not LayerDataHandle::Null. Use layerDataHandleGeneration() for extracting the generation and layerDataHandle() for an inverse operation.

UnsignedInt Magnum::Ui::layerDataHandleGeneration(LayerDataHandle handle) constexpr new in Git master

Extract generation from a layer data handle.

For LayerDataHandle::Null returns 0. A valid handle has always a non-zero generation. Use layerDataHandleId() for extracting the ID and layerDataHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, DataHandle value) new in Git master

Debug output operator.

DataHandle Magnum::Ui::dataHandle(LayerHandle layerHandle, UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a data handle from a layer handle, a data ID and a data generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use dataHandleLayer(), dataHandleId() and dataHandleGeneration() for an inverse operation.

DataHandle Magnum::Ui::dataHandle(LayerHandle layerHandle, LayerDataHandle layerDataHandle) constexpr new in Git master

Compose a data handle from a layer handle and a layer data handle.

Use dataHandleLayer() and dataHandleData() for the inverse operation.

LayerHandle Magnum::Ui::dataHandleLayer(DataHandle handle) constexpr new in Git master

Extract layer handle from a data handle.

Use dataHandleData() for extracting the layer data handle and dataHandle(LayerHandle, LayerDataHandle) for an inverse operation.

LayerDataHandle Magnum::Ui::dataHandleData(DataHandle handle) constexpr new in Git master

Extract layer data handle from a data handle.

Use dataHandleLayer() for extracting the layer handle and dataHandle(LayerHandle, LayerDataHandle) for an inverse operation.

UnsignedInt Magnum::Ui::dataHandleLayerId(DataHandle handle) constexpr new in Git master

Extract layer ID from a data handle.

Expects that the layer portion of handle is not LayerHandle::Null. Use dataHandleLayerGeneration() for extracting the layer generation and layerHandle() together with dataHandle() for an inverse operation.

UnsignedInt Magnum::Ui::dataHandleLayerGeneration(DataHandle handle) constexpr new in Git master

Extract layer generation from a data handle.

If the layer portion of the handle is LayerHandle::Null, returns 0. A valid handle has always a non-zero generation. Use dataHandleLayerId() for extracting the ID and layerHandle() together with dataHandle() for an inverse operation.

UnsignedInt Magnum::Ui::dataHandleId(DataHandle handle) constexpr new in Git master

Extract ID from a data handle.

Expects that the data portion of handle is not LayerDataHandle::Null. Use dataHandleGeneration() for extracting the generation and dataHandle(LayerHandle, UnsignedInt, UnsignedInt) for an inverse operation.

UnsignedInt Magnum::Ui::dataHandleGeneration(DataHandle handle) constexpr new in Git master

Extract generation from a data handle.

If the data portion of handle is LayerDataHandle::Null, returns 0. A valid handle has always a non-zero generation. Use dataHandleId() for extracting the ID and dataHandle(LayerHandle, UnsignedInt, UnsignedInt) for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, NodeHandle value) new in Git master

Debug output operator.

NodeHandle Magnum::Ui::nodeHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a node handle from an ID and a generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use nodeHandleId() and nodeHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::nodeHandleId(NodeHandle handle) constexpr new in Git master

Extract ID from a node handle.

Expects that handle is not NodeHandle::Null. Use nodeHandleGeneration() for extracting the generation and nodeHandle() for an inverse operation.

UnsignedInt Magnum::Ui::nodeHandleGeneration(NodeHandle handle) constexpr new in Git master

Extract generation from a node handle.

For NodeHandle::Null returns 0. A valid handle has always a non-zero generation. Use nodeHandleId() for extracting the ID and nodeHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, LayouterHandle value) new in Git master

Debug output operator.

LayouterHandle Magnum::Ui::layouterHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a layouter handle from an ID and a generation.

Expects that the ID fits into 8 bits and the generation into 8 bits. Use layouterHandleId() and layouterHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::layouterHandleId(LayouterHandle handle) constexpr new in Git master

Extract ID from a layouter handle.

Expects that handle is not LayouterHandle::Null. Use layouterHandleGeneration() for extracting the generation and layouterHandle() for an inverse operation.

UnsignedInt Magnum::Ui::layouterHandleGeneration(LayouterHandle handle) constexpr new in Git master

Extract generation from a layouter handle.

For LayouterHandle::Null returns 0. A valid handle has always a non-zero generation. Use layouterHandleId() for extracting the ID and layouterHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, LayouterDataHandle value) new in Git master

Debug output operator.

LayouterDataHandle Magnum::Ui::layouterDataHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a layouter data handle from an ID and a generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use layouterDataHandleId() and layouterDataHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::layouterDataHandleId(LayouterDataHandle handle) constexpr new in Git master

Extract ID from a layouter data handle.

Expects that handle is not LayouterDataHandle::Null. Use layouterDataHandleGeneration() for extracting the generation and layouterDataHandle() for an inverse operation.

UnsignedInt Magnum::Ui::layouterDataHandleGeneration(LayouterDataHandle handle) constexpr new in Git master

Extract generation from a layouter data handle.

For LayouterDataHandle::Null returns 0. A valid handle has always a non-zero generation. Use layouterDataHandleId() for extracting the ID and layouterDataHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, LayoutHandle value) new in Git master

Debug output operator.

LayoutHandle Magnum::Ui::layoutHandle(LayouterHandle layouterHandle, UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a layout handle from a layouter handle, a layouter data ID and a layouter data generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use layoutHandleLayouter(), layoutHandleId() and layoutHandleGeneration() for an inverse operation.

LayoutHandle Magnum::Ui::layoutHandle(LayouterHandle layouterHandle, LayouterDataHandle layouterDataHandle) constexpr new in Git master

Compose a layout handle from a layouter handle and a layouter data handle.

Use layoutHandleLayouter() and layoutHandleData() for the inverse operation.

LayouterHandle Magnum::Ui::layoutHandleLayouter(LayoutHandle handle) constexpr new in Git master

Extract layouter handle from a layout handle.

Use layoutHandleData() for extracting the layouter data handle and layoutHandle(LayouterHandle, LayouterDataHandle) for an inverse operation.

LayouterDataHandle Magnum::Ui::layoutHandleData(LayoutHandle handle) constexpr new in Git master

Extract layouter data handle from a layout handle.

Use layoutHandleLayouter() for extracting the layouter handle and layoutHandle(LayouterHandle, LayouterDataHandle) for an inverse operation.

UnsignedInt Magnum::Ui::layoutHandleLayouterId(LayoutHandle handle) constexpr new in Git master

Extract layouter ID from a layout handle.

Expects that the layouter portion of handle is LayouterHandle::Null. Use layoutHandleLayouterGeneration() for extracting the layouter generation and layouterHandle() together with layoutHandle() for an inverse operation.

UnsignedInt Magnum::Ui::layoutHandleLayouterGeneration(LayoutHandle handle) constexpr new in Git master

Extract layouter generation from a layout handle.

If the layouter portion of the handle is LayouterHandle::Null, returns 0. A valid handle has always a non-zero generation. Use layoutHandleLayouterId() for extracting the ID and layouterHandle() together with layoutHandle() for an inverse operation.

UnsignedInt Magnum::Ui::layoutHandleId(LayoutHandle handle) constexpr new in Git master

Extract ID from a layout handle.

Expects that the data portion of handle is not LayouterDataHandle::Null. Use layoutHandleGeneration() for extracting the generation and layoutHandle(LayouterHandle, UnsignedInt, UnsignedInt) for an inverse operation.

UnsignedInt Magnum::Ui::layoutHandleGeneration(LayoutHandle handle) constexpr new in Git master

Extract generation from a layout handle.

If the layouter data portion of the handle is LayouterDataHandle::Null, returns 0. A valid handle has always a non-zero generation. Use layoutHandleId() for extracting the ID and layoutHandle(LayouterHandle, UnsignedInt, UnsignedInt) for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimatorHandle value) new in Git master

Debug output operator.

AnimatorHandle Magnum::Ui::animatorHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose an animator handle from an ID and a generation.

Expects that the ID fits into 8 bits and the generation into 8 bits. Use animatorHandleId() and animatorHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::animatorHandleId(AnimatorHandle handle) constexpr new in Git master

Extract ID from an animator handle.

Expects that handle is not AnimatorHandle::Null. Use animatorHandleGeneration() for extracting the generation and animatorHandle() for an inverse operation.

UnsignedInt Magnum::Ui::animatorHandleGeneration(AnimatorHandle handle) constexpr new in Git master

Extract generation from an animator handle.

For AnimatorHandle::Null returns 0. A valid handle has always a non-zero generation. Use animatorHandleId() for extracting the ID and animatorHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimatorDataHandle value) new in Git master

Debug output operator.

AnimatorDataHandle Magnum::Ui::animatorDataHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose an animator data handle from an ID and a generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use animatorDataHandleId() and animatorDataHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::animatorDataHandleId(AnimatorDataHandle handle) constexpr new in Git master

Extract ID from an animator data handle.

Expects that handle is not AnimatorDataHandle::Null. Use animatorDataHandleGeneration() for extracting the generation and animatorDataHandle() for an inverse operation.

UnsignedInt Magnum::Ui::animatorDataHandleGeneration(AnimatorDataHandle handle) constexpr new in Git master

Extract generation from an animator data handle.

For AnimatorDataHandle::Null returns 0. A valid handle has always a non-zero generation. Use animatorDataHandleId() for extracting the ID and animatorDataHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, AnimationHandle value) new in Git master

Debug output operator.

AnimationHandle Magnum::Ui::animationHandle(AnimatorHandle animatorHandle, UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose an animation handle from an animator handle, an animator data ID and an animator data generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use animationHandleAnimator(), animationHandleId() and animationHandleGeneration() for an inverse operation.

AnimationHandle Magnum::Ui::animationHandle(AnimatorHandle animatorHandle, AnimatorDataHandle animatorDataHandle) constexpr new in Git master

Compose a animation handle from an animator handle and an animator data handle.

Use animationHandleAnimator() and animationHandleData() for the inverse operation.

AnimatorHandle Magnum::Ui::animationHandleAnimator(AnimationHandle handle) constexpr new in Git master

Extract animator handle from an animation handle.

Use animationHandleData() for extracting the animator data handle and animationHandle(AnimatorHandle, AnimatorDataHandle) for an inverse operation.

AnimatorDataHandle Magnum::Ui::animationHandleData(AnimationHandle handle) constexpr new in Git master

Extract animator data handle from an animation handle.

Use animationHandleAnimator() for extracting the animator handle and animationHandle(AnimatorHandle, AnimatorDataHandle) for an inverse operation.

UnsignedInt Magnum::Ui::animationHandleAnimatorId(AnimationHandle handle) constexpr new in Git master

Extract animator ID from an animation handle.

Expects that the animator portion of handle is not AnimatorHandle::Null. Use animationHandleAnimatorGeneration() for extracting the animator generation and animatorHandle() together with animationHandle() for an inverse operation.

UnsignedInt Magnum::Ui::animationHandleAnimatorGeneration(AnimationHandle handle) constexpr new in Git master

Extract animator generation from an animation handle.

If the animator portion of the handle is AnimatorHandle::Null, returns 0. A valid handle has always a non-zero generation. Use animationHandleAnimatorId() for extracting the ID and animatorHandle() together with animationHandle() for an inverse operation.

UnsignedInt Magnum::Ui::animationHandleId(AnimationHandle handle) constexpr new in Git master

Extract ID from an animation handle.

Expects that the data portion of handle is not AnimatorDataHandle::Null. Use animationHandleGeneration() for extracting the generation and animationHandle(AnimatorHandle, UnsignedInt, UnsignedInt) for an inverse operation.

UnsignedInt Magnum::Ui::animationHandleGeneration(AnimationHandle handle) constexpr new in Git master

Extract generation from an animation handle.

If the animator data portion of the handle is AnimatorDataHandle::Null, returns 0. A valid handle has always a non-zero generation. Use animationHandleId() for extracting the ID and animationHandle(AnimatorHandle, UnsignedInt, UnsignedInt) for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, InputStyle value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, LabelStyle value) new in Git master

Debug output operator.

Anchor Magnum::Ui::label(const Anchor& anchor, Icon icon, LabelStyle style = LabelStyle::Default) new in Git master

Stateless icon label widget.

Parameters
anchor Positioning anchor
icon Label icon. Passing Icon::None makes the label empty.
style Label style
Returns The anchor verbatim

Compared to Label::Label(const Anchor&, Icon, LabelStyle) this creates a stateless label that doesn't have any class instance that would need to be kept in scope and eventually destructed, making it more lightweight. As a consequence it can't have its style, icon or text subsequently changed and is removed only when the node or its parent get removed.

Anchor Magnum::Ui::label(const Anchor& anchor, Containers::StringView text, const TextProperties& textProperties, LabelStyle style = LabelStyle::Default) new in Git master

Stateless text label widget.

Parameters
anchor Positioning anchor
text Label text. Passing an empty string makes the label empty.
textProperties Text shaping and layouting properties
style Label style
Returns The anchor verbatim

Compared to Label::Label(const Anchor&, Containers::StringView, const TextProperties&, LabelStyle) this creates a stateless label that doesn't have any class instance that would need to be kept in scope and eventually destructed, making it more lightweight. As a consequence it can't have its style, icon or text subsequently changed and is removed only when the node or its parent get removed.

Anchor Magnum::Ui::label(const Anchor& anchor, Containers::StringView text, LabelStyle style = LabelStyle::Default)

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

Debug& Magnum::Ui::operator<<(Debug& debug, NodeFlag value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, NodeFlags value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, RendererGL::Flag value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, RendererGL::Flags value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, Snap value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, Snaps value) new in Git master

Debug output operator.

AbstractAnchor Magnum::Ui::snap(AbstractUserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, const Vector2& size, NodeFlags flags = {}) new in Git master

Create a node layouted with SnapLayouter.

Parameters
ui User interface instance
layouter Layouter instance
snap How to snap the layout
target Target to which to snap the layout
size Desired node size
flags Flags to create the node with
Returns Anchor containing the new node and associated layout

If target is NodeHandle::Null, creates a root node and interprets snap relative to the whole user interface, with it implicitly treated as if Snap::Inside was included.

If target is not null, it's expected to be valid. Then, if snap is inside of the node, the target is used as a parent of the newly created node. Otherwise, the parent of target is used as a parent of the newly created node. If target is a root node, the newly created node is made as a root node as well.

The size is ignored in horizontal / vertical direction if the layout is snapped to the whole width / height of the target node. Calls AbstractUserInterface::createNode() and AbstractLayouter::add() internally.

Use AbstractSnapLayout if you want to layout multiple nodes relative to each other.

Anchor Magnum::Ui::snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, 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.

Anchor Magnum::Ui::snap(UserInterface& ui, Snaps snap, NodeHandle target, const Vector2& size, NodeFlags flags = {}) new in Git master

Create a node layouted with the default SnapLayouter.

Delegates into snap(UserInterface&, SnapLayouter&, Snaps, NodeHandle, const Vector2&, NodeFlags) with the instance coming from UserInterface::snapLayouter().

AbstractAnchor Magnum::Ui::snap(AbstractUserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) new in Git master

Create a node layouted with SnapLayouter with custom offset.

Compared to snap(AbstractUserInterface&, SnapLayouter&, Snaps, NodeHandle, const Vector2&, NodeFlags) the offset is added to the offset calculated by the layout.

Anchor Magnum::Ui::snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, NodeHandle target, 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.

Anchor Magnum::Ui::snap(UserInterface& ui, Snaps snap, NodeHandle target, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) new in Git master

Create a node layouted with the default SnapLayouter with custom offset.

Delegates into snap(UserInterface&, SnapLayouter&, Snaps, NodeHandle, const Vector2&, const Vector2&, NodeFlags) with the instance coming from UserInterface::snapLayouter().

Anchor Magnum::Ui::snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, 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.

Anchor Magnum::Ui::snap(UserInterface& ui, Snaps snap, const Vector2& size, NodeFlags flags = {}) new in Git master

Create a root node layouted with the default SnapLayouter.

Delegates into snap(UserInterface&, SnapLayouter&, Snaps, const Vector2&, NodeFlags) with the instance coming from UserInterface::snapLayouter().

AbstractAnchor Magnum::Ui::snap(AbstractUserInterface& ui, SnapLayouter& layouter, Snaps snap, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) new in Git master

Create a root node layouted with SnapLayouter with custom offset.

Compared to snap(AbstractUserInterface&, SnapLayouter&, Snaps, const Vector2&, NodeFlags) the offset is added to the offset calculated by the layout.

Anchor Magnum::Ui::snap(UserInterface& ui, SnapLayouter& layouter, Snaps snap, 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.

Anchor Magnum::Ui::snap(UserInterface& ui, Snaps snap, const Vector2& offset, const Vector2& size, NodeFlags flags = {}) new in Git master

Create a root node layouted with the default SnapLayouter with custom offset.

Delegates into snap(UserInterface&, SnapLayouter&, Snaps, const Vector2&, const Vector2&, NodeFlags) with the instance coming from UserInterface::snapLayouter().

Debug& Magnum::Ui::operator<<(Debug& debug, Icon value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, FontHandle value) new in Git master

Debug output operator.

FontHandle Magnum::Ui::fontHandle(UnsignedInt id, UnsignedInt generation) constexpr new in Git master

Compose a font handle from an ID and a generation.

Expects that the ID fits into 20 bits and the generation into 12 bits. Use fontHandleId() and fontHandleGeneration() for an inverse operation.

UnsignedInt Magnum::Ui::fontHandleId(FontHandle handle) constexpr new in Git master

Extract ID from a font handle.

Expects that handle is not FontHandle::Null. Use fontHandleGeneration() for extracting the generation and fontHandle() for an inverse operation.

UnsignedInt Magnum::Ui::fontHandleGeneration(FontHandle handle) constexpr new in Git master

Extract generation from a font handle.

For FontHandle::Null returns 0. A valid handle has always a non-zero generation. Use fontHandleId() for extracting the ID and fontHandle() for an inverse operation.

Debug& Magnum::Ui::operator<<(Debug& debug, TextDataFlag value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, TextDataFlags value) new in Git master

Debug output operator.

Debug& Magnum::Ui::operator<<(Debug& debug, TextEdit value) new in Git master

Debug output operator.