Translates and reports messages for the keyboard device. More...
#include <Inventor/Win/devices/SoWinKeyboard.h>
Public Member Functions | |
SoWinKeyboard (EventMask mask=SO_WIN_ALL_KEYBOARD_EVENTS) | |
Constructor. | |
~SoWinKeyboard () | |
Destructor. | |
virtual void | enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=NULL) |
Enables the device for the passed window handle. | |
virtual void | disable (SoWidget w, XtEventHandler f, XtPointer data) |
Disables the device. | |
virtual const SoEvent * | translateEvent (XAnyEvent *xevent) |
Attempts to convert the passed message into an SoEvent. | |
Public Member Functions inherited from SoWinDevice | |
void | setWindowSize (const SbVec2s &s) |
Sets the size of the window this device is registered for. | |
const SbVec2s & | getWindowSize () const |
Gets the size of the window this device is registered for. | |
Translates and reports messages for the keyboard device.
This class translates and manages messages generated by the keyboard, including key press and release messages (SoKeyboardEvent).
Definition at line 50 of file SoWinKeyboard.h.
SoWinKeyboard::SoWinKeyboard | ( | EventMask | mask = SO_WIN_ALL_KEYBOARD_EVENTS | ) |
Constructor.
To the constructor, pass which keyboard messages you are interested in as a bitwise OR of the following values:
KeyPressMask - Key press messages
KeyReleaseMask - Key release messages
Or simply pass the defined value SO_WIN_ALL_KEYBOARD_EVENTS for all keyboard messages. The device will only report messages of this type for the window handle it is enabled on.
SoWinKeyboard::~SoWinKeyboard | ( | ) |
Destructor.
|
virtual |
Disables the device.
Implements SoWinDevice.
|
virtual |
Enables the device for the passed window handle.
When enabled, the callback function f will be invoked when messages occur in the window. data is the clientData which will be passed.
Implements SoWinDevice.
Attempts to convert the passed message into an SoEvent.
Returns a pointer to an internal SoEvent object owned by the class. Do not delete this object. If the message was not generated by this device, then NULL is returned.
Implements SoWinDevice.