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

themes class. More...

#include <gcp/theme.h>

Public Member Functions

 Theme (char const *name)
 ~Theme ()
std::string & GetName ()
std::string & GetFileName ()
bool Save (xmlDocPtr xml)
bool Load (xmlNodePtr node)
bool operator== (const Theme &theme)
void AddClient (gcu::Object *client)
void RemoveClient (gcu::Object *client)
void NotifyChanged ()
double GetBondLength (void) const
double GetBondAngle (void) const
double GetBondDist (void) const
double GetBondWidth (void) const
double GetArrowLength (void) const
double GetHashWidth (void) const
double GetHashDist (void) const
double GetStereoBondWidth (void) const
double GetZoomFactor (void) const
double GetPadding (void) const
double GetArrowHeadA (void) const
double GetArrowHeadB (void) const
double GetArrowHeadC (void) const
double GetArrowDist (void) const
double GetArrowWidth (void) const
double GetArrowPadding (void) const
double GetArrowObjectPadding (void) const
double GetStoichiometryPadding (void) const
double GetObjectPadding (void) const
double GetSignPadding (void) const
double GetChargeSignSize (void) const
gchar * GetFontFamily (void) const
PangoStyle GetFontStyle (void) const
PangoWeight GetFontWeight (void) const
PangoVariant GetFontVariant (void) const
PangoStretch GetFontStretch (void) const
gint GetFontSize (void) const
gchar * GetTextFontFamily (void) const
PangoStyle GetTextFontStyle (void) const
PangoWeight GetTextFontWeight (void) const
PangoVariant GetTextFontVariant (void) const
PangoStretch GetTextFontStretch (void) const
gint GetTextFontSize (void) const
ThemeType GetThemeType (void) const

Detailed Description

themes class.

Represent an edition settings in GChemPaint.

Definition at line 67 of file theme.h.

Constructor & Destructor Documentation

gcp::Theme::Theme ( char const *  name)
Parameters
namethe name of the new theme.

Constructs a new theme according to the local settings.

gcp::Theme::~Theme ( )

The destructor.

Member Function Documentation

void gcp::Theme::AddClient ( gcu::Object client)
inline
Parameters
clientthe client to add.

Adds a new client to the list of this theme clients.

Definition at line 118 of file theme.h.

gcp::Theme::GetArrowDist ( void  ) const
inline
Returns
the theme default distance between two lines in pixels (at 100% zoom) for double arrows or for retrosynthesis arrows.

Definition at line 191 of file theme.h.

gcp::Theme::GetArrowHeadA ( void  ) const
inline
Returns
the theme default distance from tip of arrowhead to center in pixels (at 100% zoom).

Definition at line 179 of file theme.h.

gcp::Theme::GetArrowHeadB ( void  ) const
inline
Returns
the theme default distance from tip of arrowhead to trailing point, measured along shaft, in pixels (at 100% zoom).

Definition at line 183 of file theme.h.

gcp::Theme::GetArrowHeadC ( void  ) const
inline
Returns
the theme default distance of arrowhead trailing points from outside edge of shaft in pixels (at 100% zoom).

Definition at line 187 of file theme.h.

gcp::Theme::GetArrowLength ( void  ) const
inline
Returns
the theme default arrow length in picometers.

Definition at line 155 of file theme.h.

gcp::Theme::GetArrowObjectPadding ( void  ) const
inline
Returns
the theme default padding between arrows ends and attached objects bounds in pixels (at 100% zoom).

Definition at line 203 of file theme.h.

gcp::Theme::GetArrowPadding ( void  ) const
inline
Returns
the theme default padding between arrows and associated objects (reactants, mesomers,...) in pixels (at 100% zoom).

Definition at line 199 of file theme.h.

gcp::Theme::GetArrowWidth ( void  ) const
inline
Returns
the theme default arrow line width in pixels (at 100% zoom).

Definition at line 195 of file theme.h.

gcp::Theme::GetBondAngle ( void  ) const
inline
Returns
the theme default angle between two consecutive bonds in a chain in degrees.

Definition at line 143 of file theme.h.

gcp::Theme::GetBondDist ( void  ) const
inline
Returns
the theme default distance between two lines in pixels (at 100% zoom) in a multiple bond.

Definition at line 147 of file theme.h.

gcp::Theme::GetBondLength ( void  ) const
inline
Returns
the theme default bond length in picometers.

Definition at line 139 of file theme.h.

gcp::Theme::GetBondWidth ( void  ) const
inline
Returns
the theme default bond line width in pixels (at 100% zoom).

Definition at line 151 of file theme.h.

gcp::Theme::GetChargeSignSize ( void  ) const
inline
Returns
the theme default size of the charge sign in pixels (at 100% zoom).

Definition at line 219 of file theme.h.

