#include <aedApp.h>
Collaboration diagram for aedApp:

Public Member Functions | |
| aedApp () | |
| The default constructor. | |
| ~aedApp () | |
| aedFont * | requestFont (std::string name, Uint8 size, int style=AED_FONT_STYLE_NORMAL) |
| Search global font cache for the specified font. | |
| void | addFontPath (std::string path) |
| Add font path to the list of paths which will be used for searching fonts. | |
| void | addMemoryFont (std::string name, unsigned char *data, unsigned long int size) |
| Register a memory font for use by aedGUI. | |
| void | dumpFontPaths () |
| Dump all font paths to std::cerr. | |
| void | setDefaultFontName (std::string name) |
| Set the default font name. | |
| std::string | getDefaultFontName () const |
| Return the default font name. | |
| void | setRoot (aedWidget *w) |
| Set the application's root widget. | |
| aedWidget * | getRoot () const |
| Get the root widget. | |
| aedLog * | getLog () const |
| aedTheme * | loadTheme (std::string file) |
| Load a theme plugin. | |
| void | unloadTheme (aedTheme *theme) |
| Unload the theme and free all resources allocated to it. | |
| aedTheme * | getDefaultTheme () const |
| Return a pointer to the default theme. | |
| aedWidget * | getFocusWidget () const |
| Return a pointer to the widget that has focus. | |
| void | setFocusWidget (aedWidget *win) |
| Set focus. | |
| void | setOkayButton (aedButton *button) |
| Handle okay and cancel buttons. | |
| void | setCancelButton (aedButton *button) |
| aedButton * | getOkayButton () |
| aedButton * | getCancelButton () |
| void | clickOkayButton () |
| void | clickCancelButton () |
| void | setUTF8 (bool enable) |
| Enable or disable UTF8 text rendering. | |
| bool | getUTF8 () const |
Private Member Functions | |
| std::string | tryFontPath (std::string path, std::string name) |
Private Attributes | |
| std::vector< aedFontEntry > | m_Fonts |
| std::vector< aedMemFontEntry > | m_MemFonts |
| std::vector< std::string > | m_FontPaths |
| std::vector< aedThemeEntry > | m_Themes |
| std::string | m_DefaultFontName |
| aedWidget * | m_Root |
| aedWidget * | m_FocusWidget |
| aedButton * | m_okayButton |
| aedButton * | m_cancelButton |
| bool | m_UTF8 |
The aedApp class enables you to load custom themes and use memory fonts, set the application's root widget, modify aedGUI's logging behaviour etc. You have to create only one object of this class and it must happen before any widgets are created.
| aedApp::aedApp | ( | ) |
The default constructor.
| aedApp::~aedApp | ( | ) |
| void aedApp::addFontPath | ( | std::string | path | ) |
Add font path to the list of paths which will be used for searching fonts.
| path | path to the font files |
| void aedApp::addMemoryFont | ( | std::string | name, | |
| unsigned char * | data, | |||
| unsigned long int | size | |||
| ) |
Register a memory font for use by aedGUI.
| name | name under which the font will be known | |
| data | pointer to the font data | |
| size | size of the font data |
| void aedApp::clickCancelButton | ( | ) |
| void aedApp::clickOkayButton | ( | ) |
| void aedApp::dumpFontPaths | ( | ) |
Dump all font paths to std::cerr.
| aedButton* aedApp::getCancelButton | ( | ) | [inline] |
| std::string aedApp::getDefaultFontName | ( | ) | const [inline] |
Return the default font name.
| aedTheme* aedApp::getDefaultTheme | ( | ) | const |
Return a pointer to the default theme.
| aedWidget* aedApp::getFocusWidget | ( | ) | const [inline] |
Return a pointer to the widget that has focus.
| aedLog* aedApp::getLog | ( | ) | const |
| aedButton* aedApp::getOkayButton | ( | ) | [inline] |
| aedWidget* aedApp::getRoot | ( | ) | const [inline] |
Get the root widget.
| bool aedApp::getUTF8 | ( | ) | const [inline] |
| aedTheme* aedApp::loadTheme | ( | std::string | file | ) |
Load a theme plugin.
| file | filename of the theme plugin |
| aedFont* aedApp::requestFont | ( | std::string | name, | |
| Uint8 | size, | |||
| int | style = AED_FONT_STYLE_NORMAL | |||
| ) |
Search global font cache for the specified font.
If the font isn't present in the cache or in the list of memory fonts, disk is searched.
| name | font name | |
| size | font size | |
| style | font style |
| void aedApp::setCancelButton | ( | aedButton * | button | ) | [inline] |
| void aedApp::setDefaultFontName | ( | std::string | name | ) | [inline] |
Set the default font name.
| name | font name |
| void aedApp::setFocusWidget | ( | aedWidget * | win | ) |
Set focus.
| void aedApp::setOkayButton | ( | aedButton * | button | ) | [inline] |
Handle okay and cancel buttons.
| void aedApp::setRoot | ( | aedWidget * | w | ) | [inline] |
Set the application's root widget.
| void aedApp::setUTF8 | ( | bool | enable | ) | [inline] |
Enable or disable UTF8 text rendering.
Rendering UTF8 text is disabled by default.
| std::string aedApp::tryFontPath | ( | std::string | path, | |
| std::string | name | |||
| ) | [private] |
| void aedApp::unloadTheme | ( | aedTheme * | theme | ) |
Unload the theme and free all resources allocated to it.
| theme | pointer to a theme returned previously by loadTheme() |
aedButton* aedApp::m_cancelButton [private] |
std::string aedApp::m_DefaultFontName [private] |
aedWidget* aedApp::m_FocusWidget [private] |
std::vector< std::string > aedApp::m_FontPaths [private] |
std::vector< aedFontEntry > aedApp::m_Fonts [private] |
std::vector< aedMemFontEntry > aedApp::m_MemFonts [private] |
aedButton* aedApp::m_okayButton [private] |
aedWidget* aedApp::m_Root [private] |
std::vector< aedThemeEntry > aedApp::m_Themes [private] |
bool aedApp::m_UTF8 [private] |
1.4.7