|
Smolgui
Immediate gui library based on SFML
|
store text accessible with a string key, with option to load and store text for a given tongue, so it has simple support for localisation. More...
#include <TextContainer.h>
Public Member Functions | |
| const std::string & | tongue () const |
| get current tongue used | |
| void | setTongue (const std::string &tongue) |
| set tongue used | |
| bool | reload (const std::string &tongue="") |
| reload all texts for the active tongue | |
| bool | loadFromFile (const std::string &filename, const std::string &tongue="") |
| load texts from a filename for this given tongue. By default it uses active tongue. | |
| void | saveInFile (const std::string &filename) |
| save texts of the current tongue | |
| void | add (const std::string &key, const std::string &text) |
| add a text with a given key to the container for the current tongue | |
| void | remove (const std::string &key) |
| remove text from the container for the current tongue | |
| std::string & | get (const std::string &entry) |
| get mutable text entry for the current tongue | |
| const std::string & | get (const std::string &entry) const |
| get text entry for the current tongue | |
| bool | has (const std::string &entry) const |
| check that entry is stored | |
store text accessible with a string key, with option to load and store text for a given tongue, so it has simple support for localisation.
| void sgui::TextContainer::add | ( | const std::string & | key, |
| const std::string & | text ) |
add a text with a given key to the container for the current tongue
| std::string & sgui::TextContainer::get | ( | const std::string & | entry | ) |
get mutable text entry for the current tongue
| const std::string & sgui::TextContainer::get | ( | const std::string & | entry | ) | const |
get text entry for the current tongue
| bool sgui::TextContainer::has | ( | const std::string & | entry | ) | const |
check that entry is stored
| bool sgui::TextContainer::loadFromFile | ( | const std::string & | filename, |
| const std::string & | tongue = "" ) |
load texts from a filename for this given tongue. By default it uses active tongue.
| bool sgui::TextContainer::reload | ( | const std::string & | tongue = "" | ) |
reload all texts for the active tongue
| void sgui::TextContainer::remove | ( | const std::string & | key | ) |
remove text from the container for the current tongue
| void sgui::TextContainer::saveInFile | ( | const std::string & | filename | ) |
save texts of the current tongue
| void sgui::TextContainer::setTongue | ( | const std::string & | tongue | ) |
set tongue used
| const std::string & sgui::TextContainer::tongue | ( | ) | const |
get current tongue used