OE2DBondDisplay

class OE2DBondDisplay : public OEBondDisplayBase

This class stores 2D depiction information of a bond. See Figure: OEDepict TK bond display class hierarchy.

../../_images/OEBondDisplayHierarchy.png

OEDepict TK bond display class hierarchy

The following methods are publicly inherited from OEBondDisplayBase:

GetDataType IsDataType SetVisible
GetBond IsVisible  

The OE2DBondDisplay class stores the following properties:

Property Get method Set method Corresponding namespace / class / type
pen used to draw the begin of the bond GetBgnPen SetBgnPen OEPen class
pen used to draw the end of the bond GetEndPen SetEndPen OEPen class
position of multi-line bonds GetDisplayPos SetDisplayPos OEBondDisplayPosition namespace
rendered bond type GetDisplayType SetDisplayType OEBondDisplayType namespace
rendered string as property GetProperty SetProperty string
font of property string GetPropertyFont SetPropertyFont OEFont class
position of property label GetPropertyOffset SetPropertyOffset OE2DPoint class

Constructors

OE2DBondDisplay(const OEChem::OEBondBase* bond)

Construct an OE2DBondDisplay object that contains the style information for bond.

OE2DBondDisplay(const OE2DBondDisplay &rhs)

Copy constructor.

operator=

OE2DBondDisplay &operator=(const OE2DBondDisplay &rhs)

Assignment operator.

CreateCopy

OESystem::OEBase *CreateCopy() const

Deep copy constructor that returns a pointer to a copy of the object. The memory returned is dynamically allocated and owned by the caller.

GetBgnPen

const OEPen &GetBgnPen() const

Returns the pen used to draw the bond from the “begin” atom coordinates to the middle of the bond.

../../_images/OE2DBondDisplay-GetBgnPen.png

See also

GetDisplayPos

unsigned int GetDisplayPos() const

Returns how multi-line bonds should be rendered. The return value is taken from the OEBondDisplayPosition namespace.

GetDisplayType

unsigned int GetDisplayType() const

Returns how bond orders, stereochemistry, and aromaticity is rendered for the bond. The return value is taken from the OEBondDisplayType namespace.

GetEndPen

const OEPen &GetEndPen() const

Returns the pen used to draw the bond from the “end” atom coordinates to the middle of the bond.

../../_images/OE2DBondDisplay-GetEndPen.png

See also

GetProperty

const std::string &GetProperty() const

Returns the string displayed next to the bond.

GetPropertyFont

const OEFont &GetPropertyFont() const

Returns the font that is used when displaying the property string of the OE2DBondDisplay object.

GetPropertyOffset

const OE2DPoint &GetPropertyOffset() const

Returns the offset vector (relative to the middle of the bond) that is used to position the property label of the bond. See Figure: The property offset vector is relative to the middle of the displayed bond.

../../_images/OE2DBondDisplay-GetPropertyOffset.png

The property offset vector is relative to the middle of the displayed bond

This allows for any string representable information to be rendered at a logical location near the bond. See example in Example of displaying indices as bond property.

../../_images/OE2DBondDisplay-GetProperty.png

Example of displaying indices as bond property

HasProperty

bool HasProperty() const

Return whether or not the property string of the OE2DBondDisplay object is empty.

SetBgnPen

void SetBgnPen(const OEPen &pen)

Sets the pen used to draw the bond from the “begin” atom coordinates to the middle of the bond.

See also

SetDisplayPos

void SetDisplayPos(unsigned int pos)

Sets the display position of the bond.

pos
This value has to be from the OEBondDisplayPosition namespace.

SetDisplayType

void SetDisplayType(unsigned int type)

Sets the display style of the bond.

type
This value has to be from the OEBondDisplayType namespace.

SetEndPen

void SetEndPen(const OEPen &pen)

Sets the pen used to draw the bond from the “end” atom coordinates to the middle of the bond.

See also

SetProperty

void SetProperty(const std::string &label)

Sets the string displayed next to the bond.

Warning

The preferred way to set the bond property strings is to use OE2DMolDisplayOptions::SetBondPropertyFunctor method. See example in the Displaying Bond Properties section.

SetPropertyFont

void SetPropertyFont(const OEFont &font)

Sets the font that is used when displaying the property string of the OE2DBondDisplay object.

Warning

The preferred way to set the font of the bond property strings is to use OE2DMolDisplayOptions::SetBondPropLabelFont method.

SetPropertyOffset

void SetPropertyOffset(const OE2DPoint& offset)

Sets the offset vector (relative to the middle of the bond) that is used to position the property label of the bond.