# gcp::Theme Class Reference

themes class. More...

`#include <gcp/theme.h>`

List of all members.

## Public Member Functions

| Theme (char const *name)
| ~Theme ()
std::string & | GetName ()
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)
double | GetBondAngle (void)
double | GetBondDist (void)
double | GetBondWidth (void)
double | GetArrowLength (void)
double | GetHashWidth (void)
double | GetHashDist (void)
double | GetStereoBondWidth (void)
double | GetZoomFactor (void)
double | GetPadding (void)
double | GetArrowHeadA (void)
double | GetArrowHeadB (void)
double | GetArrowHeadC (void)
double | GetArrowDist (void)
double | GetArrowWidth (void)
double | GetArrowPadding (void)
double | GetArrowObjectPadding (void)
double | GetStoichiometryPadding (void)
double | GetObjectPadding (void)
double | GetSignPadding (void)
double | GetChargeSignSize (void)
gchar * | GetFontFamily (void)
PangoStyle | GetFontStyle (void)
PangoWeight | GetFontWeight (void)
PangoVariant | GetFontVariant (void)
PangoStretch | GetFontStretch (void)
gint | GetFontSize (void)
gchar * | GetTextFontFamily (void)
PangoStyle | GetTextFontStyle (void)
PangoWeight | GetTextFontWeight (void)
PangoVariant | GetTextFontVariant (void)
PangoStretch | GetTextFontStretch (void)
gint | GetTextFontSize (void)
ThemeType | GetThemeType (void)

## Detailed Description

themes class.

Represent an edition settings in GChemPaint.

Definition at line 74 of file theme.h.

## Constructor & Destructor Documentation

gcp::Theme::Theme | ( | char const * | name | ) |

Parameters:

  | name | the name of the new theme.

Constructs a new theme according to the local settings.

gcp::Theme::~Theme | ( |  | ) |

The destructor.

## Member Function Documentation

std::string& gcp::Theme::GetName | ( | void |  | ) | `[inline]`

Returns:
  the theme name.

Definition at line 94 of file theme.h.

bool gcp::Theme::Save | ( | xmlDocPtr | xml | ) |

Parameters:

  | xml | the xml document used for serialization.

Builds an xml node containing the serialized theme.

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

bool gcp::Theme::Load | ( | xmlNodePtr | node | ) |

Parameters:

  | node | the xml node containing the serialized theme.

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

bool gcp::Theme::operator== | ( | const Theme & | theme | ) |

Parameters:

  | theme | a theme to compare.

Returns:
  true if the two themes have identical settings.

void gcp::Theme::AddClient | ( | gcu::Object * | client | ) | `[inline]`

Parameters:

  | client | the client to add.

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

Definition at line 119 of file theme.h.

void gcp::Theme::RemoveClient | ( | gcu::Object * | client | ) |

Parameters:

  | client | the client to remove.

Removes client to the list of this theme clients.

void gcp::Theme::NotifyChanged | ( |  | ) |

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

gcp::Theme::GetBondLength | ( | void |  | ) | `[inline]`

Returns:
  the theme default bond length in picometers.

Definition at line 139 of file theme.h.

gcp::Theme::GetBondAngle | ( | void |  | ) | `[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 |  | ) | `[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::GetBondWidth | ( | void |  | ) | `[inline]`

Returns:
  the theme default bond line width in pixels (at 100% zoom).

Definition at line 151 of file theme.h.

gcp::Theme::GetArrowLength | ( | void |  | ) | `[inline]`

Returns:
  the theme default arrow length in picometers.

Definition at line 155 of file theme.h.

gcp::Theme::GetHashWidth | ( | void |  | ) | `[inline]`

Returns:
  the theme default line width in pixels for hash bonds (at 100% zoom).

Definition at line 159 of file theme.h.

gcp::Theme::GetHashDist | ( | void |  | ) | `[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::GetStereoBondWidth | ( | void |  | ) | `[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::GetZoomFactor | ( | void |  | ) | `[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.

gcp::Theme::GetPadding | ( | void |  | ) | `[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::GetArrowHeadA | ( | void |  | ) | `[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 |  | ) | `[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 |  | ) | `[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::GetArrowDist | ( | void |  | ) | `[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::GetArrowWidth | ( | void |  | ) | `[inline]`

Returns:
  the theme default arrow line width in pixels (at 100% zoom).

Definition at line 195 of file theme.h.

gcp::Theme::GetArrowPadding | ( | void |  | ) | `[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::GetArrowObjectPadding | ( | void |  | ) | `[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::GetStoichiometryPadding | ( | void |  | ) | `[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::GetObjectPadding | ( | void |  | ) | `[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::GetSignPadding | ( | void |  | ) | `[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::GetChargeSignSize | ( | void |  | ) | `[inline]`

Returns:
  the theme default size of the charge sign in pixels (at 100% zoom).

Definition at line 219 of file theme.h.

gcp::Theme::GetFontFamily | ( | void |  | ) | `[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::GetFontStyle | ( | void |  | ) | `[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::GetFontWeight | ( | void |  | ) | `[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::GetFontVariant | ( | void |  | ) | `[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::GetFontStretch | ( | void |  | ) | `[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::GetFontSize | ( | void |  | ) | `[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::GetTextFontFamily | ( | void |  | ) | `[inline]`

Returns:
  the theme default font family used for texts.

Definition at line 247 of file theme.h.

gcp::Theme::GetTextFontStyle | ( | void |  | ) | `[inline]`

Returns:
  the theme default font style used for texts.

Definition at line 251 of file theme.h.

gcp::Theme::GetTextFontWeight | ( | void |  | ) | `[inline]`

Returns:
  the theme default font weight used for texts.

Definition at line 255 of file theme.h.

gcp::Theme::GetTextFontVariant | ( | void |  | ) | `[inline]`

Returns:
  the theme default font variant used for texts.

Definition at line 259 of file theme.h.

gcp::Theme::GetTextFontStretch | ( | void |  | ) | `[inline]`

Returns:
  the theme default font stretch used for texts.

Definition at line 263 of file theme.h.

gcp::Theme::GetTextFontSize | ( | void |  | ) | `[inline]`

Returns:
  the theme default text font size.

Definition at line 267 of file theme.h.

gcp::Theme::GetThemeType | ( | void |  | ) | `[inline]`

Returns:
  the type of the theme as definedby the ThemeType enumeration.

Definition at line 271 of file theme.h.

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

- theme.h