#include <gcp/bond.h>
Public Member Functions | |
Bond () | |
Bond (Atom *first, Atom *last, unsigned char order) | |
virtual | ~Bond () |
virtual Object * | GetAtomAt (double x, double y, double z=0.) |
BondType | GetType () const |
void | AddCycle (gcu::Cycle *pCycle) |
void | RemoveCycle (gcu::Cycle *pCycle) |
void | RemoveAllCycles () |
virtual bool | SaveNode (xmlDocPtr xml, xmlNodePtr) const |
virtual bool | LoadNode (xmlNodePtr node) |
virtual void | Update (GtkWidget *w) const |
virtual void | Move (double x, double y, double z=0) |
virtual void | Transform2D (gcu::Matrix2D &m, double x, double y) |
void | IncOrder (int n=1) |
void | SetSelected (GtkWidget *w, int state) |
void | Add (GtkWidget *w) const |
double | GetYAlign () |
bool | BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y) |
bool | SetProperty (unsigned property, char const *value) |
Definition at line 73 of file gcp/bond.h.
gcp::Bond::Bond | ( | ) |
The default constructor.
Reimplemented from gcu::Bond.
first | the first bonded atom. | |
last | the last bonded atom. | |
order | the bond order |
virtual gcp::Bond::~Bond | ( | ) | [virtual] |
The destructor.
Reimplemented from gcu::Bond.
virtual Object* gcp::Bond::GetAtomAt | ( | double | x, | |
double | y, | |||
double | z = 0. | |||
) | [virtual] |
x | the x coordinate | |
y | the y coordinate | |
z | the z coordinate |
Reimplemented from gcu::Object.
BondType gcp::Bond::GetType | ( | ) | const [inline] |
Reimplemented from gcu::Object.
Definition at line 94 of file gcp/bond.h.
void gcp::Bond::AddCycle | ( | gcu::Cycle * | pCycle | ) | [virtual] |
void gcp::Bond::RemoveCycle | ( | gcu::Cycle * | pCycle | ) | [virtual] |
void gcp::Bond::RemoveAllCycles | ( | ) | [virtual] |
Clears the bond cycles list.
Reimplemented from gcu::Bond.
virtual bool gcp::Bond::SaveNode | ( | xmlDocPtr | xml, | |
xmlNodePtr | node | |||
) | const [virtual] |
xml | the xmlDoc used to save the document. | |
node | a pointer to the xmlNode to which this Bond is serialized. |
Reimplemented from gcu::Bond.
virtual bool gcp::Bond::LoadNode | ( | xmlNodePtr | node | ) | [virtual] |
virtual void gcp::Bond::Update | ( | GtkWidget * | w | ) | const [virtual] |
w | the GtkWidget inside which the Object is displayed. |
Reimplemented from gcu::Object.
virtual void gcp::Bond::Move | ( | double | x, | |
double | y, | |||
double | z = 0 | |||
) | [virtual] |
x | the x component of the transation vector. | |
y | the y component of the transation vector. | |
z | the z component of the transation vector. |
Reimplemented from gcu::Bond.
virtual void gcp::Bond::Transform2D | ( | gcu::Matrix2D & | m, | |
double | x, | |||
double | y | |||
) | [virtual] |
m | the 2D Matrix of the transformation. | |
x | the x component of the center of the transformation. | |
y | the y component of the center of the transformation. |
Reimplemented from gcu::Bond.
void gcp::Bond::IncOrder | ( | int | n = 1 |
) | [virtual] |
n | the bond order increment. If not given, the default is 1. |
Reimplemented from gcu::Bond.
void gcp::Bond::SetSelected | ( | GtkWidget * | w, | |
int | state | |||
) | [virtual] |
w | the GtkWidget inside which the bond is displayed. | |
state | the selection state of the bond. |
Reimplemented from gcu::Object.
void gcp::Bond::Add | ( | GtkWidget * | w | ) | const [virtual] |
w | the GtkWidget inside which the Object will be displayed. |
Reimplemented from gcu::Object.
double gcp::Bond::GetYAlign | ( | ) | [virtual] |
Used to retrieve the y coordinate for alignment. The default implementation returns 0.0 and every derived class for which alignment has a meaning should implement this method.
Reimplemented from gcu::Object.
bool gcp::Bond::BuildContextualMenu | ( | GtkUIManager * | UIManager, | |
Object * | object, | |||
double | x, | |||
double | y | |||
) |
UIManager,: | the GtkUIManager to populate. | |
object | the atom on which occured the mouse click. | |
x | x coordinate of the mouse click. | |
y | y coordinate of the mouse click. |
bool gcp::Bond::SetProperty | ( | unsigned | property, | |
char const * | value | |||
) | [virtual] |
property | the identity of the property as defined in objprops.h. | |
value | the value of the property as a string. |
Reimplemented from gcu::Bond.