#include <uitheme.h>
Inheritance diagram for UiTheme:
Public Member Functions | |
DECLSPEC | UiTheme (const char *name) |
virtual const char * | getString (const char *usage, int *length=0)=0 |
virtual Uint32 | getUint32 (const char *usage, bool *found=0)=0 |
virtual bool | getBool (const char *usage, bool *found=0)=0 |
virtual SDL_Rect | getRect (const char *usage)=0 |
virtual const char * | translate (const char *text)=0 |
const char * | getName () const |
Protected Member Functions | |
virtual Uint32 | onLoad (bool hidden)=0 |
virtual Uint32 | onActivate ()=0 |
virtual Uint32 | onDeactivate ()=0 |
virtual bool | isLoaded ()=0 |
Friends | |
class | ThemeManager |
All classes, derived from UiTheme, are managed by ThemeManager to handle themes.
UiTheme::UiTheme | ( | const char * | name | ) |
Constructor. Registers itself in the ThemeManager with it's name.
name | The theme's name, that can be used to get the theme by using ThemeManager::getThemeByName |
virtual const char* UiTheme::getString | ( | const char * | usage, | |
int * | length = 0 | |||
) | [pure virtual] |
Get a theme-specific string.
usage | a string that says what for the result is needed. | |
length | if not NULL, the length of the string will be copied there or zero, if the usage-string is invalid |
Implemented in UiFileTheme.
virtual Uint32 UiTheme::getUint32 | ( | const char * | usage, | |
bool * | found = 0 | |||
) | [pure virtual] |
Get a theme-specific number.
usage | a string that says what for the result is needed. | |
found | if not NULL, it's content will become true, if the "usage" could be found and false, if it could not be found |
Implemented in UiFileTheme.
virtual bool UiTheme::getBool | ( | const char * | usage, | |
bool * | found = 0 | |||
) | [pure virtual] |
Get a theme-specific boolean value.
usage | a string that says what for the result is needed. | |
found | if not NULL, it's content will become true, if the "usage" could be found and false, if it could not be found |
Implemented in UiFileTheme.
virtual SDL_Rect UiTheme::getRect | ( | const char * | usage | ) | [pure virtual] |
Get a theme-specific rect.
usage | a string that says what for the result is needed. |
Implemented in UiFileTheme.
virtual const char* UiTheme::translate | ( | const char * | text | ) | [pure virtual] |
Translates a text-string to the theme's language.
text | the string to translate (NULL not allowed!) |
Implemented in UiFileTheme.
const char* UiTheme::getName | ( | ) | const [inline] |
virtual Uint32 UiTheme::onLoad | ( | bool | hidden | ) | [protected, pure virtual] |
This event will be called, when the theme should load it's data.
hidden | if true, the screen is not used to display a progressbar/...; if false the progress may be shown by the loading theme |
Implemented in UiFileTheme.
virtual Uint32 UiTheme::onActivate | ( | ) | [protected, pure virtual] |
This event will be called, before the theme becomes active.
Implemented in UiFileTheme.
virtual Uint32 UiTheme::onDeactivate | ( | ) | [protected, pure virtual] |
This event will be called, when the theme becomes inactive.
Implemented in UiFileTheme.
virtual bool UiTheme::isLoaded | ( | ) | [protected, pure virtual] |