![]() |
R-Type
2
Doom but in better
|
Manages font entities in the GUI ECS. More...
#include <Font.hpp>
Public Member Functions | |
Font () | |
Default constructor. | |
Font (const std::uint32_t entityId) | |
Constructs a Font entity with a specified entity ID. | |
Font (const GUI::ECS::Systems::Font &other) | |
Copy constructor. | |
Font (const std::string &name, const std::string &path) | |
Constructs a Font with a name and file path. | |
Font (const std::string &name, const std::string &path, const unsigned int size) | |
Constructs a Font with a name, file path, and default size. | |
Font (const std::string &name, const std::string &path, const unsigned int size, const std::string &application) | |
Constructs a Font with additional application context. | |
Font (const std::string &name, const std::string &path, const unsigned int size, const std::string &application, const bool bold) | |
Constructs a Font with bold property. | |
Font (const std::string &name, const std::string &path, const unsigned int size, const std::string &application, const bool bold, const bool italic) | |
Constructs a Font with bold and italic properties. | |
Font (const std::uint32_t entityId, const std::string &name, const std::string &path) | |
Constructs a Font with a name and file path. | |
Font (const std::uint32_t entityId, const std::string &name, const std::string &path, const unsigned int size) | |
Constructs a Font with a name, file path, and default size. | |
Font (const std::uint32_t entityId, const std::string &name, const std::string &path, const unsigned int size, const std::string &application) | |
Constructs a Font with additional application context. | |
Font (const std::uint32_t entityId, const std::string &name, const std::string &path, const unsigned int size, const std::string &application, const bool bold) | |
Constructs a Font with bold property. | |
Font (const std::uint32_t entityId, const std::string &name, const std::string &path, const unsigned int size, const std::string &application, const bool bold, const bool italic) | |
Constructs a Font with bold and italic properties. | |
~Font () | |
Destructor. | |
void | setBold (const bool bold) |
Sets the bold property of the font. | |
void | setItalic (const bool italic) |
Sets the italic property of the font. | |
void | setFontName (const std::string &name) |
Sets the font name. | |
void | setFontPath (const std::string &path) |
Sets the file path of the font and loads it. | |
void | setFontDefaultSize (const unsigned int size) |
Sets the default size of the font. | |
void | setFontApplication (const std::string application) |
Sets the application or context for the font. | |
const bool | isBold () const |
Checks if the font is bold. | |
const bool | isItalic () const |
Checks if the font is italic. | |
const std::string | getFontName () const |
Retrieves the font name. | |
const std::string | getFontPath () const |
Retrieves the file path of the font. | |
const std::string | getApplication () const |
Retrieves the application context of the font. | |
const unsigned int | getDefaultSize () const |
Retrieves the default size of the font. | |
const std::any | getFontInstance () const |
Retrieves the font instance. | |
const std::string | getInfo (const unsigned int indent=0) const |
This is a function meant for debugging purposes It will dump the current state of the variables upon call. It will dump them for itself and any of it's underlying classes. | |
void | update (const GUI::ECS::Systems::Font ©) |
Updates the font with properties from another font. | |
const bool | isLoaded () const |
Checks if the font instance is loaded. | |
GUI::ECS::Systems::Font & | operator= (const GUI::ECS::Systems::Font ©) |
Assignment operator. | |
![]() | |
EntityNode (const size_t entityId=0) | |
virtual | ~EntityNode ()=default |
virtual size_t | getEntityNodeId () const |
Additional Inherited Members | |
![]() | |
size_t | _entityID |
Manages font entities in the GUI ECS.
The Font class provides functionality to load, configure, and manage fonts for use in the GUI system. It supports various font properties such as bold, italic, size, and application-specific settings.
GUI::ECS::Systems::Font::Font | ( | ) |
GUI::ECS::Systems::Font::Font | ( | const std::uint32_t | entityId | ) |
GUI::ECS::Systems::Font::Font | ( | const GUI::ECS::Systems::Font & | other | ) |
GUI::ECS::Systems::Font::Font | ( | const std::string & | name, |
const std::string & | path ) |
GUI::ECS::Systems::Font::Font | ( | const std::string & | name, |
const std::string & | path, | ||
const unsigned int | size ) |
GUI::ECS::Systems::Font::Font | ( | const std::string & | name, |
const std::string & | path, | ||
const unsigned int | size, | ||
const std::string & | application ) |
GUI::ECS::Systems::Font::Font | ( | const std::string & | name, |
const std::string & | path, | ||
const unsigned int | size, | ||
const std::string & | application, | ||
const bool | bold ) |
GUI::ECS::Systems::Font::Font | ( | const std::string & | name, |
const std::string & | path, | ||
const unsigned int | size, | ||
const std::string & | application, | ||
const bool | bold, | ||
const bool | italic ) |
Constructs a Font with bold and italic properties.
name | The name of the font. |
path | The file path to the font. |
size | The default size of the font. |
application | The application or context of the font. |
bold | Whether the font is bold. |
italic | Whether the font is italic. |
GUI::ECS::Systems::Font::Font | ( | const std::uint32_t | entityId, |
const std::string & | name, | ||
const std::string & | path ) |
GUI::ECS::Systems::Font::Font | ( | const std::uint32_t | entityId, |
const std::string & | name, | ||
const std::string & | path, | ||
const unsigned int | size ) |
GUI::ECS::Systems::Font::Font | ( | const std::uint32_t | entityId, |
const std::string & | name, | ||
const std::string & | path, | ||
const unsigned int | size, | ||
const std::string & | application ) |
GUI::ECS::Systems::Font::Font | ( | const std::uint32_t | entityId, |
const std::string & | name, | ||
const std::string & | path, | ||
const unsigned int | size, | ||
const std::string & | application, | ||
const bool | bold ) |
Constructs a Font with bold property.
entityId | The unique ID of the font entity. |
name | The name of the font. |
path | The file path to the font. |
size | The default size of the font. |
application | The application or context of the font. |
bold | Whether the font is bold. |
GUI::ECS::Systems::Font::Font | ( | const std::uint32_t | entityId, |
const std::string & | name, | ||
const std::string & | path, | ||
const unsigned int | size, | ||
const std::string & | application, | ||
const bool | bold, | ||
const bool | italic ) |
Constructs a Font with bold and italic properties.
entityId | The unique ID of the font entity. |
name | The name of the font. |
path | The file path to the font. |
size | The default size of the font. |
application | The application or context of the font. |
bold | Whether the font is bold. |
italic | Whether the font is italic. |
const std::string GUI::ECS::Systems::Font::getApplication | ( | ) | const |
const unsigned int GUI::ECS::Systems::Font::getDefaultSize | ( | ) | const |
const std::any GUI::ECS::Systems::Font::getFontInstance | ( | ) | const |
const std::string GUI::ECS::Systems::Font::getFontName | ( | ) | const |
const std::string GUI::ECS::Systems::Font::getFontPath | ( | ) | const |
const std::string GUI::ECS::Systems::Font::getInfo | ( | const unsigned int | indent = 0 | ) | const |
This is a function meant for debugging purposes It will dump the current state of the variables upon call. It will dump them for itself and any of it's underlying classes.
indent | The level to which the class should be indented in the dump. |
const bool GUI::ECS::Systems::Font::isBold | ( | ) | const |
const bool GUI::ECS::Systems::Font::isItalic | ( | ) | const |
const bool GUI::ECS::Systems::Font::isLoaded | ( | ) | const |
GUI::ECS::Systems::Font & GUI::ECS::Systems::Font::operator= | ( | const GUI::ECS::Systems::Font & | copy | ) |
void GUI::ECS::Systems::Font::setBold | ( | const bool | bold | ) |
void GUI::ECS::Systems::Font::setFontApplication | ( | const std::string | application | ) |
void GUI::ECS::Systems::Font::setFontDefaultSize | ( | const unsigned int | size | ) |
void GUI::ECS::Systems::Font::setFontName | ( | const std::string & | name | ) |
void GUI::ECS::Systems::Font::setFontPath | ( | const std::string & | path | ) |
void GUI::ECS::Systems::Font::setItalic | ( | const bool | italic | ) |
void GUI::ECS::Systems::Font::update | ( | const GUI::ECS::Systems::Font & | copy | ) |