The Gnome Chemistry Utils  0.14.0
Public Member Functions | Protected Attributes | List of all members
gcr::View Class Reference

#include <gcr/view.h>

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

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)
- Public Member Functions inherited from gcugtk::GLView
 GLView (gcu::GLDocument *pDoc) throw (std::runtime_error)
 Constructor.
virtual ~GLView ()
 Destructor.
GtkWidget * GetWidget ()
GtkWindow * GetGtkWindow ()
void Update ()
void DoPrint (GtkPrintOperation *print, GtkPrintContext *context, int page) const
GdkPixbuf * BuildPixbuf (unsigned width, unsigned height, bool use_bg) const
- Public Member Functions inherited from gcu::GLView
void SetRotation (double psi, double theta, double phi)
void SaveAsImage (std::string const &filename, char const *type, std::map< std::string, std::string > &options, unsigned width, unsigned height, bool use_bg) const
void RenderToCairo (cairo_t *cr, unsigned width, unsigned height, bool use_bg) const
void SetAngle (double val)
double GetAngle (void) const
double & GetRefAngle (void)
void SetPsi (double val)
double GetPsi (void) const
double & GetRefPsi (void)
void SetPhi (double val)
double GetPhi (void) const
double & GetRefPhi (void)
void SetTheta (double val)
double GetTheta (void) const
double & GetRefTheta (void)
void SetRed (float val)
float GetRed (void) const
float & GetRefRed (void)
void SetGreen (float val)
float GetGreen (void) const
float & GetRefGreen (void)
void SetBlue (float val)
float GetBlue (void) const
float & GetRefBlue (void)
void SetAlpha (float val)
float GetAlpha (void) const
float & GetRefAlpha (void)
GLDocumentGetDoc (void)
double GetRadius (void)
- Public Member Functions inherited from gcugtk::Printable
 Printable ()
virtual ~Printable ()
virtual bool SupportsHeaders ()
virtual bool SupportMultiplePages ()
virtual int GetPagesNumber ()
void Print (bool preview)
void SetPageSetup (GtkPageSetup *PageSetup)
GtkPrintSettings * GetPrintSettings (void) const
void SetUnit (GtkUnit val)
GtkUnit GetUnit (void) const
GtkUnit & GetRefUnit (void)
void SetHeaderHeight (double val)
double GetHeaderHeight (void) const
double & GetRefHeaderHeight (void)
void SetFooterHeight (double val)
double GetFooterHeight (void) const
double & GetRefFooterHeight (void)
void SetHorizCentered (bool val)
bool GetHorizCentered (void) const
bool & GetRefHorizCentered (void)
void SetVertCentered (bool val)
bool GetVertCentered (void) const
bool & GetRefVertCentered (void)
void SetScaleType (PrintScaleType val)
PrintScaleType GetScaleType (void) const
PrintScaleTypeGetRefScaleType (void)
void SetScale (double val)
double GetScale (void) const
double & GetRefScale (void)
void SetHorizFit (bool val)
bool GetHorizFit (void) const
bool & GetRefHorizFit (void)
void SetVertFit (bool val)
bool GetVertFit (void) const
bool & GetRefVertFit (void)
void SetHPages (int val)
int GetHPages (void) const
int & GetRefHPages (void)
void SetVPages (int val)
int GetVPages (void) const
int & GetRefVPages (void)
void SetHasBackground (bool val)
bool GetHasBackground (void) const
bool & GetRefHasBackground (void)
void SetPrintBackground (bool val)
bool GetPrintBackground (void) const
bool & GetRefPrintBackground (void)
- Public Member Functions inherited from gcu::DialogOwner
 DialogOwner ()
virtual ~DialogOwner ()
DialogGetDialog (std::string name) const
void ClearDialogs ()

Protected Attributes

gdouble m_height
gdouble m_width
- Protected Attributes inherited from gcugtk::GLView
GtkWidget * m_Widget
- Protected Attributes inherited from gcu::GLView
Matrix m_Euler
double m_Lastx
double m_Lasty
int m_WindowHeight
int m_WindowWidth
double m_Height
double m_Width
double m_Near
double m_Far
double m_Radius

Additional Inherited Members

- Protected Member Functions inherited from gcugtk::GLView
virtual bool GLBegin ()
virtual void GLEnd ()

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

gcr::View::View ( Document pDoc)

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: