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

Creates theme animation that draws the text to fit in a rectangle. More...

Inheritance diagram for stmg::PlainTextThAniFactory:
Inheritance graph
[legend]

Public Member Functions

 PlainTextThAniFactory (StdTheme *p1Owner, bool bCenter, const TileColor &oColor, const TileAlpha &oAlpha, const TileFont &oFont, bool bFadeInIsFactor, double fFadeIn, bool bFadeOutIsFactor, double fFadeOut) noexcept
 
bool supports (const shared_ptr< LevelAnimation > &refLevelAnimation) noexcept override
 Tells whether the factory supports the model animation. More...
 
shared_ptr< ThemeAnimationcreate (const shared_ptr< StdThemeContext > &refThemeContext, const shared_ptr< LevelAnimation > &refLevelAnimation) noexcept override
 Creates a theme animation for a level animation. More...
 
- Public Member Functions inherited from stmg::StdThemeAnimationFactory
virtual ~StdThemeAnimationFactory () noexcept=default
 
 StdThemeAnimationFactory (StdTheme *p1Owner) noexcept
 Constructor. More...
 
virtual void clearOwner () noexcept
 Clears the owner passed in the constructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from stmg::StdThemeAnimationFactory
StdThemeowner () noexcept
 The owner. More...
 
const StdThemeowner () const noexcept
 The owner. More...
 

Detailed Description

Creates theme animation that draws the text to fit in a rectangle.

Constructor & Destructor Documentation

◆ PlainTextThAniFactory()

stmg::PlainTextThAniFactory::PlainTextThAniFactory ( StdTheme p1Owner,
bool  bCenter,
const TileColor oColor,
const TileAlpha oAlpha,
const TileFont oFont,
bool  bFadeInIsFactor,
double  fFadeIn,
bool  bFadeOutIsFactor,
double  fFadeOut 
)
noexcept

Member Function Documentation

◆ create()

shared_ptr<ThemeAnimation> stmg::PlainTextThAniFactory::create ( const shared_ptr< StdThemeContext > &  refThemeContext,
const shared_ptr< LevelAnimation > &  refLevelAnimation 
)
overridevirtualnoexcept

Creates a theme animation for a level animation.

The creation may fail even if supports() returns true.

Parameters
refThemeContextThe theme context. Cannot be null.
refLevelAnimationThe model. Cannot be null.
Returns
The new theme animation instance or null if failed.

Implements stmg::StdThemeAnimationFactory.

◆ supports()

bool stmg::PlainTextThAniFactory::supports ( const shared_ptr< LevelAnimation > &  refLevelAnimation)
overridevirtualnoexcept

Tells whether the factory supports the model animation.

Tells whether the class of the model (not the actual model instance) is supported.

Parameters
refLevelAnimationThe level animation (the model). Cannot be null.
Returns
Whether the factory can create a theme animation for the model class.

Implements stmg::StdThemeAnimationFactory.