Chemical Data Processing Library C++ API - Version 1.4.0
Vis/BondFunctions.hpp
Go to the documentation of this file.
1 /*
2  * BondFunctions.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_VIS_BONDFUNCTIONS_HPP
30 #define CDPL_VIS_BONDFUNCTIONS_HPP
31 
32 #include <string>
33 
34 #include "CDPL/Vis/APIPrefix.hpp"
35 
36 
37 namespace CDPL
38 {
39 
40  namespace Chem
41  {
42 
43  class Bond;
44  }
45 
46  namespace Vis
47  {
48 
49  class Color;
50  class Font;
51  class Brush;
52  class Pen;
53  class SizeSpecification;
54 
60  CDPL_VIS_API const Color& getColor(const Chem::Bond& bond);
61 
67  CDPL_VIS_API void setColor(Chem::Bond& bond, const Color& color);
68 
74  CDPL_VIS_API bool hasColor(const Chem::Bond& bond);
75 
81 
82 
89 
96 
103 
109 
110 
117 
124 
131 
137 
138 
145 
152 
159 
165 
166 
173 
180 
187 
193 
194 
201 
208 
215 
221 
222 
229 
236 
243 
249 
250 
257 
264 
271 
277 
278 
285 
292 
299 
305 
306 
313 
319  CDPL_VIS_API void setLabelFont(Chem::Bond& bond, const Font& font);
320 
327 
333 
334 
341 
348 
355 
361 
362 
369 
376 
383 
389 
397 
405 
413 
420 
428 
436 
444 
451 
459 
467 
475 
482 
490 
497  CDPL_VIS_API void setCustomLabelFont(Chem::Bond& bond, const Font& font);
498 
506 
513 
521 
529 
537 
544 
552 
560 
568 
575 
582  CDPL_VIS_API const std::string& getCustomLabel(const Chem::Bond& bond);
583 
590  CDPL_VIS_API void setCustomLabel(Chem::Bond& bond, const std::string& text);
591 
599 
606 
614 
621  CDPL_VIS_API void setHighlightedFlag(Chem::Bond& bond, bool highlighted);
622 
630 
637 
645 
653 
661 
668 
676 
684 
692 
699 
700  } // namespace Vis
701 } // namespace CDPL
702 
703 #endif // CDPL_VIS_BONDFUNCTIONS_HPP
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Specifies the fill pattern and fill color of shapes.
Definition: Brush.hpp:50
Specifies a color in terms of its red, green and blue components and an alpha-channel for transparenc...
Definition: Color.hpp:52
Specifies a font for drawing text.
Definition: Font.hpp:54
Specifies how to draw lines and outlines of shapes.
Definition: Pen.hpp:53
Specifies the value and type of a size attribute and defines how the value may change during processi...
Definition: SizeSpecification.hpp:45
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Returns the length (L2 norm) of the vector expression e (alias of norm2()).
Definition: VectorExpression.hpp:979
CDPL_VIS_API void setReactionCenterLineSpacing(Chem::Bond &bond, const SizeSpecification &spacing)
Sets the value of the Vis::BondProperty::REACTION_CENTER_LINE_SPACING property of the bond bond to sp...
CDPL_VIS_API const std::string & getCustomLabel(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::CUSTOM_LABEL property of the atom atom.
CDPL_VIS_API void setStereoBondWedgeWidth(Chem::Bond &bond, const SizeSpecification &width)
Sets the value of the Vis::BondProperty::STEREO_BOND_WEDGE_WIDTH property of the bond bond to width.
CDPL_VIS_API void clearCustomLabel(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::CUSTOM_LABEL property of the atom atom.
CDPL_VIS_API const Color & getCustomLabelColor(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::CUSTOM_LABEL_COLOR property of the atom atom.
CDPL_VIS_API void clearStereoBondWedgeWidth(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::STEREO_BOND_WEDGE_WIDTH property of the bond bond.
CDPL_VIS_API void setCustomLabelSize(Chem::Atom &atom, const SizeSpecification &size)
Sets the value of the Vis::AtomProperty::CUSTOM_LABEL_SIZE property of the atom atom to size.
CDPL_VIS_API void clearConfigurationLabelFont(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::CONFIGURATION_LABEL_FONT property of the atom atom.
CDPL_VIS_API void setLineSpacing(Chem::Bond &bond, const SizeSpecification &spacing)
Sets the value of the Vis::BondProperty::LINE_SPACING property of the bond bond to spacing.
CDPL_VIS_API void setColor(Chem::Atom &atom, const Color &color)
Sets the value of the Vis::AtomProperty::COLOR property of the atom atom to color.
CDPL_VIS_API void setConfigurationLabelFont(Chem::Atom &atom, const Font &font)
Sets the value of the Vis::AtomProperty::CONFIGURATION_LABEL_FONT property of the atom atom to font.
CDPL_VIS_API bool hasStereoBondHashSpacing(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::STEREO_BOND_HASH_SPACING property of the bond bond is set.
CDPL_VIS_API void setStereoBondHashSpacing(Chem::Bond &bond, const SizeSpecification &spacing)
Sets the value of the Vis::BondProperty::STEREO_BOND_HASH_SPACING property of the bond bond to spacin...
CDPL_VIS_API bool hasConfigurationLabelFont(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::CONFIGURATION_LABEL_FONT property of the atom atom is set.
CDPL_VIS_API void clearLabelFont(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::LABEL_FONT property of the atom atom.
CDPL_VIS_API void clearHighlightedFlag(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::HIGHLIGHTED_FLAG property of the atom atom.
CDPL_VIS_API bool hasColor(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::COLOR property of the atom atom is set.
CDPL_VIS_API const SizeSpecification & getLabelMargin(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::LABEL_MARGIN property of the atom atom.
CDPL_VIS_API void clearCustomLabelSize(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::CUSTOM_LABEL_SIZE property of the atom atom.
CDPL_VIS_API void setLineWidth(Chem::Bond &bond, const SizeSpecification &width)
Sets the value of the Vis::BondProperty::LINE_WIDTH property of the bond bond to width.
CDPL_VIS_API void clearConfigurationLabelSize(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::CONFIGURATION_LABEL_SIZE property of the atom atom.
CDPL_VIS_API void clearReactionCenterLineLength(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::REACTION_CENTER_LINE_LENGTH property of the bond bond.
CDPL_VIS_API void setHighlightAreaBrush(Chem::Atom &atom, const Brush &brush)
Sets the value of the Vis::AtomProperty::HIGHLIGHT_AREA_BRUSH property of the atom atom to brush.
CDPL_VIS_API void setHighlightAreaOutlinePen(Chem::Atom &atom, const Pen &pen)
Sets the value of the Vis::AtomProperty::HIGHLIGHT_AREA_OUTLINE_PEN property of the atom atom to pen.
CDPL_VIS_API void clearStereoBondHashSpacing(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::STEREO_BOND_HASH_SPACING property of the bond bond.
CDPL_VIS_API void clearCustomLabelColor(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::CUSTOM_LABEL_COLOR property of the atom atom.
CDPL_VIS_API void clearReactionCenterLineSpacing(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::REACTION_CENTER_LINE_SPACING property of the bond bond.
CDPL_VIS_API const Color & getConfigurationLabelColor(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::CONFIGURATION_LABEL_COLOR property of the atom atom.
CDPL_VIS_API bool hasReactionCenterLineLength(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::REACTION_CENTER_LINE_LENGTH property of the bond bond is set.
CDPL_VIS_API bool hasTripleBondTrimLength(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::TRIPLE_BOND_TRIM_LENGTH property of the bond bond is set.
CDPL_VIS_API const Font & getConfigurationLabelFont(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::CONFIGURATION_LABEL_FONT property of the atom atom.
CDPL_VIS_API const SizeSpecification & getCustomLabelSize(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::CUSTOM_LABEL_SIZE property of the atom atom.
CDPL_VIS_API const Font & getLabelFont(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::LABEL_FONT property of the atom atom.
CDPL_VIS_API bool hasLabelSize(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::LABEL_SIZE property of the atom atom is set.
CDPL_VIS_API const Color & getColor(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::COLOR property of the atom atom.
CDPL_VIS_API bool hasLineSpacing(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::LINE_SPACING property of the bond bond is set.
CDPL_VIS_API void clearLabelSize(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::LABEL_SIZE property of the atom atom.
CDPL_VIS_API void setLabelSize(Chem::Atom &atom, const SizeSpecification &size)
Sets the value of the Vis::AtomProperty::LABEL_SIZE property of the atom atom to size.
CDPL_VIS_API bool hasLineWidth(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::LINE_WIDTH property of the bond bond is set.
CDPL_VIS_API void clearHighlightAreaBrush(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::HIGHLIGHT_AREA_BRUSH property of the atom atom.
CDPL_VIS_API void setLabelFont(Chem::Atom &atom, const Font &font)
Sets the value of the Vis::AtomProperty::LABEL_FONT property of the atom atom to font.
CDPL_VIS_API void clearLabelMargin(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::LABEL_MARGIN property of the atom atom.
CDPL_VIS_API bool hasCustomLabel(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::CUSTOM_LABEL property of the atom atom is set.
CDPL_VIS_API void clearHighlightAreaOutlinePen(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::HIGHLIGHT_AREA_OUTLINE_PEN property of the atom atom.
CDPL_VIS_API bool hasReactionCenterLineSpacing(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::REACTION_CENTER_LINE_SPACING property of the bond bond is set.
CDPL_VIS_API bool getHighlightedFlag(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::HIGHLIGHTED_FLAG property of the atom atom.
CDPL_VIS_API bool hasDoubleBondTrimLength(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::DOUBLE_BOND_TRIM_LENGTH property of the bond bond is set.
CDPL_VIS_API void clearLineSpacing(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::LINE_SPACING property of the bond bond.
CDPL_VIS_API void clearConfigurationLabelColor(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::CONFIGURATION_LABEL_COLOR property of the atom atom.
CDPL_VIS_API void setLabelMargin(Chem::Atom &atom, const SizeSpecification &margin)
Sets the value of the Vis::AtomProperty::LABEL_MARGIN property of the atom atom to margin.
CDPL_VIS_API void setCustomLabelFont(Chem::Atom &atom, const Font &font)
Sets the value of the Vis::AtomProperty::CUSTOM_LABEL_FONT property of the atom atom to font.
CDPL_VIS_API bool hasLabelMargin(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::LABEL_MARGIN property of the atom atom is set.
CDPL_VIS_API bool hasCustomLabelColor(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::CUSTOM_LABEL_COLOR property of the atom atom is set.
CDPL_VIS_API void setHighlightedFlag(Chem::Atom &atom, bool highlighted)
Sets the value of the Vis::AtomProperty::HIGHLIGHTED_FLAG property of the atom atom to highlighted.
CDPL_VIS_API void setTripleBondTrimLength(Chem::Bond &bond, const SizeSpecification &length)
Sets the value of the Vis::BondProperty::TRIPLE_BOND_TRIM_LENGTH property of the bond bond to length.
CDPL_VIS_API bool hasHighlightAreaOutlinePen(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::HIGHLIGHT_AREA_OUTLINE_PEN property of the atom atom is set.
CDPL_VIS_API void setCustomLabel(Chem::Atom &atom, const std::string &text)
Sets the value of the Vis::AtomProperty::CUSTOM_LABEL property of the atom atom to text.
CDPL_VIS_API const Brush & getHighlightAreaBrush(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::HIGHLIGHT_AREA_BRUSH property of the atom atom.
CDPL_VIS_API bool hasLabelFont(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::LABEL_FONT property of the atom atom is set.
CDPL_VIS_API void setDoubleBondTrimLength(Chem::Bond &bond, const SizeSpecification &length)
Sets the value of the Vis::BondProperty::DOUBLE_BOND_TRIM_LENGTH property of the bond bond to length.
CDPL_VIS_API bool hasCustomLabelSize(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::CUSTOM_LABEL_SIZE property of the atom atom is set.
CDPL_VIS_API const SizeSpecification & getLabelSize(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::LABEL_SIZE property of the atom atom.
CDPL_VIS_API const SizeSpecification & getDoubleBondTrimLength(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::DOUBLE_BOND_TRIM_LENGTH property of the bond bond.
CDPL_VIS_API const SizeSpecification & getReactionCenterLineLength(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::REACTION_CENTER_LINE_LENGTH property of the bond bond.
CDPL_VIS_API void setReactionCenterLineLength(Chem::Bond &bond, const SizeSpecification &length)
Sets the value of the Vis::BondProperty::REACTION_CENTER_LINE_LENGTH property of the bond bond to len...
CDPL_VIS_API const SizeSpecification & getLineSpacing(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::LINE_SPACING property of the bond bond.
CDPL_VIS_API bool hasCustomLabelFont(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::CUSTOM_LABEL_FONT property of the atom atom is set.
CDPL_VIS_API const Pen & getHighlightAreaOutlinePen(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::HIGHLIGHT_AREA_OUTLINE_PEN property of the atom atom.
CDPL_VIS_API const SizeSpecification & getStereoBondHashSpacing(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::STEREO_BOND_HASH_SPACING property of the bond bond.
CDPL_VIS_API void setConfigurationLabelColor(Chem::Atom &atom, const Color &color)
Sets the value of the Vis::AtomProperty::CONFIGURATION_LABEL_COLOR property of the atom atom to color...
CDPL_VIS_API void clearTripleBondTrimLength(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::TRIPLE_BOND_TRIM_LENGTH property of the bond bond.
CDPL_VIS_API const SizeSpecification & getTripleBondTrimLength(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::TRIPLE_BOND_TRIM_LENGTH property of the bond bond.
CDPL_VIS_API bool hasStereoBondWedgeWidth(const Chem::Bond &bond)
Tells whether the Vis::BondProperty::STEREO_BOND_WEDGE_WIDTH property of the bond bond is set.
CDPL_VIS_API bool hasConfigurationLabelColor(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::CONFIGURATION_LABEL_COLOR property of the atom atom is set.
CDPL_VIS_API const SizeSpecification & getStereoBondWedgeWidth(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::STEREO_BOND_WEDGE_WIDTH property of the bond bond.
CDPL_VIS_API void setCustomLabelColor(Chem::Atom &atom, const Color &color)
Sets the value of the Vis::AtomProperty::CUSTOM_LABEL_COLOR property of the atom atom to color.
CDPL_VIS_API void clearLineWidth(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::LINE_WIDTH property of the bond bond.
CDPL_VIS_API void setConfigurationLabelSize(Chem::Atom &atom, const SizeSpecification &size)
Sets the value of the Vis::AtomProperty::CONFIGURATION_LABEL_SIZE property of the atom atom to size.
CDPL_VIS_API void clearColor(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::COLOR property of the atom atom.
CDPL_VIS_API bool hasHighlightAreaBrush(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::HIGHLIGHT_AREA_BRUSH property of the atom atom is set.
CDPL_VIS_API const SizeSpecification & getConfigurationLabelSize(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::CONFIGURATION_LABEL_SIZE property of the atom atom.
CDPL_VIS_API const SizeSpecification & getReactionCenterLineSpacing(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::REACTION_CENTER_LINE_SPACING property of the bond bond.
CDPL_VIS_API void clearCustomLabelFont(Chem::Atom &atom)
Clears the value of the Vis::AtomProperty::CUSTOM_LABEL_FONT property of the atom atom.
CDPL_VIS_API bool hasHighlightedFlag(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::HIGHLIGHTED_FLAG property of the atom atom is set.
CDPL_VIS_API const SizeSpecification & getLineWidth(const Chem::Bond &bond)
Returns the value of the Vis::BondProperty::LINE_WIDTH property of the bond bond.
CDPL_VIS_API bool hasConfigurationLabelSize(const Chem::Atom &atom)
Tells whether the Vis::AtomProperty::CONFIGURATION_LABEL_SIZE property of the atom atom is set.
CDPL_VIS_API void clearDoubleBondTrimLength(Chem::Bond &bond)
Clears the value of the Vis::BondProperty::DOUBLE_BOND_TRIM_LENGTH property of the bond bond.
CDPL_VIS_API const Font & getCustomLabelFont(const Chem::Atom &atom)
Returns the value of the Vis::AtomProperty::CUSTOM_LABEL_FONT property of the atom atom.
The namespace of the Chemical Data Processing Library.