Loading...
Searching...
No Matches
ml::AnchorManager Class Reference

#include <Malena/Layout/AnchorManager.h>

Static Public Member Functions

static std::size_t anchoredCount ()
 Number of objects with at least one anchor (test/introspection helper).
static void clear (Positionable *owner)
 Drop all of owner's anchors (the unanchored() opt-out).
static bool hasAnchors (const Positionable *owner)
 True if owner currently has any retained anchor.
static void recordBaseline (Positionable *owner)
static void release (const Positionable *owner)
static void set (Positionable *owner, AnchorOp op, const Positionable *ref, float spacing)
static void solveAll ()

Detailed Description

Definition at line 28 of file AnchorManager.h.

Member Function Documentation

◆ anchoredCount()

std::size_t ml::AnchorManager::anchoredCount ( )
static

Number of objects with at least one anchor (test/introspection helper).

◆ clear()

void ml::AnchorManager::clear ( Positionable * owner)
static

Drop all of owner's anchors (the unanchored() opt-out).

◆ hasAnchors()

bool ml::AnchorManager::hasAnchors ( const Positionable * owner)
static

True if owner currently has any retained anchor.

◆ recordBaseline()

void ml::AnchorManager::recordBaseline ( Positionable * owner)
static

Snapshot owner's current position as the baseline for external-move detection. Called right after a verb applies its op immediately.

◆ release()

void ml::AnchorManager::release ( const Positionable * owner)
static

Remove owner's own anchors AND scrub any anchor (in any object) that references it. Called from ~Positionable so a destroyed object is never solved against or dangled.

◆ set()

void ml::AnchorManager::set ( Positionable * owner,
AnchorOp op,
const Positionable * ref,
float spacing )
static

Record/replace a retained anchor for owner. ref == nullptr anchors to the window. An op replaces any existing anchor with the same op, so repeated fill() calls don't accumulate.

◆ solveAll()

void ml::AnchorManager::solveAll ( )
static

Re-solve every anchored object (called on window resize). Detaches externally-moved objects first, then iterates to a fixpoint.


The documentation for this class was generated from the following file: