The Gnome Chemistry Utils  0.13.7
Public Member Functions | Protected Attributes
gcr::View Class Reference

#include <gcr/view.h>

Inheritance diagram for gcr::View:
gcugtk::GLView gcu::GLView gcugtk::Printable gcu::DialogOwner

List of all members.

Public Member Functions

 View (Document *pDoc)
 Constructor.
virtual ~View ()
 Destructor.
virtual bool Load (xmlNodePtr node)
virtual xmlNodePtr Save (xmlDocPtr xml) const
void SetBackgroundColor (float red, float green, float blue, float alpha)
void GetBackgroundColor (double *red, double *green, double *blue, double *alpha)
gdouble & GetFoV ()
gdouble & GetPos ()
void GetRotation (double *psi, double *theta, double *phi)
void SetWindow (Window *val)
WindowGetWindow (void)

Protected Attributes

gdouble m_height
gdouble m_width

Detailed Description

The class representing a view of the model. Each document might have several views.

Definition at line 45 of file gcr/view.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
pDoca pointer to the Document instance.

Creates a new view for the document.

virtual gcr::View::~View ( ) [virtual]

Destructor.

The destructor of View.


Member Function Documentation

void gcr::View::GetBackgroundColor ( double *  red,
double *  green,
double *  blue,
double *  alpha 
)
Parameters:
redwhere to store the red component of the background color.
greenwhere to store the green component of the background color.
bluewhere to store the blue component of the background color.
alphawhere to store the alpha component of the background color.

Retrieves the view background color.

gdouble& gcr::View::GetFoV ( ) [inline]
Returns:
the field of view. Might be 0 for orthogonal projections.

Definition at line 96 of file gcr/view.h.

References gcu::GLView::GetRefAngle().

gdouble& gcr::View::GetPos ( ) [inline]
Returns:
the distance from the model center to the point of view. Not used for orthogonal projections.

Definition at line 102 of file gcr/view.h.

References gcu::GLView::m_Radius.

void gcr::View::GetRotation ( double *  psi,
double *  theta,
double *  phi 
)
Parameters:
psiwhere to store Euler's psi angle.
thetawhere to store Euler's theta angle.
phiwhere to store Euler's phi angle.

Retrieves the view orientation.

gcr::View::GetWindow ( void  ) [inline]
Returns:
the Window used to display the view.

Definition at line 131 of file gcr/view.h.

virtual bool gcr::View::Load ( xmlNodePtr  node) [virtual]
Parameters:
nodea pointer to the xmlNode containing the serialized view.

Loads the parameters of the view from an xmlNode.

virtual xmlNodePtr gcr::View::Save ( xmlDocPtr  xml) const [virtual]
Parameters:
xmlthe xmlDoc used to save the document.
Returns:
a pointer to the xmlNode containig the view parameters or NULL if an error occured.
void gcr::View::SetBackgroundColor ( float  red,
float  green,
float  blue,
float  alpha 
)
Parameters:
redthe red component of the background color.
greenthe green component of the background color.
bluethe blue component of the background color.
alphathe alpha component of the background color.

Sets the view background color.

gcr::View::SetWindow ( Window val) [inline]
Parameters:
vala Window

Sets the Window used to display the view.

Definition at line 131 of file gcr/view.h.


Member Data Documentation

gdouble gcr::View::m_height [protected]

The height of the widget.

Definition at line 117 of file gcr/view.h.

gdouble gcr::View::m_width [protected]

The width of the widget.

Definition at line 121 of file gcr/view.h.


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