version 3.3

VRS::GtkCanvas Class Reference

#include <vrs/gtk/gtkcanvas.h>

Inheritance diagram for VRS::GtkCanvas:

VRS::GLCanvas VRS::Canvas VRS::Manager VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 GtkCanvas (void)
 < Merger of GLCanvas and Gtk::GLArea
virtual ~GtkCanvas ()
virtual void setSize (unsigned int width, unsigned int height)
 Sets width and height of the canvas in pixels.
virtual unsigned int getWidth () const
 Returns the width in pixels of the canvas.
virtual unsigned int getHeight () const
 Returns the height in pixels of the canvas.
virtual int getProperties () const
virtual void makeContextCurrent ()
 Hook for subclasses, should make the correct rendering context current.
GtkWidget * gtkobj () const
 Used to get access to the GTK+ opengl rendering area.
 VRS_TYPEINFO (GtkCanvas, GLCanvas)

Protected Member Functions

void initgl ()
virtual void finishRedisplay ()
 called after OpenGL redisplay
gboolean button_press_event (GdkEventButton *)
gboolean button_release_event (GdkEventButton *)
gboolean motion_notify_event (GdkEventMotion *)
gboolean key_press_event (GdkEventKey *)
gboolean key_release_event (GdkEventKey *)
gboolean enter_notify_event (GdkEventCrossing *)
gboolean leave_notify_event (GdkEventCrossing *)
void realize ()
gboolean expose_event (GdkEventExpose *)
gboolean configure_event (GdkEventConfigure *)
gboolean map_event (GdkEventAny *)
gboolean umap_event (void)
InputEvent::Modifier convertState (guint)
InputEvent::Button convertButton (guint)
VRSTime convertTime (guint32)

Static Protected Member Functions

static gboolean buttonPressCB (GtkWidget *, GdkEventButton *, gpointer)
static gboolean buttonReleaseCB (GtkWidget *, GdkEventButton *, gpointer)
static gboolean motionCB (GtkWidget *, GdkEventMotion *, gpointer)
static gboolean keyPressCB (GtkWidget *, GdkEventKey *, gpointer)
static gboolean keyReleaseCB (GtkWidget *, GdkEventKey *, gpointer)
static gboolean enterCB (GtkWidget *, GdkEventCrossing *, gpointer)
static gboolean leaveCB (GtkWidget *, GdkEventCrossing *, gpointer)
static void realizeCB (GtkWidget *, gpointer)
static gboolean exposeCB (GtkWidget *, GdkEventExpose *, gpointer)
static gboolean configureCB (GtkWidget *, GdkEventConfigure *, gpointer)
static gboolean mapCB (GtkWidget *, GdkEventAny *event, gpointer)
static gboolean umapCB (GtkWidget *, GdkEventAny *, gpointer)


Constructor & Destructor Documentation

VRS::GtkCanvas::GtkCanvas ( void   ) 

< Merger of GLCanvas and Gtk::GLArea

virtual VRS::GtkCanvas::~GtkCanvas (  )  [virtual]

This canvas encapsulates a Gtk::GlExt widget and converts the incoming events to VRS events, passing them on to `Canvas'.


Member Function Documentation

virtual void VRS::GtkCanvas::setSize ( unsigned int  width,
unsigned int  height 
) [virtual]

Sets width and height of the canvas in pixels.

Implements VRS::Canvas.

virtual unsigned int VRS::GtkCanvas::getWidth (  )  const [virtual]

Returns the width in pixels of the canvas.

Implements VRS::Canvas.

virtual unsigned int VRS::GtkCanvas::getHeight (  )  const [virtual]

Returns the height in pixels of the canvas.

Implements VRS::Canvas.

virtual int VRS::GtkCanvas::getProperties (  )  const [virtual]

Returns the OpenGL capabilities of the canvas. This method is not implemented currently!

Implements VRS::GLCanvas.

virtual void VRS::GtkCanvas::makeContextCurrent (  )  [virtual]

Hook for subclasses, should make the correct rendering context current.

Since makeContextCurrent should be the first action in order to prepare a redisplay, it should use as least ressources as possible (e.g. the engine). The creation of the engine (and other ressources) can not be forced by this abstract base class, so there may be no engine when makeContextCurrent is called.

Reimplemented from VRS::Canvas.

GtkWidget* VRS::GtkCanvas::gtkobj (  )  const [inline]

Used to get access to the GTK+ opengl rendering area.

VRS::GtkCanvas::VRS_TYPEINFO ( GtkCanvas  ,
GLCanvas   
)

void VRS::GtkCanvas::initgl (  )  [protected]

virtual void VRS::GtkCanvas::finishRedisplay (  )  [protected, virtual]

called after OpenGL redisplay

invokes Canvas::finishRedisplay and deactivates standard attributes for OpenGL rendering.

Reimplemented from VRS::GLCanvas.

gboolean VRS::GtkCanvas::button_press_event ( GdkEventButton *   )  [protected]

gboolean VRS::GtkCanvas::button_release_event ( GdkEventButton *   )  [protected]

gboolean VRS::GtkCanvas::motion_notify_event ( GdkEventMotion *   )  [protected]

gboolean VRS::GtkCanvas::key_press_event ( GdkEventKey *   )  [protected]

gboolean VRS::GtkCanvas::key_release_event ( GdkEventKey *   )  [protected]

gboolean VRS::GtkCanvas::enter_notify_event ( GdkEventCrossing *   )  [protected]

gboolean VRS::GtkCanvas::leave_notify_event ( GdkEventCrossing *   )  [protected]

void VRS::GtkCanvas::realize (  )  [protected]

gboolean VRS::GtkCanvas::expose_event ( GdkEventExpose *   )  [protected]

gboolean VRS::GtkCanvas::configure_event ( GdkEventConfigure *   )  [protected]

gboolean VRS::GtkCanvas::map_event ( GdkEventAny *   )  [protected]

gboolean VRS::GtkCanvas::umap_event ( void   )  [protected]

InputEvent::Modifier VRS::GtkCanvas::convertState ( guint   )  [protected]

InputEvent::Button VRS::GtkCanvas::convertButton ( guint   )  [protected]

VRSTime VRS::GtkCanvas::convertTime ( guint32   )  [protected]

static gboolean VRS::GtkCanvas::buttonPressCB ( GtkWidget *  ,
GdkEventButton *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::buttonReleaseCB ( GtkWidget *  ,
GdkEventButton *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::motionCB ( GtkWidget *  ,
GdkEventMotion *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::keyPressCB ( GtkWidget *  ,
GdkEventKey *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::keyReleaseCB ( GtkWidget *  ,
GdkEventKey *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::enterCB ( GtkWidget *  ,
GdkEventCrossing *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::leaveCB ( GtkWidget *  ,
GdkEventCrossing *  ,
gpointer   
) [static, protected]

static void VRS::GtkCanvas::realizeCB ( GtkWidget *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::exposeCB ( GtkWidget *  ,
GdkEventExpose *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::configureCB ( GtkWidget *  ,
GdkEventConfigure *  ,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::mapCB ( GtkWidget *  ,
GdkEventAny *  event,
gpointer   
) [static, protected]

static gboolean VRS::GtkCanvas::umapCB ( GtkWidget *  ,
GdkEventAny *  ,
gpointer   
) [static, protected]


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

Generated on Mon May 21 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact