1.10
Public Member Functions | Protected Member Functions | List of all members
LapisTheme Class Reference

Lapis Theme. More...

#include <lapis.h>

Inheritance diagram for LapisTheme:
Inheritance graph
[legend]

Public Member Functions

 LapisTheme ()
 
 ~LapisTheme ()=default
 
- Public Member Functions inherited from Theme
 Theme ()
 
 Theme (const Theme &)=default
 
 Theme (Theme &&) noexcept=default
 
virtual ~Theme () noexcept=default
 
virtual void apply ()
 Apply the Theme.
 
virtual DefaultDim default_border () const
 Get the default border width.
 
virtual float default_border_radius () const
 Get the default border radius.
 
virtual void draw_box (Painter &painter, const FillFlags &type, const Rect &rect, const Pattern &border, const Pattern &bg, DefaultDim border_width=0, DefaultDim margin_width=0, float border_radius=0.0, const BorderFlags &border_flags={}, Image *background=nullptr) const
 Draw a box specifying the properties directly.
 
virtual void draw_box (Painter &painter, const Widget &widget, Palette::ColorId bg, Palette::ColorId border) const
 Draw a box using properties directly from the widget.
 
virtual void draw_circle (Painter &painter, const FillFlags &type, const Rect &rect, const Pattern &border, const Pattern &bg, DefaultDim border_width=0, DefaultDim margin_width=0) const
 Draw a circle specifying the properties directly.
 
virtual void draw_circle (Painter &painter, const Widget &widget, Palette::ColorId bg, Palette::ColorId border) const
 Draw a circle using properties directly from the widget.
 
Fontfont ()
 Get a reference to the theme Font.
 
const Fontfont () const
 Get a const reference to the theme Font.
 
void font (const Font &font)
 Set the theme Font.
 
EGT_NODISCARD const std::string & name () const
 Get the name of the Object.
 
void name (const std::string &name)
 Set the name of the Object.
 
Themeoperator= (const Theme &)=default
 
Themeoperator= (Theme &&) noexcept=default
 
Palettepalette ()
 Get a reference to the theme Palette.
 
const Palettepalette () const
 Get a const reference to the theme Palette.
 
void palette (const Palette &palette)
 Set the theme palette.
 

Protected Member Functions

void init_palette () override
 Setup for initializing the palette.
 
- Protected Member Functions inherited from Theme
 Theme (const std::string &name)
 
virtual void init_draw ()
 Setup for initializing drawing.
 
virtual void init_font ()
 Setup for initializing the font.
 
void rounded_box (Painter &painter, const Rect &box, float border_radius) const
 
virtual void rounded_box (Painter &painter, const RectF &box, float border_radius) const
 

Additional Inherited Members

- Public Types inherited from Theme
enum class  BorderFlag : uint32_t {
  top = detail::bit(0) , right = detail::bit(1) , bottom = detail::bit(2) , left = detail::bit(3) ,
  drop_shadow = detail::bit(4)
}
 Border flags allow, when drawing a rectangle, control over what sides of the rectangle are drawn. More...
 
using BorderFlags = Flags< BorderFlag >
 Border flags.
 
enum class  FillFlag : uint32_t { solid = detail::bit(0) , blend = detail::bit(1) }
 Fill flags are used to characterize how a widget's background and border should be drawn. More...
 
using FillFlags = Flags< FillFlag >
 Fill flags.
 
- Protected Attributes inherited from Theme
Font m_font
 Default font instance used by the theme.
 
std::string m_name
 A user defined name for the Object.
 
Palette m_palette
 Palette instance used by the theme.
 

Detailed Description

Lapis Theme.

Constructor & Destructor Documentation

◆ LapisTheme()

LapisTheme ( )
inline

◆ ~LapisTheme()

~LapisTheme ( )
default

Member Function Documentation

◆ init_palette()

void init_palette ( )
inlineoverrideprotectedvirtual

Setup for initializing the palette.

Called by apply().

Reimplemented from Theme.