|
http://www.sim.no http://www.coin3d.org |
#include <Inventor/Xt/devices/SoXtMouse.h>
Inheritance diagram for SoXtMouse:

The SoXtMouse class is the glue between native mouse handling and mouse interaction in the Inventor scenegraph.
All components derived from the SoXtRenderArea have got an SoXtMouse device attached by default.
One important note for application programmers: our mappings to SoMouseButtonEvent::BUTTON2 and SoMouseButtonEvent::BUTTON3 do not match the mappings in SGI's InventorXt library or TGS's SoWin library for 3-button mice. They map mouse buttons like this:
While in this SIM SoXt library the mappings are:
This is a conscious design decision we've made. The reason is that BUTTON2 should be the right mouse button whether you have a 2-button mouse or a 3-button mouse.
Public Types | |
| BUTTON_PRESS = 0x01 | |
| BUTTON_RELEASE = 0x02 | |
| POINTER_MOTION = 0x04 | |
| BUTTON_MOTION = 0x08 | |
| ALL_EVENTS = BUTTON_PRESS | BUTTON_RELEASE | POINTER_MOTION | BUTTON_MOTION | |
| enum | Events { BUTTON_PRESS = 0x01, BUTTON_RELEASE = 0x02, POINTER_MOTION = 0x04, BUTTON_MOTION = 0x08, ALL_EVENTS = BUTTON_PRESS | BUTTON_RELEASE | POINTER_MOTION | BUTTON_MOTION } |
Public Member Functions | |
| SoXtMouse (int eventmask=ALL_EVENTS) | |
| virtual | ~SoXtMouse (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) |
Friends | |
| class | SoXtMouseP |
| class | SoGuiMouseP |
| enum SoXtMouse::Events |
Enumeration over supported mouse events.
| SoXtMouse::SoXtMouse | ( | int | mask = ALL_EVENTS |
) |
Constructor. The mask argument should contain the set of SoXtMouse::Events one is interested in tracking.
| SoXtMouse::~SoXtMouse | ( | void | ) | [virtual] |
Destructor.
| void SoXtMouse::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.
| void SoXtMouse::disable | ( | Widget | widget, | |
| SoXtEventHandler * | handler, | |||
| void * | closure | |||
| ) | [virtual] |
This method will disable the handler for the device.
Implements SoXtDevice.
| const SoEvent * SoXtMouse::translateEvent | ( | XAnyEvent * | event | ) | [virtual] |
Translates a native event from the underlying toolkit into a generic event.
This is then returned in the form of an instance of a subclass of the Inventor API's SoEvent class, either an SoMouseButtonEvent or an SoLocation2Event, depending on whether the native event is a mousebutton press / release, or a mousecursor movement event.
The mapping of the mousebuttons upon generation of SoMouseButtonEvent events will be done as follows:
Note that the rightmost mousebutton will always map to SoMouseButtonEvent::BUTTON2, even on a 3-button mouse.
Implements SoXtDevice.
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Tue Dec 2 23:15:46 2008 for SoXt by Doxygen. 1.4.7