#include <SDOM_IFontObject.hpp>
|
virtual | ~IFontObject () override |
|
virtual bool | onInit ()=0 |
|
virtual void | onQuit ()=0 |
|
virtual void | onLoad ()=0 |
|
virtual void | onUnload ()=0 |
|
virtual void | create (const sol::table &config)=0 |
|
virtual void | drawGlyph (Uint32 ch, int x, int y, const FontStyle &style)=0 |
|
virtual void | drawPhrase (const std::string &str, int x, int y, const FontStyle &style)=0 |
|
virtual void | drawPhraseOutline (const std::string &str, int x, int y, const FontStyle &style)=0 |
|
virtual void | drawPhraseDropshadow (const std::string &str, int x, int y, const FontStyle &style)=0 |
|
virtual bool | getGlyphMetrics (Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance) const =0 |
|
virtual int | getGlyphHeight (Uint32 ch) const =0 |
|
virtual int | getGlyphWidth (Uint32 ch) const =0 |
|
virtual int | getFontAscent ()=0 |
|
virtual int | getFontSize ()=0 |
|
virtual void | setFontSize (int p_size)=0 |
|
virtual void | setFontStyle (const FontStyle &style)=0 |
|
virtual FontStyle | getFontStyle ()=0 |
|
int | getWordWidth (const std::string &word) const |
|
int | getWordHeight (const std::string &word) const |
|
int | getFontSize () const |
|
FontType | getFontType () const |
|
virtual bool | onUnitTest () override |
| Runs unit tests for this object.
|
|
const std::string & | getType () const |
|
const std::string & | getName () const |
|
const std::string & | getFilename () const |
|
bool | isInternal () const |
|
bool | isLoaded () const |
|
void | setType (const std::string &type) |
|
void | setName (const std::string &name) |
|
void | setFilename (const std::string &filename) |
|
template<typename T > |
T * | as () |
|
void | registerLuaBindings (const std::string &typeName, sol::state_view lua) |
|
|
static void | applyBitmapFontDefaults (class Factory &factory, const std::string &fontResourceName, int &outFontSize, int &outFontWidth, int &outFontHeight) |
|
template<typename T > |
static T | lua_value_case_insensitive (const sol::table &tbl, const std::string &key, const T &default_value) |
|
◆ FontType
Enumerator |
---|
Bitmap | |
Truetype | |
◆ IFontObject() [1/2]
SDOM::IFontObject::IFontObject |
( |
const InitStruct & |
init | ) |
|
|
protected |
◆ IFontObject() [2/2]
SDOM::IFontObject::IFontObject |
( |
const sol::table & |
config | ) |
|
|
protected |
◆ ~IFontObject()
SDOM::IFontObject::~IFontObject |
( |
| ) |
|
|
overridevirtual |
◆ _registerLuaBindings()
void SDOM::IFontObject::_registerLuaBindings |
( |
const std::string & |
typeName, |
|
|
sol::state_view |
lua |
|
) |
| |
|
protectedvirtual |
◆ applyBitmapFontDefaults()
void SDOM::IFontObject::applyBitmapFontDefaults |
( |
class Factory & |
factory, |
|
|
const std::string & |
fontResourceName, |
|
|
int & |
outFontSize, |
|
|
int & |
outFontWidth, |
|
|
int & |
outFontHeight |
|
) |
| |
|
static |
◆ as()
template<typename T >
T * SDOM::IAssetObject::as |
( |
| ) |
|
|
inlineinherited |
◆ create()
virtual void SDOM::IFontObject::create |
( |
const sol::table & |
config | ) |
|
|
pure virtual |
◆ drawGlyph()
virtual void SDOM::IFontObject::drawGlyph |
( |
Uint32 |
ch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
pure virtual |
◆ drawPhrase()
virtual void SDOM::IFontObject::drawPhrase |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
pure virtual |
◆ drawPhraseDropshadow()
virtual void SDOM::IFontObject::drawPhraseDropshadow |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
pure virtual |
◆ drawPhraseOutline()
virtual void SDOM::IFontObject::drawPhraseOutline |
( |
const std::string & |
str, |
|
|
int |
x, |
|
|
int |
y, |
|
|
const FontStyle & |
style |
|
) |
| |
|
pure virtual |
◆ getFilename()
const std::string & SDOM::IAssetObject::getFilename |
( |
| ) |
const |
|
inlineinherited |
◆ getFontAscent()
virtual int SDOM::IFontObject::getFontAscent |
( |
| ) |
|
|
pure virtual |
◆ getFontSize() [1/2]
int SDOM::IFontObject::getFontSize |
( |
| ) |
const |
|
inline |
◆ getFontSize() [2/2]
virtual int SDOM::IFontObject::getFontSize |
( |
| ) |
|
|
pure virtual |
◆ getFontStyle()
virtual FontStyle SDOM::IFontObject::getFontStyle |
( |
| ) |
|
|
pure virtual |
◆ getFontType()
FontType SDOM::IFontObject::getFontType |
( |
| ) |
const |
|
inline |
◆ getGlyphHeight()
virtual int SDOM::IFontObject::getGlyphHeight |
( |
Uint32 |
ch | ) |
const |
|
pure virtual |
◆ getGlyphMetrics()
virtual bool SDOM::IFontObject::getGlyphMetrics |
( |
Uint32 |
ch, |
|
|
int * |
minx, |
|
|
int * |
maxx, |
|
|
int * |
miny, |
|
|
int * |
maxy, |
|
|
int * |
advance |
|
) |
| const |
|
pure virtual |
◆ getGlyphWidth()
virtual int SDOM::IFontObject::getGlyphWidth |
( |
Uint32 |
ch | ) |
const |
|
pure virtual |
◆ getName()
const std::string & SDOM::IAssetObject::getName |
( |
| ) |
const |
|
inlineinherited |
◆ getType()
const std::string & SDOM::IAssetObject::getType |
( |
| ) |
const |
|
inlineinherited |
◆ getWordHeight()
int SDOM::IFontObject::getWordHeight |
( |
const std::string & |
word | ) |
const |
◆ getWordWidth()
int SDOM::IFontObject::getWordWidth |
( |
const std::string & |
word | ) |
const |
◆ isInternal()
bool SDOM::IAssetObject::isInternal |
( |
| ) |
const |
|
inlineinherited |
◆ isLoaded()
bool SDOM::IAssetObject::isLoaded |
( |
| ) |
const |
|
inlineinherited |
◆ lua_value_case_insensitive()
template<typename T >
static T SDOM::IDataObject::lua_value_case_insensitive |
( |
const sol::table & |
tbl, |
|
|
const std::string & |
key, |
|
|
const T & |
default_value |
|
) |
| |
|
inlinestaticinherited |
◆ onInit()
virtual bool SDOM::IFontObject::onInit |
( |
| ) |
|
|
pure virtual |
◆ onLoad()
virtual void SDOM::IFontObject::onLoad |
( |
| ) |
|
|
pure virtual |
◆ onQuit()
virtual void SDOM::IFontObject::onQuit |
( |
| ) |
|
|
pure virtual |
◆ onUnitTest()
virtual bool SDOM::IAssetObject::onUnitTest |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ onUnload()
virtual void SDOM::IFontObject::onUnload |
( |
| ) |
|
|
pure virtual |
◆ registerLuaBindings()
void SDOM::IDataObject::registerLuaBindings |
( |
const std::string & |
typeName, |
|
|
sol::state_view |
lua |
|
) |
| |
|
inlineinherited |
◆ setFilename()
void SDOM::IAssetObject::setFilename |
( |
const std::string & |
filename | ) |
|
|
inlineinherited |
◆ setFontSize()
virtual void SDOM::IFontObject::setFontSize |
( |
int |
p_size | ) |
|
|
pure virtual |
◆ setFontStyle()
virtual void SDOM::IFontObject::setFontStyle |
( |
const FontStyle & |
style | ) |
|
|
pure virtual |
◆ setName()
void SDOM::IAssetObject::setName |
( |
const std::string & |
name | ) |
|
|
inlineinherited |
◆ setType()
void SDOM::IAssetObject::setType |
( |
const std::string & |
type | ) |
|
|
inlineinherited |
◆ Core
friend SDOM::IFontObject::Core |
|
protected |
◆ Factory
friend SDOM::IFontObject::Factory |
|
protected |
◆ filename_
std::string SDOM::IAssetObject::filename_ |
|
protectedinherited |
◆ fontSize_
int SDOM::IFontObject::fontSize_ = 8 |
|
protected |
◆ fontType_
◆ FontTypeToString
std::unordered_map<FontType, std::string> SDOM::IFontObject::FontTypeToString |
|
inlinestatic |
◆ isInternal_
bool SDOM::IAssetObject::isInternal_ |
|
protectedinherited |
◆ isLoaded_
bool SDOM::IAssetObject::isLoaded_ = false |
|
protectedinherited |
◆ name_
std::string SDOM::IAssetObject::name_ |
|
protectedinherited |
◆ objHandleType_
sol::usertype<IAssetObject> SDOM::IAssetObject::objHandleType_ |
|
protectedinherited |
◆ StringToFontType
std::unordered_map<std::string, FontType> SDOM::IFontObject::StringToFontType |
|
inlinestatic |
◆ type_
std::string SDOM::IAssetObject::type_ |
|
protectedinherited |
◆ TypeName
constexpr const char* SDOM::IFontObject::TypeName = "IFontObject" |
|
staticconstexpr |
The documentation for this class was generated from the following files: