Mechanism curved arrows.
More...
#include <mechanism-arrow.h>
List of all members.
Detailed Description
Mechanism curved arrows.
Curved arrows used to represent electrons movements during a mechanim step.
Definition at line 45 of file mechanism-arrow.h.
Constructor & Destructor Documentation
gcp::MechanismArrow::MechanismArrow |
( |
| ) |
|
virtual gcp::MechanismArrow::~MechanismArrow |
( |
| ) |
[virtual] |
Member Function Documentation
void gcp::MechanismArrow::AddItem |
( |
| ) |
[virtual] |
Used to add a representation of the mechanism arrow in the view.
Reimplemented from gccv::ItemClient.
bool gcp::MechanismArrow::CanSelect |
( |
| ) |
const [virtual] |
gcp::MechanismArrow::GetEndAtNewBondCenter |
( |
void |
| ) |
const [inline] |
- Returns:
- whether to end the arrow at the center of the new bond. The value is not significant when no new bond is created.
Definition at line 197 of file mechanism-arrow.h.
gcp::MechanismArrow::GetPair |
( |
void |
| ) |
const [inline] |
- Returns:
- whether the elctron movement concerns a pair or a single electron.
Definition at line 192 of file mechanism-arrow.h.
gcp::MechanismArrow::GetShowControls |
( |
void |
| ) |
const [inline] |
gcp::MechanismArrow::GetSource |
( |
void |
| ) |
const [inline] |
gcp::MechanismArrow::GetSourceAux |
( |
void |
| ) |
const [inline] |
gcp::MechanismArrow::GetTarget |
( |
void |
| ) |
const [inline] |
bool gcp::MechanismArrow::Load |
( |
xmlNodePtr |
node | ) |
[virtual] |
- Parameters:
-
node | a pointer to the xmlNode containing the serialized arrow. |
Used to load a mechanism arrow in memory. The arrow must already exist.
- Returns:
- true on succes, false otherwise.
Reimplemented from gcu::Object.
std::string gcp::MechanismArrow::Name |
( |
| ) |
[virtual] |
- Returns:
- the localized object generic name.
Reimplemented from gcu::Object.
void gcp::MechanismArrow::OnLoaded |
( |
| ) |
[virtual] |
Ensure that links are correctly set.
Reimplemented from gcu::Object.
void gcp::MechanismArrow::OnUnlink |
( |
Object * |
object | ) |
|
- Parameters:
-
object | the object just unlinked by Object::Unlink. |
xmlNodePtr gcp::MechanismArrow::Save |
( |
xmlDocPtr |
xml | ) |
const [virtual] |
- Parameters:
-
xml | the xmlDoc used to save the document. |
Used to save the mechanism arrow to the xmlDoc.
- Returns:
- the xmlNode containing the serialized arrow.
Reimplemented from gcu::Object.
void gcp::MechanismArrow::SetControlPoint |
( |
int |
num, |
|
|
double |
dx, |
|
|
double |
dy |
|
) |
| |
- Parameters:
-
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 | ) |
|
- Parameters:
-
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 | ) |
|
- Parameters:
-
is_pair | whether the arrow represents an electrons pair move or a single electron move. |
Sets the type of electron move.
void gcp::MechanismArrow::SetSelected |
( |
int |
state | ) |
[virtual] |
void gcp::MechanismArrow::SetShowControls |
( |
bool |
show | ) |
|
- Parameters:
-
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 | ) |
|
- Parameters:
-
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 | ) |
|
- Parameters:
-
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 | ) |
|
- Parameters:
-
target | the target of the electron move. |
Sets where the arrow ends. Might be an atom or a bond.
void gcp::MechanismArrow::Transform2D |
( |
gcu::Matrix2D & |
m, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| [virtual] |
- Parameters:
-
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.
The documentation for this class was generated from the following file: