gcp::ReactionArrow Class Reference

#include <gcp/reaction-arrow.h>

Inheritance diagram for gcp::ReactionArrow:

gcp::Arrow gcu::Object

List of all members.

Public Member Functions

virtual ~ReactionArrow ()
xmlNodePtr Save (xmlDocPtr xml) const
bool Load (xmlNodePtr node)
void Add (GtkWidget *w) const
void Update (GtkWidget *w) const
void SetStartStep (ReactionStep *Step)
ReactionStepGetStartStep ()
void SetEndStep (ReactionStep *Step)
ReactionStepGetEndStep ()
void RemoveStep (ReactionStep *Step)
bool BuildContextualMenu (GtkUIManager *UIManager, gcu::Object *object, double x, double y)
void Move (double x, double y, double z=0)
void SetSelected (GtkWidget *w, int state)
void AddProp (gcu::Object *object)
void PositionChild (ReactionProp *prop)
bool OnSignal (gcu::SignalId Signal, gcu::Object *Child)
bool SetProperty (unsigned property, char const *value)


Detailed Description

Arrow class for arrows used in chemical reactions.

Definition at line 38 of file reaction-arrow.h.


Constructor & Destructor Documentation

virtual gcp::ReactionArrow::~ReactionArrow (  )  [virtual]

The destructor.


Member Function Documentation

xmlNodePtr gcp::ReactionArrow::Save ( xmlDocPtr  xml  )  const [virtual]

Parameters:
xml the xmlDoc used to save the document.
Used to save the arrow to the xmlDoc.
Returns:
the xmlNode containing the serialized arrow.

Reimplemented from gcu::Object.

bool gcp::ReactionArrow::Load ( xmlNodePtr  node  )  [virtual]

Parameters:
node,: a pointer to the xmlNode containing the serialized arrow.
Used to load an arrow in memory.
Returns:
true on succes, false otherwise.

Reimplemented from gcp::Arrow.

void gcp::ReactionArrow::Add ( GtkWidget *  w  )  const [virtual]

Parameters:
w the GtkWidget inside which the arrow will be displayed.
Used to add a representation of the arrow in the widget.

Reimplemented from gcu::Object.

void gcp::ReactionArrow::Update ( GtkWidget *  w  )  const [virtual]

Parameters:
w the GtkWidget inside which the arrow is displayed.
Used to update the representation of the arrow in the widget.

Reimplemented from gcu::Object.

void gcp::ReactionArrow::SetStartStep ( ReactionStep Step  )  [inline]

Parameters:
Step the reaction step before the reaction
Sets the initial reaction step.

Definition at line 80 of file reaction-arrow.h.

ReactionStep* gcp::ReactionArrow::GetStartStep (  )  [inline]

Returns:
the initial reaction step.

Definition at line 84 of file reaction-arrow.h.

void gcp::ReactionArrow::SetEndStep ( ReactionStep Step  )  [inline]

Parameters:
Step the reaction step after the reaction
Sets the final reaction step.

Definition at line 90 of file reaction-arrow.h.

ReactionStep* gcp::ReactionArrow::GetEndStep (  )  [inline]

Returns:
the final reaction step.

Definition at line 94 of file reaction-arrow.h.

void gcp::ReactionArrow::RemoveStep ( ReactionStep Step  ) 

Parameters:
Step the reaction step to remove from the reaction
Removes the reaction step, which might be either the initial or final step. If it not one of these, nothing is done.

bool gcp::ReactionArrow::BuildContextualMenu ( GtkUIManager *  UIManager,
gcu::Object object,
double  x,
double  y 
) [virtual]

Parameters:
UIManager the GtkUIManager to populate.
object the Object on which occured the mouse click.
x x coordinate of the mouse click.
y y coordinate of the mouse click.
This method is called to build a contextual menu for the arrow.
Returns:
true if something is added to the UIManager, false otherwise.

Reimplemented from gcu::Object.

void gcp::ReactionArrow::Move ( double  x,
double  y,
double  z = 0 
) [virtual]

Parameters:
x the x component of the transation vector.
y the y component of the transation vector.
z the z component of the transation vector.
Used to move a reaction arrow. It will also move the objects attached to the arrow if any.

Reimplemented from gcp::Arrow.

void gcp::ReactionArrow::SetSelected ( GtkWidget *  w,
int  state 
) [virtual]

Parameters:
w,: the GtkWidget inside which the arrow is displayed.
state,: the selection state of the arrow.
Used to set the selection state of the arrow inside the widget. The values of state might be gcp::SelStateUnselected, gcp::SelStateSelected, gcp::SelStateUpdating, or gcp::SelStateErasing. Children will be selected too.

Reimplemented from gcp::Arrow.

void gcp::ReactionArrow::AddProp ( gcu::Object object  ) 

Parameters:
object the object to attach to the arrow.
Attach an object to the arrow and pops up the reaction property dialog box.

void gcp::ReactionArrow::PositionChild ( ReactionProp prop  ) 

Parameters:
prop the attached property to position.
Position an object at the right place near the arrow.

bool gcp::ReactionArrow::OnSignal ( gcu::SignalId  Signal,
gcu::Object Child 
) [virtual]

Parameters:
Signal the appropriate SignalId
Child the child which emitted the signal or NULL
This function is called by the framework when a signal has been emitted for the arrow, such as when an attached object size changed. It should not be called by a program; call Object::EmitSignal instead.

Returns:
true if the signal should be propagated to the parent, false otherwise.

Reimplemented from gcu::Object.

bool gcp::ReactionArrow::SetProperty ( unsigned  property,
char const *  value 
) [virtual]

Parameters:
property the property id as defined in objprops.h
value the property value as a string
Used when loading to set common properties to arrows. Only one property is currently supported: gcu::GCU_PROP_REACTION_ARROW_TYPE.
Returns:
true if the property could be set, or if the property is not relevant, false otherwise.

Reimplemented from gcp::Arrow.


The documentation for this class was generated from the following file:

Generated on Sat Nov 29 08:27:38 2008 for The Gnome Chemistry Utils by  doxygen 1.5.6