osgGtk logo

osgViewer::GraphicsWindowGtkmm Class Reference

This class extends osgViewer::GraphicsWindow to provide an OpenGL rending context for osgViewer::Viewer inside Gtk::GL::DrawingArea. More...

#include <osgGtkmm/GraphicsWindowGtkmm.h>

List of all members.

Public Member Functions

 GraphicsWindowGtkmm (int width, int height, Gdk::GL::ConfigMode mode=Gdk::GL::MODE_RGB|Gdk::GL::MODE_DEPTH|Gdk::GL::MODE_DOUBLE)
 Constructs the gtk graphics window of the specified width and height.
virtual ~GraphicsWindowGtkmm ()
virtual bool isSameKindAs (const osg::Object *object) const
virtual const char * libraryName () const
virtual const char * className () const
virtual void grabFocus ()
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual void grabFocusIfPointerInWindow ()
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual bool valid () const
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual bool setWindowRectangleImplementation (int x, int y, int width, int height)
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual void setCursor (MouseCursor mouseCursor)
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual bool setWindowDecorationImplementation (bool flag)
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual void setWindowName (const std::string &name)
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual bool realizeImplementation ()
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual bool isRealizedImplementation () const
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual bool makeCurrentImplementation ()
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual bool releaseContextImplementation ()
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual void closeImplementation ()
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
virtual void swapBuffersImplementation ()
 Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.
bool swap_buffers ()
 Convenience method to swap the OpenGL buffers if double-buffered or call glFlush() if single-buffered.
bool gl_begin ()
 Convenience method to implement glBegin() on this window's OpenGL drawable.
bool gl_end ()
 Convenience method to implement glEnd() on this window's OpenGL drawable.

Protected Member Functions

virtual bool on_button_press_event (GdkEventButton *event)
virtual bool on_button_release_event (GdkEventButton *event)
virtual bool on_configure_event (GdkEventConfigure *event)
virtual bool on_key_press_event (GdkEventKey *event)
virtual bool on_key_release_event (GdkEventKey *event)
virtual bool on_motion_notify_event (GdkEventMotion *event)
virtual bool on_proximity_in_event (GdkEventProximity *event)
virtual bool on_proximity_out_event (GdkEventProximity *event)
virtual bool on_scroll_event (GdkEventScroll *event)
void transform_mouse_x_y (double &x, double &y)

Protected Attributes

Glib::RefPtr< Gdk::GL::Config > m_gl_config


Detailed Description

This class extends osgViewer::GraphicsWindow to provide an OpenGL rending context for osgViewer::Viewer inside Gtk::GL::DrawingArea.

Todo:
add a constructor that takes a traits argument and configures GL mode from traits
Author:
Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>
Examples:

osgviewerGtkmm/osgviewerGtkmm.cpp, and osgviewerGtkmm/osgviewerGtkmm_simple.cpp.


Constructor & Destructor Documentation

osgViewer::GraphicsWindowGtkmm::GraphicsWindowGtkmm ( int  width,
int  height,
Gdk::GL::ConfigMode  mode = Gdk::GL::MODE_RGB|Gdk::GL::MODE_DEPTH|Gdk::GL::MODE_DOUBLE 
)

Constructs the gtk graphics window of the specified width and height.

osgViewer::GraphicsWindowGtkmm::~GraphicsWindowGtkmm (  )  [virtual]


Member Function Documentation

const char * osgViewer::GraphicsWindowGtkmm::className (  )  const [virtual]

void osgViewer::GraphicsWindowGtkmm::closeImplementation (  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::gl_begin (  ) 

Convenience method to implement glBegin() on this window's OpenGL drawable.

bool osgViewer::GraphicsWindowGtkmm::gl_end (  ) 

Convenience method to implement glEnd() on this window's OpenGL drawable.

void osgViewer::GraphicsWindowGtkmm::grabFocus (  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

void osgViewer::GraphicsWindowGtkmm::grabFocusIfPointerInWindow (  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::isRealizedImplementation (  )  const [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::isSameKindAs ( const osg::Object *  object  )  const [virtual]

const char * osgViewer::GraphicsWindowGtkmm::libraryName (  )  const [virtual]

bool osgViewer::GraphicsWindowGtkmm::makeCurrentImplementation (  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::on_button_press_event ( GdkEventButton *  event  )  [protected, virtual]

References transform_mouse_x_y().

bool osgViewer::GraphicsWindowGtkmm::on_button_release_event ( GdkEventButton *  event  )  [protected, virtual]

References transform_mouse_x_y().

bool osgViewer::GraphicsWindowGtkmm::on_configure_event ( GdkEventConfigure *  event  )  [protected, virtual]

bool osgViewer::GraphicsWindowGtkmm::on_key_press_event ( GdkEventKey *  event  )  [protected, virtual]

bool osgViewer::GraphicsWindowGtkmm::on_key_release_event ( GdkEventKey *  event  )  [protected, virtual]

bool osgViewer::GraphicsWindowGtkmm::on_motion_notify_event ( GdkEventMotion *  event  )  [protected, virtual]

References transform_mouse_x_y().

bool osgViewer::GraphicsWindowGtkmm::on_proximity_in_event ( GdkEventProximity *  event  )  [protected, virtual]

bool osgViewer::GraphicsWindowGtkmm::on_proximity_out_event ( GdkEventProximity *  event  )  [protected, virtual]

bool osgViewer::GraphicsWindowGtkmm::on_scroll_event ( GdkEventScroll *  event  )  [protected, virtual]

bool osgViewer::GraphicsWindowGtkmm::realizeImplementation (  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::releaseContextImplementation (  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

void osgViewer::GraphicsWindowGtkmm::setCursor ( MouseCursor  mouseCursor  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::setWindowDecorationImplementation ( bool  flag  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

void osgViewer::GraphicsWindowGtkmm::setWindowName ( const std::string &  name  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::setWindowRectangleImplementation ( int  x,
int  y,
int  width,
int  height 
) [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

bool osgViewer::GraphicsWindowGtkmm::swap_buffers (  ) 

Convenience method to swap the OpenGL buffers if double-buffered or call glFlush() if single-buffered.

Referenced by swapBuffersImplementation().

void osgViewer::GraphicsWindowGtkmm::swapBuffersImplementation (  )  [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.

References swap_buffers().

void osgViewer::GraphicsWindowGtkmm::transform_mouse_x_y ( double &  x,
double &  y 
) [protected]

bool osgViewer::GraphicsWindowGtkmm::valid (  )  const [virtual]

Overrides osgViewer::GraphicsWindow with Gtkmm specific behavior.


Member Data Documentation

Glib::RefPtr<Gdk::GL::Config> osgViewer::GraphicsWindowGtkmm::m_gl_config [protected]


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

Generated on Thu Mar 19 10:06:43 2009 for osgGtkmm by doxygen 1.5.7.1