edelib 1.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
ThemeLoader Class Reference
FLTK widgets and functions

Themes loader. More...

`#include <edelib/ThemeLoader.h>`

## Public Member Functions

| ThemeLoader ()
| ~ThemeLoader ()
bool | load (const char *name="default", const char *prefix="ede")
bool | load_with_path (const char *path)
bool | load_xsettings (void)
Theme * | theme (void)
XSettingsClient * | xsettings (void)

## Detailed Description

Themes loader.

ThemeLoader is a class for loading themes and applying theme content on currently available FLTK tree. It will search for themes in $XDG_DATA_DIRS/prefix/theme-name and try to load main.ewt as the entry point and interpret it via Theme engine class.

For more details see Themes and theming details.

Also, ThemeLoader will load client for XSETTINGS protocol (via XSettingsClient), giving the single place for accessing common visual elements either using theme files or XSETTINGS protocol.

## Constructor & Destructor Documentation

ThemeLoader | ( |  | ) |

Constructor.

~ThemeLoader | ( |  | ) |

Destructor. Cleans initialized data.

## Member Function Documentation

bool load | ( | const char * | name = `"default"`,
|  | const char * | prefix = `"ede"`
| ) |  |

Loads theme using XDG_DATA_DIRS location. The final location is constructed adding prefix and default theme name, which by default looks as $XDG_DATA_DIRS/ede/default.

As theme name is at the same time also a directory with theming files, loader will try first to look for main.ewt file in this directory. If it is unable to find it nor to interpret it correctly, it will return false.

bool load_with_path | ( | const char * | path | ) |

Load theme using given path.

bool load_xsettings | ( | void |  | ) |

Loads XSETTINGS client code. It is assumed how display was opened (by using fl_open_display()) before or it will return false. Also, it will return false if XSETTINGS client code fails to load.

Theme* theme | ( | void |  | ) |

Returns currently loaded theme. If theme wasn't loaded successfully, it will return NULL.

XSettingsClient* xsettings | ( | void |  | ) |

Returns XSettingsClient object. If wasn't loaded successfully with load_xsettings(), it will return NULL.

The documentation for this class was generated from the following file:

- edelib/ThemeLoader.h