gcp::ReactionArrow Class Reference

Inheritance diagram for gcp::ReactionArrow:

gcp::Arrow gcu::Object List of all members.

Public Member Functions

xmlNodePtr Save (xmlDocPtr xml)
bool Load (xmlNodePtr)
void Add (GtkWidget *w)
void Update (GtkWidget *w)
void SetStartStep (ReactionStep *Step)
ReactionStepGetStartStep ()
void SetEndStep (ReactionStep *Step)
ReactionStepGetEndStep ()
bool BuildContextualMenu (GtkUIManager *UIManager, Object *object, double x, double y)
void Move (double x, double y, double z=0)
void SetSelected (GtkWidget *w, int state)
bool OnSignal (SignalId Signal, Object *Child)

Detailed Description

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


Member Function Documentation

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

Parameters:
xml,: the xmlDoc used to save the document.
Used to save the Object to the xmlDoc. Each serializable Object should implement this virtual method.
Returns:
the xmlNode containing the serialized object. The name of the node should be the name of the corresponding type used as first parameter to the Object::AddType method. The default method just saves the id and children.

Reimplemented from gcu::Object.

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

Parameters:
node,: a pointer to the xmlNode containing the serialized object.
Used to load an Object in memory. The Object must already exist.

Example:

        std::string str = (const char*)node->name;
        Object* pObject = Object::CreateObject(str, this);
        if (pObject) {
                if (!pObject->Load(node)) delete Object; 
        } else
                cerr << "Warning: unknown object: " << str << endl;

Returns:
true on succes, false otherwise.

Reimplemented from gcp::Arrow.

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

Parameters:
w,: the GtkWidget inside which the Object will be displayed.
Used to add a representation of the Object in the widget. This method might be overrided for displayable Object classes unless the application uses another mechanism.

Reimplemented from gcu::Object.

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

Parameters:
w,: the GtkWidget inside which the Object is displayed.
Used to update the representation of the Object in the widget. This method might be overrided for displayable Object classes unless the application uses another mechanism.

Reimplemented from gcu::Object.

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

Parameters:
UIManager,: the GtkUIanager 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 object. It is called by Object::ShowContextualMenu, so it should not be necessary to call it directly. It should be overrided by derived classes when a contextual menu is needed. Typically, each class adds a submenu and calls the same method for its parent. Default implementation calls registered BuildMenuCb callbacks and the parent's method. Derived classes should call Object::BuildContextualMenu before returning.
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 an object. This virtual method should most often be overrided by Object derived classes for which it makes sense. The base Object class has no coordinates and the default method only loads its id and children.

Reimplemented from gcp::Arrow.

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

Parameters:
w,: the GtkWidget inside which the Object is displayed.
state,: the selection state of the Object.
Used to set the selection state of the Object inside the widget. The values of state are application dependant and have no default value.

Reimplemented from gcp::Arrow.

bool gcp::ReactionArrow::OnSignal ( SignalId  Signal,
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 object. 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.


The documentation for this class was generated from the following file:
Generated on Thu Jun 28 09:02:03 2007 for The Gnome Chemistry Utils by  doxygen 1.5.2