std::string& gcp::Theme::GetFileName ( )
inline
Returns
the theme name.

Definition at line 92 of file theme.h.

gcp::Theme::GetFontFamily ( void  ) const
inline
Returns
the theme font family used for chemical formula such as atoms and fragments

Definition at line 223 of file theme.h.

gcp::Theme::GetFontSize ( void  ) const
inline
Returns
the theme font size used for chemical formula such as atoms and fragments.

Definition at line 243 of file theme.h.

gcp::Theme::GetFontStretch ( void  ) const
inline
Returns
the theme font stretch used for chemical formula such as atoms and fragments.

Definition at line 239 of file theme.h.

gcp::Theme::GetFontStyle ( void  ) const
inline
Returns
the theme font style used for chemical formula such as atoms and fragments.

Definition at line 227 of file theme.h.

gcp::Theme::GetFontVariant ( void  ) const
inline
Returns
the theme font variant used for chemical formula such as atoms and fragments.

Definition at line 235 of file theme.h.

gcp::Theme::GetFontWeight ( void  ) const
inline
Returns
the theme font weight used for chemical formula such as atoms and fragments.

Definition at line 231 of file theme.h.

gcp::Theme::GetHashDist ( void  ) const
inline
Returns
the theme default distance between two lines in pixels for hash bonds (at 100% zoom).

Definition at line 163 of file theme.h.

gcp::Theme::GetHashWidth ( void  ) const
inline
Returns
the theme default line width in pixels for hash bonds (at 100% zoom).

Definition at line 159 of file theme.h.

std::string& gcp::Theme::GetName ( void  )
inline
Returns
the theme name.

Definition at line 87 of file theme.h.

gcp::Theme::GetObjectPadding ( void  ) const
inline
Returns
the theme default padding in pixels added between consecutive objects during an alignment operation (at 100% zoom).

Definition at line 211 of file theme.h.

gcp::Theme::GetPadding ( void  ) const
inline
Returns
the theme default padding used around text objects such as atoms, texts and other typographic signs in pixels (at 100% zoom).

Definition at line 175 of file theme.h.

gcp::Theme::GetSignPadding ( void  ) const
inline
Returns
the theme default padding between a '+' sign in a reaction equation and reactants symbols in pixels (at 100% zoom).

Definition at line 215 of file theme.h.

gcp::Theme::GetStereoBondWidth ( void  ) const
inline
Returns
the theme default largest width for hash or wedge bonds (at 100% zoom).

Definition at line 167 of file theme.h.

gcp::Theme::GetStoichiometryPadding ( void  ) const
inline
Returns
the theme default extra padding between a stoichiometric coefficient and its associated molecule in pixels (at 100% zoom).

Definition at line 207 of file theme.h.

gcp::Theme::GetTextFontFamily ( void  ) const
inline
Returns
the theme default font family used for texts.

Definition at line 247 of file theme.h.

gcp::Theme::GetTextFontSize ( void  ) const
inline
Returns
the theme default text font size.

Definition at line 267 of file theme.h.

gcp::Theme::GetTextFontStretch ( void  ) const
inline
Returns
the theme default font stretch used for texts.

Definition at line 263 of file theme.h.

gcp::Theme::GetTextFontStyle ( void  ) const
inline
Returns
the theme default font style used for texts.

Definition at line 251 of file theme.h.

gcp::Theme::GetTextFontVariant ( void  ) const
inline
Returns
the theme default font variant used for texts.

Definition at line 259 of file theme.h.

gcp::Theme::GetTextFontWeight ( void  ) const
inline
Returns
the theme default font weight used for texts.

Definition at line 255 of file theme.h.

gcp::Theme::GetThemeType ( void  ) const
inline
Returns
the type of the theme as definedby the ThemeType enumeration.

Definition at line 271 of file theme.h.

gcp::Theme::GetZoomFactor ( void  ) const
inline
Returns
the theme default scale used to convert real distance to canvas distance expressed in pixel per pm (at 100% zoom).

Definition at line 171 of file theme.h.

bool gcp::Theme::Load ( xmlNodePtr  node)
Parameters
nodethe xml node containing the serialized theme.

Loads a theme in memory, either from the theme database or from a document file.

void gcp::Theme::NotifyChanged ( )

Notify all the theme clients that at least one setting changed.

bool gcp::Theme::operator== ( const Theme theme)
Parameters
themea theme to compare.
Returns
true if the two themes have identical settings.
void gcp::Theme::RemoveClient ( gcu::Object client)
Parameters
clientthe client to remove.

Removes client to the list of this theme clients.

bool gcp::Theme::Save ( xmlDocPtr  xml)
Parameters
xmlthe xml document used for serialization.

Builds an xml node containing the serialized theme.

Returns
the new xml node or NULL if an error occured.

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