LLink Class
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
LLink(const LString & path, const LString & relative_path = "")
Constructs a link with an absolute or relative path.
The path parameter specifies the target attribute. If relative_path is provided, the link is resolved relative to a style context.
LLink(LAttribute * attribute)
Constructs a link directly to an attribute.
LLink(const LLink & l)
Copy constructor.
~LLink()
No description available.
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.