Layers 2.0 is archived. The latest version is 3.0. Read the 3.0 docs

LLink Class

#include <Layers/llink.h>

Public Functions

LLink(const LString & path, const LString & relative_path = "")
LLink(LAttribute * attribute)
LLink(const LLink & l)
~LLink()
LAttribute * attribute()
LString path()
LString relative_path()
bool resolve(LAttribute * attr)
LAttribute * resolve(LStyle * context)

Detailed Description

Represents a link between attributes in the Layers theme framework.

Links allow attributes to reference other attributes, enabling theme inheritance and value sharing. Links can be absolute (referencing a full path) or relative (resolved within a style context).

Member Function Documentation

LAttribute * attribute()

Returns the attribute this link points to.

Returns nullptr if the link has not been resolved.

LString path()

Returns the absolute path of the link target.

LString relative_path()

Returns the relative path component of this link.

Returns an empty string for absolute links.

bool resolve(LAttribute * attr)

Resolves this link to point to the given attribute.

Returns true if the link was successfully resolved.

LAttribute * resolve(LStyle * context)

Resolves a relative link within the given style context.

Returns the resolved attribute, or nullptr if resolution fails.

Appearance
Theme
—