gcu::CrystalView Class Reference

#include <gcu/crystalview.h>

Inheritance diagram for gcu::CrystalView:

gcu::GLView

List of all members.

Public Member Functions

 CrystalView (CrystalDoc *pDoc)
 Constructor.
virtual ~CrystalView ()
 Destructor.
virtual bool Load (xmlNodePtr node)
virtual xmlNodePtr Save (xmlDocPtr xml)

Protected Attributes

gdouble m_height
gdouble m_width


Detailed Description

The class representing a view of the model. Each document might have several views. Most methods are automatically called by the framework and should not be explicitely used in programs.

Definition at line 44 of file crystalview.h.


Constructor & Destructor Documentation

gcu::CrystalView::CrystalView ( CrystalDoc pDoc  ) 

Constructor.

Parameters:
pDoc,: a pointer to the CrystalDoc instance.
Creates a new view for the document.

virtual gcu::CrystalView::~CrystalView (  )  [virtual]

Destructor.

The destructor of CrystalView.


Member Function Documentation

virtual bool gcu::CrystalView::Load ( xmlNodePtr  node  )  [virtual]

Parameters:
widget,: a pointer to a widget created by CreateNewWidget().
Initialize the widget. Automatically called by the framework.

Parameters:
widget,: a pointer to a widget created by CreateNewWidget().
Automatically called by the framework when the the widget size changes.

Parameters:
widget,: a pointer to a widget created by CreateNewWidget().
Draws the contents of the widget. Automatically called by the framework.

Updates all widgets of the view. This method must be called each time the document or the view are modified.

Parameters:
widget,: a pointer to a widget created by CreateNewWidget().
Update the contents of widget. Automatically called by the framework when Update() is executed.

Parameters:
widget,: a pointer to a widget created by CreateNewWidget().
event,: a pointer to a GdkEvent.
Automatically called by the framework when a left button click occurs in the widget drawing area.

Parameters:
widget,: a pointer to a widget created by CreateNewWidget().
event,: a pointer to a GdkEvent.
Automatically called by the framework when the mouse cursor moves over the widget drawing area.

Parameters:
widget,: a pointer to a widget created by CreateNewWidget().
Automatically called by the framework when the widget is destroyed.

Parameters:
node,: a pointer to the xmlNode containing the serialized view.
Loads the parameters of the view from an xmlNode.

virtual xmlNodePtr gcu::CrystalView::Save ( xmlDocPtr  xml  )  [virtual]

Parameters:
xml,: the xmlDoc used to save the document.
Returns:
a pointer to the xmlNode containig the view parameters or NULL if an error occured.


Member Data Documentation

gdouble gcu::CrystalView::m_height [protected]

Parameters:
x,: the x component of the rotation.
y,: the y component of the rotation.
Called by OnMotion(). x and y are the displacement coordinates of the mouse.

The field of view.

The distance of the center of the model from the viewer.

Euler's Psi angle giving the orientaion of the crystal in the view.

Euler's Theta angle giving the orientaion of the crystal in the view.

Euler's Phi angle giving the orientaion of the crystal in the view.

The height of the widget.

Definition at line 154 of file crystalview.h.

gdouble gcu::CrystalView::m_width [protected]

The width of the widget.

Definition at line 158 of file crystalview.h.


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

Generated on Tue Mar 18 16:06:03 2008 for The Gnome Chemistry Utils by  doxygen 1.5.5