API Documentation
Public Member Functions | Static Public Member Functions | List of all members
nkWinUi::Theme Class Referencefinal

A theme used to style the windows in the component. More...

Public Member Functions

 Theme () noexcept
 
nkMemory::StringView getName () const
 
const ThemeColorsgetColors () const
 
ThemeColorsgetColors ()
 
void setName (nkMemory::StringView name)
 

Static Public Member Functions

static nkMemory::UniquePtr< Themecreate (System *system=nullptr)
 

Detailed Description

A theme used to style the windows in the component.

Constructor & Destructor Documentation

◆ Theme()

nkWinUi::Theme::Theme ( )
noexcept

Constructor.

Member Function Documentation

◆ getName()

nkMemory::StringView nkWinUi::Theme::getName ( ) const
Returns
The name attached to the theme.

◆ getColors() [1/2]

const ThemeColors& nkWinUi::Theme::getColors ( ) const
Returns
The colors attached to the theme (const).

◆ getColors() [2/2]

ThemeColors& nkWinUi::Theme::getColors ( )
Returns
The colors attached to the theme. Can be edited to alter the colors.

◆ setName()

void nkWinUi::Theme::setName ( nkMemory::StringView  name)

Sets the name of the theme. Used internally by the ThemeManager.

Parameters
nameThe name to set.

◆ create()

static nkMemory::UniquePtr<Theme> nkWinUi::Theme::create ( System system = nullptr)
static

Creates a standalone resource, linking it to a system, but no manager. This method can be used to allocate a resource and manually manage its lifetime.

Parameters
systemThe system to create the resource into. If left to nullptr, then the Singleton instance will be used.
Returns
The created resource instance.

The documentation for this class was generated from the following file: