The Gnome Chemistry Utils
0.13.6
|
#include <gcu/glview.h>
Public Member Functions | |
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 |
Protected Member Functions | |
virtual bool | GLBegin () |
virtual void | GLEnd () |
Protected Attributes | |
GtkWidget * | m_Widget |
View class based on OpenGL for rendering. Used to display 3d chemical structures such as molecules or crystals cells.
Definition at line 40 of file tk/glview.h.
gcugtk::GLView::GLView | ( | gcu::GLDocument * | pDoc | ) | throw (std::runtime_error) |
Constructor.
pDoc,: | a pointer to the GLDocument instance. |
Creates a view for the document.
Reimplemented from gcu::GLView.
virtual gcugtk::GLView::~GLView | ( | ) | [virtual] |
GdkPixbuf* gcugtk::GLView::BuildPixbuf | ( | unsigned | width, |
unsigned | height, | ||
bool | use_bg | ||
) | const [virtual] |
width | the width of the generated image. |
height | the height of the generated image. |
use_bg | whether to use the window background or a transparent background. |
Generates a pixbuf from the current view.
Reimplemented from gcu::GLView.
void gcugtk::GLView::DoPrint | ( | GtkPrintOperation * | print, |
GtkPrintContext * | context, | ||
int | page | ||
) | const [virtual] |
a GtkPrintOperation. | |
context | a GtkPrintContext. |
page | the page to print. |
Prints the current view at 300 dpi.
Implements gcugtk::Printable.
GtkWindow* gcugtk::GLView::GetGtkWindow | ( | ) | [inline, virtual] |
Implements gcugtk::Printable.
Definition at line 65 of file tk/glview.h.
References m_Widget.
GtkWidget* gcugtk::GLView::GetWidget | ( | ) | [inline] |
virtual bool gcugtk::GLView::GLBegin | ( | ) | [protected, virtual] |
Starts an OpenGL drawing operation. Will set the appropriate context. This method is pure virtual and must be implemented in derived classes.
Implements gcu::GLView.
virtual void gcugtk::GLView::GLEnd | ( | ) | [protected, virtual] |
Ends an OpenGL drawing operation. This method is pure virtual and must be implemented in derived classes.
Implements gcu::GLView.
void gcugtk::GLView::Update | ( | ) | [virtual] |
Update the contents of the associated widget. This method must be called each time the document or the view are modified.
Reimplemented from gcu::GLView.
GtkWidget* gcugtk::GLView::m_Widget [protected] |
The associated widget.
Definition at line 101 of file tk/glview.h.
Referenced by GetGtkWindow(), and GetWidget().