MeVisLabToolboxReference
MeVis/Foundation/Sources/MLInventorBinding/XVMouseButtons.h File Reference

Mouse button macros, definitions, mappings and events. More...

Go to the source code of this file.

Defines

#define XV_LEFT_MOUSEBUTTON   1
 XV_MAP_BUTTON() is a macro that MUST be used in any code calling SoMouseButtonEvent::getButton() to map the mouse button to the following defines.
#define XV_MIDDLE_MOUSEBUTTON   2
#define XV_RIGHT_MOUSEBUTTON   3
#define XV_MAP_BUTTON(a)   (((a)==2)? 3 : (((a)==3)?2:(a)))
 for Coin's SoQT inventor middle and right mouse buttons have to be flipped
#define XV_MOUSE_PRESS_EVENT(EVENT, BUTTON)   (SoMouseButtonEvent::isButtonPressEvent(EVENT,XV_MAP_BUTTON(SoMouseButtonEvent::BUTTON)))
#define XV_MOUSE_RELEASE_EVENT(EVENT, BUTTON)   (SoMouseButtonEvent::isButtonReleaseEvent(EVENT,XV_MAP_BUTTON(SoMouseButtonEvent::BUTTON)))

Detailed Description

Mouse button macros, definitions, mappings and events.

Author:
Florian Link
Date:
11/2000

Definition in file XVMouseButtons.h.


Define Documentation

#define XV_LEFT_MOUSEBUTTON   1

XV_MAP_BUTTON() is a macro that MUST be used in any code calling SoMouseButtonEvent::getButton() to map the mouse button to the following defines.

these defines should be used instead of the SoMouseButtonEvent::BUTTON1 ... BUTTON3 Example: int button = XV_MAP_BOTTON(event->getButton()) If you have problems on how to use these defines, ask florian@mevis.de!

Definition at line 19 of file XVMouseButtons.h.

#define XV_MAP_BUTTON (   a)    (((a)==2)? 3 : (((a)==3)?2:(a)))

for Coin's SoQT inventor middle and right mouse buttons have to be flipped

Definition at line 25 of file XVMouseButtons.h.

#define XV_MIDDLE_MOUSEBUTTON   2

Definition at line 20 of file XVMouseButtons.h.

#define XV_MOUSE_PRESS_EVENT (   EVENT,
  BUTTON 
)    (SoMouseButtonEvent::isButtonPressEvent(EVENT,XV_MAP_BUTTON(SoMouseButtonEvent::BUTTON)))

Definition at line 32 of file XVMouseButtons.h.

#define XV_MOUSE_RELEASE_EVENT (   EVENT,
  BUTTON 
)    (SoMouseButtonEvent::isButtonReleaseEvent(EVENT,XV_MAP_BUTTON(SoMouseButtonEvent::BUTTON)))

Definition at line 35 of file XVMouseButtons.h.

#define XV_RIGHT_MOUSEBUTTON   3

Definition at line 21 of file XVMouseButtons.h.