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 LruImageCache
class PlatformPlugin
class PluginRegistry
class Selector
class SelectorList
class Style
class StyleLoader
class StyleRegistry
class StyleRule

Types

ElementList
enum class SelectorType { Empty, Type, Id, State, Hint, …, DescendantCombinator }

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 LruImageCache

An adaptation of LruCache for caching images. More...

class PlatformPlugin

Abstract base class for plugins providing platform integration. 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 Style

A collection of StyleRule instances. More...

class StyleLoader

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

class StyleRegistry

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

class StyleRule

A set of style properties that should be applied to a certain set of elements. 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::Hint4A selector matching on the hints property. Checks if the specified string matches any of the hints set in the property.
Union::Selector::SelectorType::AttributeExists5A selector matching on an attribute in the attributes property. Checks if the provided attribute name exists in the property.
Union::Selector::SelectorType::AttributeEquals6A selector matching on an attribute in the attributes property. Checks if the provided attribute's value is the same as the property's value.
Union::Selector::SelectorType::AttributeSubstringMatch7A selector matching on an attribute in the attributes property. Checks if the provided attribute's value is a substring match of the property's value.
Union::Selector::SelectorType::AnyElement8A selector that matches anything. Note that this has a low weight and most other selectors will override it.
Union::Selector::SelectorType::ChildCombinator9A combinator that will match if the element is a direct child of the parent.
Union::Selector::SelectorType::DescendantCombinator10A combinator that will match if the element is a descendant at any level of the parent.

Function Documentation

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

Get a cache key for an ElementList.