Union Namespace

Header: #include <Union>
CMake: find_package(Union REQUIRED)
target_link_libraries(mytarget PRIVATE Union::Union)

Namespaces

namespace Properties

Classes

class Color
class Element
class ElementQuery
class InputPlugin
class LruCache
class PluginRegistry
class Selector
class SelectorList
class StyleRule
class Theme
class ThemeLoader
class ThemeRegistry

Types

ElementList
enum class SelectorType { Empty, Type, Id, State, ColorSet, …, AllOf }

Functions

std::size_t elementListCacheKey(const Union::ElementList &key, std::size_t seed = 0)

Detailed Description

All public C++ types for the Union library.

Namespaces

namespace Union::Properties

Flags and enums used by property classes.

Classes

class Color

A class that represents a color that can be provided from different sources. More...

class Element

An element in a tree of elements that is used to match StyleRules. More...

class ElementQuery

A class encapsulating lookup of style properties based on a list of elements. More...

class InputPlugin

Abstract base class for plugins providing input data. More...

class LruCache

A simple least-recently-used cache template. More...

class PluginRegistry

Template class to simplify looking up and loading plugins. More...

class Selector

A class to handle matching some data to an element. More...

class SelectorList

A list of Union::Selector. More...

class StyleRule

A set of style properties that should be applied to a certain set of elements. More...

class Theme

A collection of StyleRule instances. More...

class ThemeLoader

An interface that is used by Theme to allow input plugins to load style rules. More...

class ThemeRegistry

A class to load and keep track of Theme instances. More...

Type Documentation

[alias] ElementList

A list of elements.

enum class SelectorType

The type of selector.

ConstantValueDescription
Union::Selector::SelectorType::Empty0An empty selector, which does nothing.
Union::Selector::SelectorType::Type1A selector matching on the type property. Checks if the specified string is equal to that of the property.
Union::Selector::SelectorType::Id2A selector matching on the id property. Checks if the specified string is equal to that of the property.
Union::Selector::SelectorType::State3A selector matching on the state property. Checks if the specified state is set in the property.
Union::Selector::SelectorType::ColorSet4 
Union::Selector::SelectorType::Hint5 
Union::Selector::SelectorType::Attribute?A selector matching on an attribute in the attributes property. Checks if the value of the attribute matches the specified value.
Union::Selector::SelectorType::AnyElement9A selector that matches anything. Note that this has a low weight and most other selectors will override it.
Union::Selector::SelectorType::AnyOf?A selector that will match if any of the specified selectors match.
Union::Selector::SelectorType::AllOf?A selector that will match only if all of the specified selectors match.

Function Documentation

std::size_t elementListCacheKey(const Union::ElementList &key, std::size_t seed = 0)

Get a cache key for an ElementList.