SoGtk  0.1.0
Coin3D GUI toolkit binding
All Classes Functions Variables Typedefs Enumerations Enumerator Modules Pages
SoGtkKeyboard Class Reference

The SoGtkKeyboard class is the keyboard input device abstraction. More...

#include <Inventor/Gtk/devices/SoGtkKeyboard.h>

Inheritance diagram for SoGtkKeyboard:
SoGtkDevice SoGtkObject

Public Types

enum  Events { KEY_PRESS = 0x01 , KEY_RELEASE = 0x02 , ALL_EVENTS = KEY_PRESS | KEY_RELEASE }
 

Public Member Functions

 SoGtkKeyboard (int eventmask=ALL_EVENTS)
 
virtual ~SoGtkKeyboard (void)
 
virtual void disable (GtkWidget *widget, SoGtkEventHandler *handler, void *closure)
 
virtual void enable (GtkWidget *widget, SoGtkEventHandler *handler, void *closure)
 
virtual const SoEvent * translateEvent (GdkEvent *event)
 
- Public Member Functions inherited from SoGtkDevice
virtual ~SoGtkDevice ()
 
SbVec2s getWindowSize (void) const
 
void setWindowSize (const SbVec2s size)
 
- Public Member Functions inherited from SoGtkObject
virtual SoType getTypeId (void) const =0
 
SbBool isOfType (SoType type) const
 

Additional Inherited Members

- Static Public Member Functions inherited from SoGtkDevice
static void initClasses (void)
 
- Static Public Member Functions inherited from SoGtkObject
static SoType getClassTypeId (void)
 
static void init (void)
 
static void initClass (void)
 
- Protected Member Functions inherited from SoGtkDevice
 SoGtkDevice (void)
 
void addEventHandler (GtkWidget *, SoGtkEventHandler *, void *)
 
void invokeHandlers (GdkEvent *event)
 
void removeEventHandler (GtkWidget *, SoGtkEventHandler *, void *)
 
void setEventPosition (SoEvent *event, int x, int y) const
 
- Static Protected Member Functions inherited from SoGtkDevice
static SbVec2s getLastEventPosition (void)
 

Detailed Description

The SoGtkKeyboard class is the keyboard input device abstraction.

The SoGtkKeyboard class is the glue between native keyboard handling and keyboard interaction with the Inventor scene graph.

All components derived from the SoGtkRenderArea have got an SoGtkKeyboard device attached by default.

Member Enumeration Documentation

◆ Events

Enumeration over supported event types.

Enumerator
KEY_PRESS 

Maskbit for a keyboard button press event.

KEY_RELEASE 

Maskbit for a keyboard button release event.

ALL_EVENTS 

Combined bitmask for all possible events.

Constructor & Destructor Documentation

◆ SoGtkKeyboard()

SoGtkKeyboard::SoGtkKeyboard ( int mask = ALL_EVENTS)

Constructor. The mask specifies which keyboard-related events to handle. Others will just be ignored.

◆ ~SoGtkKeyboard()

SoGtkKeyboard::~SoGtkKeyboard ( void )
virtual

Destructor.

Member Function Documentation

◆ disable()

void SoGtkKeyboard::disable ( GtkWidget * widget,
SoGtkEventHandler * handler,
void * closure )
virtual

This method will disable the handler for the device.

Implements SoGtkDevice.

◆ enable()

void SoGtkKeyboard::enable ( GtkWidget * widget,
SoGtkEventHandler * handler,
void * closure )
virtual

This method will enable the device for the widget.

handler is invoked with the closure argument when an event occur in widget.

Implements SoGtkDevice.

◆ translateEvent()

const SoEvent * SoGtkKeyboard::translateEvent ( GdkEvent * event)
virtual

This method translates from native events to Open Inventor SoEvent events.

Implements SoGtkDevice.


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