Translates and reports windows messages for the touch screen device. More...
#include <Inventor/touch/devices/SoWinTouchScreen.h>
Public Member Functions | |
SoWinTouchScreen (SoWidget myWindow) | |
virtual | ~SoWinTouchScreen () |
virtual void | enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=NULL) |
virtual void | disable (SoWidget w, XtEventHandler f, XtPointer data) |
virtual const SoEvent * | translateEvent (XAnyEvent *xe) |
SoTouchManager * | getTouchManager () const |
Translates and reports windows messages for the touch screen device.
This class represents a touch screen input device for the Microsoft Windows OS. It translates and manages messages generated by the touch screen. When the touch screen device is registered in an SoWinRenderArea, the device is able to generate Open Inventor touch events (see SoTouchEvent) and gesture events (see SoGestureEvent) that can be handled (for example) using an SoEventCallback node.
It analyses each touch event and updates events in the SoTouchEvent table of SoTouchManager.
Note: Unlike SoWinMouse and SoWinKeyboard, this device must be explicitly registered with the render area / viewer by the application.
Widget mainWindow = SoWin::init(argv[0]); . . . SoWinExaminerViewer* viewer = new SoWinExaminerViewer( mainWindow ); SoWinTouchScreen touchScreenDevice( mainWindow ); viewer->registerDevice( &touchScreenDevice );
SoWinDevice, SoTouchManager, SoTouchEvent, SoGestureEvent
SoWinTouchScreen::SoWinTouchScreen | ( | SoWidget | myWindow | ) |
Constructor.
virtual SoWinTouchScreen::~SoWinTouchScreen | ( | ) | [virtual] |
Destructor.
virtual void SoWinTouchScreen::disable | ( | SoWidget | w, | |
XtEventHandler | f, | |||
XtPointer | data | |||
) | [virtual] |
Disables the device.
Implements SoWinDevice.
virtual void SoWinTouchScreen::enable | ( | SoWidget | w, | |
XtEventHandler | f, | |||
XtPointer | data, | |||
Window | win = NULL | |||
) | [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.
SoTouchManager* SoWinTouchScreen::getTouchManager | ( | ) | const |
Returns the SoTouchManager.
This object contains the events table, recognizers list and methods to use them.
virtual const SoEvent* SoWinTouchScreen::translateEvent | ( | XAnyEvent * | xe | ) | [virtual] |
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.