Skip to main content

Module theme

Module theme 

Source
Expand description

Theme API and sample implementations

Widgets expect the theme to provide an implementation of SizeCx and of DrawCx.

Launching a UI requires a Theme. Two implementations are provided here: SimpleTheme and FlatTheme. An adapter, MultiTheme, is also provided.

Structs§

Colors
Provides standard theme colours
DrawCx
Draw interface
FlatTheme
A theme with flat (unshaded) rendering
InputState
Input and highlighting state of a widget
MultiTheme
Run-time switching support for pre-loaded themes
SimpleTheme
A simple theme
SizeCx
Size and scaling interface
Text
Text type-setting object (theme aware)

Enums§

Background
Optional background colour
Feature
Various features which may be sized and drawn
FrameStyle
Style of a frame
MarginStyle
Margin size
MarkStyle
Style of marks
SelectionStyle
Selection style hint
TextClass
Font “class” selector

Traits§

Theme
A theme provides widget sizing and drawing implementations.
ThemeDst
As Theme, but without associated types
Window
Per-window storage for the theme

Type Aliases§

ColorsLinear
Colors parameterised for graphics usage
ColorsSrgb
Colors parameterised for reading and writing using sRGB