Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
SoXtKeyboard Class Reference

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

#include <Inventor/Xt/devices/SoXtKeyboard.h>

Inheritance diagram for SoXtKeyboard:
SoXtDevice SoXtObject

Public Types

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

Public Member Functions

 SoXtKeyboard (int eventmask=ALL_EVENTS)
 
virtual ~SoXtKeyboard (void)
 
virtual void enable (Widget widget, SoXtEventHandler *handler, void *closure)
 
virtual void disable (Widget widget, SoXtEventHandler *handler, void *closure)
 
virtual const SoEvent * translateEvent (XAnyEvent *event)
 
- Public Member Functions inherited from SoXtDevice
virtual ~SoXtDevice ()
 
void setWindowSize (const SbVec2s size)
 
SbVec2s getWindowSize (void) const
 
- Public Member Functions inherited from SoXtObject
virtual SoType getTypeId (void) const =0
 
SbBool isOfType (SoType type) const
 

Additional Inherited Members

- Static Public Member Functions inherited from SoXtDevice
static void initClasses (void)
 
- Static Public Member Functions inherited from SoXtObject
static void initClass (void)
 
static SoType getClassTypeId (void)
 
static void init (void)
 
- Protected Member Functions inherited from SoXtDevice
 SoXtDevice (void)
 
void setEventPosition (SoEvent *event, int x, int y) const
 
void addEventHandler (Widget, SoXtEventHandler *, void *)
 
void removeEventHandler (Widget, SoXtEventHandler *, void *)
 
void invokeHandlers (XAnyEvent *event)
 
- Static Protected Member Functions inherited from SoXtDevice
static SbVec2s getLastEventPosition (void)
 

Detailed Description

The SoXtKeyboard class is the keyboard input device abstraction.

The SoXtKeyboard class is the glue between native keyboard handling and keyboard interaction with the Inventor scenegraph.

All components derived from the SoXtRenderArea have got an SoXtKeyboard 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

◆ SoXtKeyboard()

SoXtKeyboard::SoXtKeyboard ( int  mask = ALL_EVENTS)

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

◆ ~SoXtKeyboard()

SoXtKeyboard::~SoXtKeyboard ( void  )
virtual

Destructor.

Member Function Documentation

◆ enable()

void SoXtKeyboard::enable ( Widget  widget,
SoXtEventHandler *  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 SoXtDevice.

◆ disable()

void SoXtKeyboard::disable ( Widget  widget,
SoXtEventHandler *  handler,
void *  closure 
)
virtual

This method will disable the handler for the device.

Implements SoXtDevice.

◆ translateEvent()

const SoEvent * SoXtKeyboard::translateEvent ( XAnyEvent *  event)
virtual

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

Implements SoXtDevice.


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