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

Lapis Theme. More...

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. More...
 
virtual DefaultDim default_border () const
 Get the default border width. More...
 
virtual float default_border_radius () const
 Get the default border radius. More...
 
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={}) const
 Draw a box specifying the properties directly. More...
 
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. More...
 
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. More...
 
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. More...
 
Fontfont ()
 Get a reference to the theme Font. More...
 
const Fontfont () const
 Get a const reference to the theme Font. More...
 
void font (const Font &font)
 Set the theme Font. More...
 
EGT_NODISCARD const std::string & name () const
 Get the name of the Object. More...
 
void name (const std::string &name)
 Set the name of the Object. More...
 
Themeoperator= (const Theme &)=default
 
Themeoperator= (Theme &&) noexcept=default
 
Palettepalette ()
 Get a reference to the theme Palette. More...
 
const Palettepalette () const
 Get a const reference to the theme Palette. More...
 
void palette (const Palette &palette)
 Set the theme palette. More...
 

Protected Member Functions

void init_palette () override
 Setup for initializing the palette. More...
 
- Protected Member Functions inherited from Theme
 Theme (const std::string &name)
 
virtual void init_draw ()
 Setup for initializing drawing. More...
 
virtual void init_font ()
 Setup for initializing the font. More...
 
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. More...
 
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. More...
 
- Protected Attributes inherited from Theme
Font m_font
 Default font instance used by the theme. More...
 
std::string m_name
 A user defined name for the Object. More...
 
Palette m_palette
 Palette instance used by the theme. More...
 

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.