gcp::ThemeManager Class Reference

themes engine class. More...

#include <gcp/theme.h>

List of all members.

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 274 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:
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 
)

Parameters:
theme a theme.
name the new name for the theme.
Changes the name of the theme.

Theme* gcp::ThemeManager::CreateNewTheme ( Theme theme = NULL  ) 

Parameters:
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]

Returns:
the default theme.

Definition at line 343 of file theme.h.

Theme* gcp::ThemeManager::GetTheme ( std::string &  name  ) 

Parameters:
name the name of the requested theme.
Returns:
the theme corresponding to name if any, or NULL.

Theme* gcp::ThemeManager::GetTheme ( char const *  name  ) 

Parameters:
name the 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:
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  ) 

Parameters:
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  ) 

Parameters:
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.


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

Generated on Fri Sep 24 15:58:45 2010 for The Gnome Chemistry Utils by  doxygen 1.5.9