Page Contents

Topics

Classes

Introduction to Layers

Layers is a C++ library that provides a framework for user-customizable application themes. Layers is built with the philosophy that users should have a say in how their applications look. It offers both developers and users more control over application aesthetics.

Theme Framework

Layers introduces a theme framework that combines flexibility with efficiency. It's a practical solution for developers looking to offer customizable themes in their applications, and for users eager to personalize their app experience.

Structured Theme Storage

  • Theme Directory: A theme is organized into a directory of files and sub-directories.
  • JSON-Based: Theme files are stored in JSON format.
  • Implementation Sets: An implementation set is a collection of theme files designed to implement the theme for specific applications. Sets are stored as sub-directories within the theme directory.

Customization Across Applications

  • Generalized Customization: Includes a general implementation set that allows for broad customization across different applications.
  • App-Specific Customization: Implementation sets can be defined for specific applications, allowing for highly targeted customization.

Versatile Attributes

  • What Are Attributes?: Attributes are the value containers in Layers. Each basic attribute has a name and a value.
  • Attribute Linking: An attribute can be linked to another attribute. In this case, it will use the value of the other attribute instead of its own.
  • Attribute Overriding: An attribute can be overridden by sub-attributes based on state-specific conditions, such as a fill color changing when a user hovers over a button.

Other Features

  • Efficient Loading: To save system resources, only the metadata for a theme is initially loaded. Implementation sets are loaded as needed.
  • Lineage Tracking: Themes maintain a record of their ancestor themes in their metadata. This feature may be useful in the future to aid in compatibility.