#include <edelib/Theme.h>
Public Member Functions | |
| Theme () | |
| ~Theme () | |
| bool | load (const char *f) |
| void | clear (void) |
| bool | loaded (void) const |
| bool | get_item (const char *style_name, const char *item_name, char *ret, unsigned int sz) |
| bool | get_item (const char *style_name, const char *item_name, long &ret, long fallback=0) |
| const char * | author (void) const |
| const char * | name (void) const |
| const char * | sample_image (void) const |
Theme class implements abastract theming engine suitable for FLTK and edelib widgets. Unlike Config or Resource, theme engine implements full language to load and parse theme files giving huge flexibility to represent the final visual appearance and behaviour.
This class should not be used directly to load themes; ThemeLoader should be used for that.
| Theme | ( | ) |
Constructor.
| ~Theme | ( | ) |
Destructor.
| bool load | ( | const char * | f | ) |
Load and parse theme from given file. If fails returns false.
| void clear | ( | void | ) |
Deinitialize interpreter and clears internal data.
| bool loaded | ( | void | ) | const |
Return true if theme loaded successfully.
| bool get_item | ( | const char * | style_name, | |
| const char * | item_name, | |||
| char * | ret, | |||
| unsigned int | sz | |||
| ) |
Get C string item from theme using style_name style. Item will be stored in ret using no more than sz bytes. Return true if found and ret was set.
| bool get_item | ( | const char * | style_name, | |
| const char * | item_name, | |||
| long & | ret, | |||
| long | fallback = 0 | |||
| ) |
Get long item from theme using style_name style. If given item wasn't found, the function will return false and ret will have fallback value. Otherwise, ret will have value associated with item_name.
| const char* author | ( | void | ) | const |
Return author entry.
| const char* name | ( | void | ) | const |
Return theme name.
| const char* sample_image | ( | void | ) | const |
Return name of theme example image.
1.5.2