The Gnome Chemistry Utils
0.14.0
|
Mechanism curved arrows. More...
#include <mechanism-arrow.h>
Public Member Functions | |
MechanismArrow () | |
virtual | ~MechanismArrow () |
void | SetSource (gcu::Object *source) |
void | SetSourceAux (gcu::Object *aux) |
void | SetTarget (gcu::Object *target) |
void | SetControlPoint (int num, double dx, double dy) |
void | SetShowControls (bool show) |
void | SetPair (bool is_pair) |
void | SetEndAtNewBondCenter (bool end_at_new_bond_center) |
xmlNodePtr | Save (xmlDocPtr xml) const |
bool | Load (xmlNodePtr node) |
void | Transform2D (gcu::Matrix2D &m, double x, double y) |
void | AddItem () |
void | SetSelected (int state) |
void | OnUnlink (Object *object) |
void | OnLoaded () |
std::string | Name () |
bool | CanSelect () const |
gcu::Object * | GetSource (void) const |
gcu::Object * | GetSourceAux (void) const |
gcu::Object * | GetTarget (void) const |
bool | GetShowControls (void) const |
bool | GetPair (void) const |
bool | GetEndAtNewBondCenter (void) const |
![]() | |
Object (TypeId Id=OtherType) | |
virtual | ~Object () |
TypeId | GetType () const |
void | SetId (gchar const *Id) |
char const * | GetId () const |
virtual void | AddChild (Object *object) |
Object * | GetMolecule () const |
Object * | GetReaction () const |
Object * | GetGroup () const |
Document * | GetDocument () const |
Application * | GetApplication () const |
Object * | GetParentOfType (TypeId Id) const |
Object * | GetChild (const gchar *Id) const |
Object * | GetFirstChild (std::map< std::string, Object * >::iterator &i) |
Object * | GetNextChild (std::map< std::string, Object * >::iterator &i) |
Object * | GetDescendant (const char *Id) const |
Object * | GetParent () const |
void | SetParent (Object *Parent) |
virtual bool | GetCoords (double *x, double *y, double *z=NULL) const |
virtual void | Move (double x, double y, double z=0.) |
bool | SaveChildren (xmlDocPtr xml, xmlNodePtr node) const |
void | SaveId (xmlNodePtr node) const |
xmlNodePtr | GetNodeByProp (xmlNodePtr node, char const *Property, char const *Id) |
xmlNodePtr | GetNextNodeByProp (xmlNodePtr node, char const *Property, char const *Id) |
xmlNodePtr | GetNodeByName (xmlNodePtr node, char const *Name) |
xmlNodePtr | GetNextNodeByName (xmlNodePtr node, char const *Name) |
bool | HasChildren () const |
unsigned | GetChildrenNumber () const |
virtual Object * | GetAtomAt (double x, double y, double z=0.) |
virtual bool | Build (std::set< Object * > const &Children) throw (std::invalid_argument) |
virtual double | GetYAlign () |
virtual bool | BuildContextualMenu (UIManager *uim, Object *object, double x, double y) |
void | EmitSignal (SignalId Signal) |
virtual bool | OnSignal (SignalId Signal, Object *Child) |
void | Lock (bool state=true) |
bool | IsLocked () |
Object * | GetFirstLink (std::set< Object * >::iterator &i) |
Object * | GetNextLink (std::set< Object * >::iterator &i) |
void | Link (Object *object) |
void | Unlink (Object *object) |
virtual void | OnUnlink (Object *object) |
void | GetPossibleAncestorTypes (std::set< TypeId > &types) const |
virtual bool | SetProperty (unsigned property, char const *value) |
virtual std::string | GetProperty (unsigned property) const |
void | SetDirty (bool dirty=true) |
virtual void | Clear () |
std::string | Identity () |
virtual char const * | HasPropertiesDialog () const |
virtual void | NotifyEmpty () |
void | ShowPropertiesDialog () |
bool | GetDirty (void) const |
![]() | |
ItemClient () | |
virtual | ~ItemClient () |
virtual void | UpdateItem () |
Item * | GetItem (void) |
Additional Inherited Members | |
![]() | |
static TypeId | AddType (std::string TypeName, Object *(*CreateFunc)(), TypeId id=OtherType) |
static void | AddAlias (TypeId id, std::string TypeName) |
static Object * | CreateObject (const std::string &TypeName, Object *parent=NULL) |
static TypeId | GetTypeId (const std::string &Name) |
static std::string | GetTypeName (TypeId Id) |
static void | AddMenuCallback (TypeId Id, BuildMenuCb cb) |
static void | AddRule (TypeId type1, RuleId rule, TypeId type2) |
static void | AddRule (const std::string &type1, RuleId rule, const std::string &type2) |
static const std::set< TypeId > & | GetRules (TypeId type, RuleId rule) |
static const std::set< TypeId > & | GetRules (const std::string &type, RuleId rule) |
static void | SetCreationLabel (TypeId Id, std::string Label) |
static const std::string & | GetCreationLabel (TypeId Id) |
static const std::string & | GetCreationLabel (const std::string &TypeName) |
static SignalId | CreateNewSignalId () |
![]() | |
virtual Dialog * | BuildPropertiesDialog () |
![]() | |
Item * | m_Item |
Mechanism curved arrows.
Curved arrows used to represent electrons movements during a mechanim step.
Definition at line 45 of file mechanism-arrow.h.
gcp::MechanismArrow::MechanismArrow | ( | ) |
Constructs a new MechanismArrow.
|
virtual |
The destructor.
|
virtual |
Used to add a representation of the mechanism arrow in the view.
Reimplemented from gccv::ItemClient.
|
virtual |
Reimplemented from gcu::Object.
|
inline |
Definition at line 197 of file mechanism-arrow.h.
|
inline |
Definition at line 192 of file mechanism-arrow.h.
|
inline |
Definition at line 188 of file mechanism-arrow.h.
|
inline |
Definition at line 176 of file mechanism-arrow.h.
|
inline |
Definition at line 180 of file mechanism-arrow.h.
|
inline |
Definition at line 184 of file mechanism-arrow.h.
|
virtual |
node | a pointer to the xmlNode containing the serialized arrow. |
Used to load a mechanism arrow in memory. The arrow must already exist.
Reimplemented from gcu::Object.
|
virtual |
Reimplemented from gcu::Object.
|
virtual |
Ensure that links are correctly set.
Reimplemented from gcu::Object.
void gcp::MechanismArrow::OnUnlink | ( | Object * | object | ) |
object | the object just unlinked by Object::Unlink. |
|
virtual |
xml | the xmlDoc used to save the document. |
Used to save the mechanism arrow to the xmlDoc.
Reimplemented from gcu::Object.
void gcp::MechanismArrow::SetControlPoint | ( | int | num, |
double | dx, | ||
double | dy | ||
) |
num | the control point numbre, should be 1 or 2. |
dx | the x coordinate of the vector. |
dy | the y coordinate of the vector. |
Sets the position of the intermediate control points used to construct a Bezier cubic curve for the arrow. If num is 1, the vector starts at the start point of the arrow, and if num is 2 it starts at the arrow end.
void gcp::MechanismArrow::SetEndAtNewBondCenter | ( | bool | end_at_new_bond_center | ) |
end_at_new_bond_center | the position of the arrow end for new bonds. |
For arrows representing an electrons pair movement creating a new bond, the might end either at the target atom or at the centeer of the created bond.
void gcp::MechanismArrow::SetPair | ( | bool | is_pair | ) |
is_pair | whether the arrow represents an electrons pair move or a single electron move. |
Sets the type of electron move.
|
virtual |
state | the selection state of the text. |
Used to set the selection state of text inside. The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, gcp::SelStateUpdating, or gcp::SelStateErasing.
Reimplemented from gccv::ItemClient.
void gcp::MechanismArrow::SetShowControls | ( | bool | show | ) |
show | whether to show the control points. |
Show or hide the control points. Showing the control points is useful when editing.
void gcp::MechanismArrow::SetSource | ( | gcu::Object * | source | ) |
source | the source of the electrons. |
Sets the initial owner, atom or bond, of the electrons. An Electron instance is also allowed there.
void gcp::MechanismArrow::SetSourceAux | ( | gcu::Object * | aux | ) |
aux | an object. |
Used when a new bond is created by the electron move, using initially bonding electrons. In that case the source is the initial bond, the target, the not bonded atom of the new bond, and the auxilliary source, the atom of the initial bond which will be bonded to the target.
void gcp::MechanismArrow::SetTarget | ( | gcu::Object * | target | ) |
target | the target of the electron move. |
Sets where the arrow ends. Might be an atom or a bond.
|
virtual |
m | the Matrix2D of the transformation. |
x | the x component of the center of the transformation. |
y | the y component of the center of the transformation. |
Used to move and/or transform a mechanism arrow.
Reimplemented from gcu::Object.