#include <osgGtk/GraphicsWindowGtk.h>
Public Member Functions | |
GraphicsWindowGtk (int width, int height, int 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 | ~GraphicsWindowGtk () |
virtual bool | isSameKindAs (const osg::Object *object) const |
virtual const char * | libraryName () const |
virtual const char * | className () const |
GtkWidget * | gtk_widget () |
Returns the gtk_gl_drawing_area that the scenegraph will be rendered into. | |
operator GtkWidget * () | |
Implicitly converts the graphics window to a GtkWidget*. | |
virtual void | grabFocus () |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual void | grabFocusIfPointerInWindow () |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual bool | valid () const |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual bool | setWindowRectangleImplementation (int x, int y, int width, int height) |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual void | setCursor (MouseCursor mouseCursor) |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual bool | setWindowDecorationImplementation (bool flag) |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual void | setWindowName (const std::string &name) |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual bool | realizeImplementation () |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual bool | isRealizedImplementation () const |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual bool | makeCurrentImplementation () |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual bool | releaseContextImplementation () |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual void | closeImplementation () |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior. | |
virtual void | swapBuffersImplementation () |
Overrides osgViewer::GraphicsWindow with Gtk 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 | |
void | transform_mouse_x_y (double &x, double &y) |
Static Protected Member Functions | |
static gboolean | on_button_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
static gboolean | on_configure_event (GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) |
static gboolean | on_key_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) |
static gboolean | on_motion_notify_event (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
static gboolean | on_proximity_event (GtkWidget *widget, GdkEventProximity *event, gpointer user_data) |
static gboolean | on_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer user_data) |
Protected Attributes | |
GtkWidget * | m_gtk_widget |
GdkGLConfig * | m_gdk_gl_config |
osgViewer::GraphicsWindowGtk::GraphicsWindowGtk | ( | int | width, | |
int | height, | |||
int | mode = GDK_GL_MODE_RGB|GDK_GL_MODE_DEPTH|GDK_GL_MODE_DOUBLE | |||
) |
Constructs the gtk graphics window of the specified width and height.
References m_gdk_gl_config, m_gtk_widget, on_button_event(), on_configure_event(), on_key_event(), on_motion_notify_event(), on_proximity_event(), and on_scroll_event().
osgViewer::GraphicsWindowGtk::~GraphicsWindowGtk | ( | ) | [virtual] |
const char * osgViewer::GraphicsWindowGtk::className | ( | ) | const [virtual] |
void osgViewer::GraphicsWindowGtk::closeImplementation | ( | ) | [virtual] |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior.
bool osgViewer::GraphicsWindowGtk::gl_begin | ( | ) |
Convenience method to implement glBegin() on this window's OpenGL drawable.
References m_gtk_widget.
bool osgViewer::GraphicsWindowGtk::gl_end | ( | ) |
void osgViewer::GraphicsWindowGtk::grabFocus | ( | ) | [virtual] |
void osgViewer::GraphicsWindowGtk::grabFocusIfPointerInWindow | ( | ) | [virtual] |
GtkWidget * osgViewer::GraphicsWindowGtk::gtk_widget | ( | ) |
Returns the gtk_gl_drawing_area that the scenegraph will be rendered into.
References m_gtk_widget.
Referenced by osgViewer::ViewerGtk::setup_viewer_in_gtk_window().
bool osgViewer::GraphicsWindowGtk::isRealizedImplementation | ( | ) | const [virtual] |
bool osgViewer::GraphicsWindowGtk::isSameKindAs | ( | const osg::Object * | object | ) | const [virtual] |
const char * osgViewer::GraphicsWindowGtk::libraryName | ( | ) | const [virtual] |
bool osgViewer::GraphicsWindowGtk::makeCurrentImplementation | ( | ) | [virtual] |
gboolean osgViewer::GraphicsWindowGtk::on_button_event | ( | GtkWidget * | widget, | |
GdkEventButton * | event, | |||
gpointer | user_data | |||
) | [static, protected] |
gboolean osgViewer::GraphicsWindowGtk::on_configure_event | ( | GtkWidget * | widget, | |
GdkEventConfigure * | event, | |||
gpointer | user_data | |||
) | [static, protected] |
Referenced by GraphicsWindowGtk().
gboolean osgViewer::GraphicsWindowGtk::on_key_event | ( | GtkWidget * | widget, | |
GdkEventKey * | event, | |||
gpointer | user_data | |||
) | [static, protected] |
Referenced by GraphicsWindowGtk().
gboolean osgViewer::GraphicsWindowGtk::on_motion_notify_event | ( | GtkWidget * | widget, | |
GdkEventMotion * | event, | |||
gpointer | user_data | |||
) | [static, protected] |
Referenced by GraphicsWindowGtk().
gboolean osgViewer::GraphicsWindowGtk::on_proximity_event | ( | GtkWidget * | widget, | |
GdkEventProximity * | event, | |||
gpointer | user_data | |||
) | [static, protected] |
Referenced by GraphicsWindowGtk().
gboolean osgViewer::GraphicsWindowGtk::on_scroll_event | ( | GtkWidget * | widget, | |
GdkEventScroll * | event, | |||
gpointer | user_data | |||
) | [static, protected] |
Referenced by GraphicsWindowGtk().
osgViewer::GraphicsWindowGtk::operator GtkWidget * | ( | ) | [inline] |
bool osgViewer::GraphicsWindowGtk::realizeImplementation | ( | ) | [virtual] |
bool osgViewer::GraphicsWindowGtk::releaseContextImplementation | ( | ) | [virtual] |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior.
void osgViewer::GraphicsWindowGtk::setCursor | ( | MouseCursor | mouseCursor | ) | [virtual] |
bool osgViewer::GraphicsWindowGtk::setWindowDecorationImplementation | ( | bool | flag | ) | [virtual] |
void osgViewer::GraphicsWindowGtk::setWindowName | ( | const std::string & | name | ) | [virtual] |
bool osgViewer::GraphicsWindowGtk::setWindowRectangleImplementation | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) | [virtual] |
bool osgViewer::GraphicsWindowGtk::swap_buffers | ( | ) |
Convenience method to swap the OpenGL buffers if double-buffered or call glFlush() if single-buffered.
References m_gtk_widget.
Referenced by swapBuffersImplementation().
void osgViewer::GraphicsWindowGtk::swapBuffersImplementation | ( | ) | [virtual] |
void osgViewer::GraphicsWindowGtk::transform_mouse_x_y | ( | double & | x, | |
double & | y | |||
) | [protected] |
Referenced by on_button_event().
bool osgViewer::GraphicsWindowGtk::valid | ( | ) | const [virtual] |
Overrides osgViewer::GraphicsWindow with Gtk specific behavior.
GdkGLConfig* osgViewer::GraphicsWindowGtk::m_gdk_gl_config [protected] |
Referenced by GraphicsWindowGtk().
GtkWidget* osgViewer::GraphicsWindowGtk::m_gtk_widget [protected] |
Referenced by gl_begin(), gl_end(), grabFocus(), grabFocusIfPointerInWindow(), GraphicsWindowGtk(), gtk_widget(), isRealizedImplementation(), makeCurrentImplementation(), operator GtkWidget *(), realizeImplementation(), setCursor(), setWindowDecorationImplementation(), setWindowName(), setWindowRectangleImplementation(), and swap_buffers().