The Gnome Chemistry Utils  0.14.0
Public Member Functions | List of all members
gcp::ThemeManager Class Reference

themes engine class. More...

#include <gcp/theme.h>

Public Member Functions

 ThemeManager ()
 ~ThemeManager ()
ThemeGetTheme (char const *name)
ThemeGetTheme (std::string &name)
std::list< std::string > const & GetThemesNames ()
void OnConfigChanged (GOConfNode *node, gchar const *name)
ThemeCreateNewTheme (Theme *theme=NULL)
void AddFileTheme (Theme *theme, char const *label)
void RemoveFileTheme (Theme *theme)
void ChangeThemeName (Theme *theme, char const *name)
ThemeGetDefaultTheme ()
void SetDefaultTheme (char const *name)
void Shutdown ()

Detailed Description

themes engine class.

Represent the themes set. Only one global object of this class exists in GChemPaint.

Definition at line 280 of file theme.h.

Constructor & Destructor Documentation

gcp::ThemeManager::ThemeManager ( )

Constructs a theme manager.

gcp::ThemeManager::~ThemeManager ( )

The destructor.

Member Function Documentation

void gcp::ThemeManager::AddFileTheme ( Theme theme,
char const *  label 
)
Parameters
themea theme imported from a document file.
labelthe 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 
)
Parameters
themea theme.
namethe new name for the theme.

Changes the name of the theme.

Theme* gcp::ThemeManager::CreateNewTheme ( Theme theme = NULL)
Parameters
themea theme to duplicate.

Creates a new theme based on theme or on the default theme if theme is NULL.

Theme* gcp::ThemeManager::GetDefaultTheme ( )
inline
Returns
the default theme.

Definition at line 349 of file theme.h.

Theme* gcp::ThemeManager::GetTheme ( char const *  name)
Parameters
namethe name of the requested theme.
Returns
the theme corresponding to name if any, or NULL.
Theme* gcp::ThemeManager::GetTheme ( std::string &  name)
Parameters
namethe name of the requested theme.
Returns
the theme corresponding to name if any, or NULL.
std::list<std::string> const& gcp::ThemeManager::GetThemesNames ( )
Returns
the list of all theme names currently in use.
void gcp::ThemeManager::OnConfigChanged ( GOConfNode *  node,
gchar const *  name 
)
Parameters
nodethe GOConfNode for which a key value changed.
namethe key whose value changed.

Called by the framework when the value associated with name changed in the settings.

void gcp::ThemeManager::RemoveFileTheme ( Theme theme)
Parameters
themethe 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)
Parameters
namethe 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.


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