stmm-games-doc  0.32.0
Public Member Functions | Protected Member Functions | List of all members
stmg::StdThemeDrawingContext Class Reference

The tile drawing context. More...

Public Member Functions

 StdThemeDrawingContext (Theme::RuntimeVariablesEnv *p0RuntimeVariablesEnv) noexcept
 Constructor. More...
 
NSize getTileSize () const noexcept
 The tile size. More...
 
const Glib::RefPtr< Pango::Context > & getFontContext () noexcept
 The font layout. More...
 
ImagegetSelectedImage () noexcept
 The selected (context) image. More...
 
void setSelectedImage (Image *p0Image) noexcept
 Set selected (context) image. More...
 
std::pair< bool, int32_t > getVariableValue (int32_t nVarId) noexcept
 Get variable value. More...
 

Protected Member Functions

void reInit (Theme::RuntimeVariablesEnv *p0RuntimeVariablesEnv) noexcept
 

Detailed Description

The tile drawing context.

Used to draw Modifiers.

Constructor & Destructor Documentation

◆ StdThemeDrawingContext()

stmg::StdThemeDrawingContext::StdThemeDrawingContext ( Theme::RuntimeVariablesEnv p0RuntimeVariablesEnv)
noexcept

Constructor.

Parameters
p0RuntimeVariablesEnvCan be null.

Member Function Documentation

◆ getFontContext()

const Glib::RefPtr<Pango::Context>& stmg::StdThemeDrawingContext::getFontContext ( )
noexcept

The font layout.

Returns
The pango layout.

◆ getSelectedImage()

Image* stmg::StdThemeDrawingContext::getSelectedImage ( )
noexcept

The selected (context) image.

Returns
The selected image. Can be null.

◆ getTileSize()

NSize stmg::StdThemeDrawingContext::getTileSize ( ) const
noexcept

The tile size.

Returns
The size of the tile.

◆ getVariableValue()

std::pair<bool, int32_t> stmg::StdThemeDrawingContext::getVariableValue ( int32_t  nVarId)
noexcept

Get variable value.

Parameters
nVarIdThe variable id as returned from StdTheme::getVariablesIndex().
Returns
Whether it is defined and the current value.

◆ reInit()

void stmg::StdThemeDrawingContext::reInit ( Theme::RuntimeVariablesEnv p0RuntimeVariablesEnv)
protectednoexcept

◆ setSelectedImage()

void stmg::StdThemeDrawingContext::setSelectedImage ( Image p0Image)
noexcept

Set selected (context) image.

Parameters
p0ImageThe selected image. Can be null.