The Gnome Chemistry Utils
0.13.7
|
themes engine class. More...
#include <gcp/theme.h>
Public Member Functions | |
ThemeManager () | |
~ThemeManager () | |
Theme * | GetTheme (char const *name) |
Theme * | GetTheme (std::string &name) |
std::list< std::string > const & | GetThemesNames () |
void | OnConfigChanged (GOConfNode *node, gchar const *name) |
Theme * | CreateNewTheme (Theme *theme=NULL) |
void | AddFileTheme (Theme *theme, char const *label) |
void | RemoveFileTheme (Theme *theme) |
void | ChangeThemeName (Theme *theme, char const *name) |
Theme * | GetDefaultTheme () |
void | SetDefaultTheme (char const *name) |
void | Shutdown () |
themes engine class.
Represent the themes set. Only one global object of this class exists in GChemPaint.
Constructs a theme manager.
The destructor.
void gcp::ThemeManager::AddFileTheme | ( | Theme * | theme, |
char const * | label | ||
) |
theme | a theme imported from a document file. |
label | the document label. |
Called when opening a file if the theme saved with the file has the same name than an already registered theme, but different settings. The theme will not be saved to the local database, and will be registered using label and the theme name.
void gcp::ThemeManager::ChangeThemeName | ( | Theme * | theme, |
char const * | name | ||
) |
theme | a theme. |
name | the new name for the theme. |
Changes the name of the theme.
Theme* gcp::ThemeManager::CreateNewTheme | ( | Theme * | theme = NULL | ) |
theme | a theme to duplicate. |
Creates a new theme based on theme or on the default theme if theme is NULL.
Theme* gcp::ThemeManager::GetDefaultTheme | ( | ) | [inline] |
Theme* gcp::ThemeManager::GetTheme | ( | char const * | name | ) |
name | the name of the requested theme. |
Theme* gcp::ThemeManager::GetTheme | ( | std::string & | name | ) |
name | the name of the requested theme. |
std::list<std::string> const& gcp::ThemeManager::GetThemesNames | ( | ) |
void gcp::ThemeManager::OnConfigChanged | ( | GOConfNode * | node, |
gchar const * | name | ||
) |
node | the GOConfNode for which a key value changed. |
name | the key whose value changed. |
Called by the framework when the value associated with name changed in the settings.
void gcp::ThemeManager::RemoveFileTheme | ( | Theme * | theme | ) |
theme | the themeto remove from the list. |
Called for theme registered using AddFileName() typically when the associated document file is closed.
void gcp::ThemeManager::SetDefaultTheme | ( | char const * | name | ) |
name | the name of the default theme. |
Sets the default theme. This theme is used when creating new documents with no explicit theme.
void gcp::ThemeManager::Shutdown | ( | ) |
Closes configuration change notification. Should be called once before the destructionof the theme manager.