gcu::GLView Class Reference

Inheritance diagram for gcu::GLView:

gcu::CrystalView List of all members.

Public Member Functions

 GLView (GLDocument *pDoc)
 Constructor.
virtual ~GLView ()
 Destructor.
GtkWidget * GetWidget ()
void Init ()
void Reshape ()
void Draw ()
bool OnPressed (GdkEventButton *event)
bool OnMotion (GdkEventMotion *event)
void Update ()
void SaveAsImage (string const &filename, char const *type, map< string, string > &options, int resolution=0)

Protected Attributes

GtkWidget * m_pWidget
unsigned m_nGLList

Detailed Description

Definition at line 42 of file glview.h.


Constructor & Destructor Documentation

gcu::GLView::GLView ( GLDocument pDoc  ) 

Constructor.

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

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

Destructor.

The destructor of GLView.


Member Function Documentation

void gcu::GLView::Init (  ) 

Initialize the associated widget. Automatically called by the framework.

void gcu::GLView::Reshape (  ) 

Automatically called by the framework when the associated widget size changes.

void gcu::GLView::Draw (  ) 

Draws the contents of the associated widget. Automatically called by the framework.

bool gcu::GLView::OnPressed ( GdkEventButton *  event  ) 

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

bool gcu::GLView::OnMotion ( GdkEventMotion *  event  ) 

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

Returns:
true if a motion really occured, false otherwise.

void gcu::GLView::Update (  ) 

Update the contents of the associated widget. This method must be called each time the document or the view are modified.

void gcu::GLView::SaveAsImage ( string const &  filename,
char const *  type,
map< string, string > &  options,
int  resolution = 0 
)

Parameters:
filename,: the name of the file.
type,: the type as supported by GdkPixbuf (e.g. "png" or "jpeg").
options,: the pairs of keys/values to pass GdkPixbuf.
resolution,: the resolution to use. This means that the image size will be the view size multiplied by resolution divided by the screen resolution. If 0, the screen resolution is used.
Export the view contents as an image.


The documentation for this class was generated from the following file:
Generated on Sun Nov 26 11:43:08 2006 for The Gnome Chemistry Utils by  doxygen 1.5.1