osgGA::GUIEventAdapter Class Reference

`#include <GUIEventAdapter>`

Inheritance diagram for osgGA::GUIEventAdapter:

## Classes

class | TouchData
struct | Scrolling
struct | TabletPen

## Public Types

enum | MouseButtonMask { LEFT_MOUSE_BUTTON = 1<<0 , MIDDLE_MOUSE_BUTTON = 1<<1 , RIGHT_MOUSE_BUTTON = 1<<2 }
enum | EventType { NONE = 0 , PUSH = 1<<0 , RELEASE = 1<<1 , DOUBLECLICK = 1<<2 , DRAG = 1<<3 , MOVE = 1<<4 , KEYDOWN = 1<<5 , KEYUP = 1<<6 , FRAME = 1<<7 , RESIZE = 1<<8 , SCROLL = 1<<9 , PEN_PRESSURE = 1<<10 , PEN_ORIENTATION = 1<<11 , PEN_PROXIMITY_ENTER = 1<<12 , PEN_PROXIMITY_LEAVE = 1<<13 , CLOSE_WINDOW = 1<<14 , QUIT_APPLICATION = 1<<15 , USER = 1<<16 }

enum

KeySymbol {
KEY_Space = 0x20 , KEY_0 = '0' , KEY_1 = '1' , KEY_2 = '2' ,
KEY_3 = '3' , KEY_4 = '4' , KEY_5 = '5' , KEY_6 = '6' ,
KEY_7 = '7' , KEY_8 = '8' , KEY_9 = '9' , KEY_A = 'a' ,
KEY_B = 'b' , KEY_C = 'c' , KEY_D = 'd' , KEY_E = 'e' ,
KEY_F = 'f' , KEY_G = 'g' , KEY_H = 'h' , KEY_I = 'i' ,
KEY_J = 'j' , KEY_K = 'k' , KEY_L = 'l' , KEY_M = 'm' ,
KEY_N = 'n' , KEY_O = 'o' , KEY_P = 'p' , KEY_Q = 'q' ,
KEY_R = 'r' , KEY_S = 's' , KEY_T = 't' , KEY_U = 'u' ,
KEY_V = 'v' , KEY_W = 'w' , KEY_X = 'x' , KEY_Y = 'y' ,
KEY_Z = 'z' , KEY_Exclaim = 0x21 , KEY_Quotedbl = 0x22 , KEY_Hash = 0x23 ,
KEY_Dollar = 0x24 , KEY_Ampersand = 0x26 , KEY_Quote = 0x27 , KEY_Leftparen = 0x28 ,
KEY_Rightparen = 0x29 , KEY_Asterisk = 0x2A , KEY_Plus = 0x2B , KEY_Comma = 0x2C ,
KEY_Minus = 0x2D , KEY_Period = 0x2E , KEY_Slash = 0x2F , KEY_Colon = 0x3A ,
KEY_Semicolon = 0x3B , KEY_Less = 0x3C , KEY_Equals = 0x3D , KEY_Greater = 0x3E ,
KEY_Question = 0x3F , KEY_At = 0x40 , KEY_Leftbracket = 0x5B , KEY_Backslash = 0x5C ,
KEY_Rightbracket = 0x5D , KEY_Caret = 0x5E , KEY_Underscore = 0x5F , KEY_Backquote = 0x60 ,
KEY_BackSpace = 0xFF08 , KEY_Tab = 0xFF09 , KEY_Linefeed = 0xFF0A , KEY_Clear = 0xFF0B ,
KEY_Return = 0xFF0D , KEY_Pause = 0xFF13 , KEY_Scroll_Lock = 0xFF14 , KEY_Sys_Req = 0xFF15 ,
KEY_Escape = 0xFF1B , KEY_Delete = 0xFFFF , KEY_Home = 0xFF50 , KEY_Left = 0xFF51 ,
KEY_Up = 0xFF52 , KEY_Right = 0xFF53 , KEY_Down = 0xFF54 , KEY_Prior = 0xFF55 ,
KEY_Page_Up = 0xFF55 , KEY_Next = 0xFF56 , KEY_Page_Down = 0xFF56 , KEY_End = 0xFF57 ,
KEY_Begin = 0xFF58 , KEY_Select = 0xFF60 , KEY_Print = 0xFF61 , KEY_Execute = 0xFF62 ,
KEY_Insert = 0xFF63 , KEY_Undo = 0xFF65 , KEY_Redo = 0xFF66 , KEY_Menu = 0xFF67 ,
KEY_Find = 0xFF68 , KEY_Cancel = 0xFF69 , KEY_Help = 0xFF6A , KEY_Break = 0xFF6B ,
KEY_Mode_switch = 0xFF7E , KEY_Script_switch = 0xFF7E , KEY_Num_Lock = 0xFF7F , KEY_KP_Space = 0xFF80 ,
KEY_KP_Tab = 0xFF89 , KEY_KP_Enter = 0xFF8D , KEY_KP_F1 = 0xFF91 , KEY_KP_F2 = 0xFF92 ,
KEY_KP_F3 = 0xFF93 , KEY_KP_F4 = 0xFF94 , KEY_KP_Home = 0xFF95 , KEY_KP_Left = 0xFF96 ,
KEY_KP_Up = 0xFF97 , KEY_KP_Right = 0xFF98 , KEY_KP_Down = 0xFF99 , KEY_KP_Prior = 0xFF9A ,
KEY_KP_Page_Up = 0xFF9A , KEY_KP_Next = 0xFF9B , KEY_KP_Page_Down = 0xFF9B , KEY_KP_End = 0xFF9C ,
KEY_KP_Begin = 0xFF9D , KEY_KP_Insert = 0xFF9E , KEY_KP_Delete = 0xFF9F , KEY_KP_Equal = 0xFFBD ,
KEY_KP_Multiply = 0xFFAA , KEY_KP_Add = 0xFFAB , KEY_KP_Separator = 0xFFAC , KEY_KP_Subtract = 0xFFAD ,
KEY_KP_Decimal = 0xFFAE , KEY_KP_Divide = 0xFFAF , KEY_KP_0 = 0xFFB0 , KEY_KP_1 = 0xFFB1 ,
KEY_KP_2 = 0xFFB2 , KEY_KP_3 = 0xFFB3 , KEY_KP_4 = 0xFFB4 , KEY_KP_5 = 0xFFB5 ,
KEY_KP_6 = 0xFFB6 , KEY_KP_7 = 0xFFB7 , KEY_KP_8 = 0xFFB8 , KEY_KP_9 = 0xFFB9 ,
KEY_F1 = 0xFFBE , KEY_F2 = 0xFFBF , KEY_F3 = 0xFFC0 , KEY_F4 = 0xFFC1 ,
KEY_F5 = 0xFFC2 , KEY_F6 = 0xFFC3 , KEY_F7 = 0xFFC4 , KEY_F8 = 0xFFC5 ,
KEY_F9 = 0xFFC6 , KEY_F10 = 0xFFC7 , KEY_F11 = 0xFFC8 , KEY_F12 = 0xFFC9 ,
KEY_F13 = 0xFFCA , KEY_F14 = 0xFFCB , KEY_F15 = 0xFFCC , KEY_F16 = 0xFFCD ,
KEY_F17 = 0xFFCE , KEY_F18 = 0xFFCF , KEY_F19 = 0xFFD0 , KEY_F20 = 0xFFD1 ,
KEY_F21 = 0xFFD2 , KEY_F22 = 0xFFD3 , KEY_F23 = 0xFFD4 , KEY_F24 = 0xFFD5 ,
KEY_F25 = 0xFFD6 , KEY_F26 = 0xFFD7 , KEY_F27 = 0xFFD8 , KEY_F28 = 0xFFD9 ,
KEY_F29 = 0xFFDA , KEY_F30 = 0xFFDB , KEY_F31 = 0xFFDC , KEY_F32 = 0xFFDD ,
KEY_F33 = 0xFFDE , KEY_F34 = 0xFFDF , KEY_F35 = 0xFFE0 , KEY_Shift_L = 0xFFE1 ,
KEY_Shift_R = 0xFFE2 , KEY_Control_L = 0xFFE3 , KEY_Control_R = 0xFFE4 , KEY_Caps_Lock = 0xFFE5 ,
KEY_Shift_Lock = 0xFFE6 , KEY_Meta_L = 0xFFE7 , KEY_Meta_R = 0xFFE8 , KEY_Alt_L = 0xFFE9 ,
KEY_Alt_R = 0xFFEA , KEY_Super_L = 0xFFEB , KEY_Super_R = 0xFFEC , KEY_Hyper_L = 0xFFED ,
KEY_Hyper_R = 0xFFEE
}

enum

ModKeyMask {
MODKEY_LEFT_SHIFT = 0x0001 , MODKEY_RIGHT_SHIFT = 0x0002 , MODKEY_LEFT_CTRL = 0x0004 , MODKEY_RIGHT_CTRL = 0x0008 ,
MODKEY_LEFT_ALT = 0x0010 , MODKEY_RIGHT_ALT = 0x0020 , MODKEY_LEFT_META = 0x0040 , MODKEY_RIGHT_META = 0x0080 ,
MODKEY_LEFT_SUPER = 0x0100 , MODKEY_RIGHT_SUPER = 0x0200 , MODKEY_LEFT_HYPER = 0x0400 , MODKEY_RIGHT_HYPER = 0x0800 ,
MODKEY_NUM_LOCK = 0x1000 , MODKEY_CAPS_LOCK = 0x2000 , MODKEY_CTRL = (MODKEY_LEFT_CTRL|MODKEY_RIGHT_CTRL) , MODKEY_SHIFT = (MODKEY_LEFT_SHIFT|MODKEY_RIGHT_SHIFT) ,
MODKEY_ALT = (MODKEY_LEFT_ALT|MODKEY_RIGHT_ALT) , MODKEY_META = (MODKEY_LEFT_META|MODKEY_RIGHT_META) , MODKEY_SUPER = (MODKEY_LEFT_SUPER|MODKEY_RIGHT_SUPER) , MODKEY_HYPER = (MODKEY_LEFT_HYPER|MODKEY_RIGHT_HYPER)
}

enum | MouseYOrientation { Y_INCREASING_UPWARDS , Y_INCREASING_DOWNWARDS }
enum | ScrollingMotion { SCROLL_NONE , SCROLL_LEFT , SCROLL_RIGHT , SCROLL_UP , SCROLL_DOWN , SCROLL_2D }
enum | TabletPointerType { UNKNOWN = 0 , PEN , PUCK , ERASER }
enum | TouchPhase { TOUCH_UNKNOWN , TOUCH_BEGAN , TOUCH_MOVED , TOUCH_STATIONERY , TOUCH_ENDED }
typedef std::vector< osg::ref_ptr< PointerData > > | PointerDataList
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }

## Public Member Functions

| GUIEventAdapter ()
| GUIEventAdapter (const GUIEventAdapter &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgGA, GUIEventAdapter)
virtual GUIEventAdapter * | asGUIEventAdapter ()
virtual const GUIEventAdapter * | asGUIEventAdapter () const
void | setEventType (EventType Type)
virtual EventType | getEventType () const
double | time () const
void | setGraphicsContext (osg::GraphicsContext *context)
osg::GraphicsContext * | getGraphicsContext ()
const osg::GraphicsContext * | getGraphicsContext () const
void | setWindowRectangle (int x, int y, int width, int height, bool updateMouseRange=true)
void | setWindowX (int v)
int | getWindowX () const
void | setWindowY (int v)
int | getWindowY () const
void | setWindowWidth (int v)
int | getWindowWidth () const
void | setWindowHeight (int v)
int | getWindowHeight () const
void | setKey (int key)
virtual int | getKey () const
void | setUnmodifiedKey (int key)
int | getUnmodifiedKey () const
void | setButton (int button)
int | getButton () const
void | setInputRange (float Xmin, float Ymin, float Xmax, float Ymax)
void | setXmin (float v)
float | getXmin () const
void | setXmax (float v)
float | getXmax () const
void | setYmin (float v)
float | getYmin () const
void | setYmax (float v)
float | getYmax () const
void | setX (float x)
float | getX () const
void | setY (float y)
float | getY () const
float | getXnormalized () const
float | getYnormalized () const
void | setMouseYOrientation (MouseYOrientation myo)
| set mouse-Y orientation (mouse-Y increases upwards or downwards).
MouseYOrientation | getMouseYOrientation () const
| get mouse-Y orientation (mouse-Y increases upwards or downwards).
void | setMouseYOrientationAndUpdateCoords (MouseYOrientation myo)
| set mouse-Y orientation (mouse-Y increases upwards or downwards) and recompute variables
void | setButtonMask (int mask)
| set current mouse button state.
int | getButtonMask () const
| get current mouse button state.
void | setModKeyMask (int mask)
| set modifier key mask.
int | getModKeyMask () const
| get modifier key mask.
void | setScrollingMotion (ScrollingMotion motion)
| set scrolling motion (for EventType::SCROLL).
ScrollingMotion | getScrollingMotion () const
| get scrolling motion (for EventType::SCROLL).
void | setScrollingMotionDelta (float x, float y)
| set the scrolling delta to x,y and the scrolling motion to SCROLL_2D.
void | setScrollingDeltaX (float v)
| set the scrolling x-delta.
float | getScrollingDeltaX () const
| get the scrolling x-delta.
void | setScrollingDeltaY (float v)
| set the scrolling y-delta.
float | getScrollingDeltaY () const
| get the scrolling y-delta.
void | setPenPressure (float pressure)
| set the tablet pen pressure (range 0..1).
float | getPenPressure () const
| get the tablet pen pressure (range 0..1).
void | setPenTiltX (float tiltX)
| set the tablet pen tiltX in degrees.
float | getPenTiltX () const
| get the tablet pen tiltX in degrees.
void | setPenTiltY (float tiltY)
| set the tablet pen tiltY in degrees.
float | getPenTiltY () const
| get the tablet pen tiltY in degrees.
void | setPenRotation (float rotation)
| set the tablet pen rotation around the Z-axis in degrees.
float | getPenRotation () const
| get the tablet pen rotation around the Z-axis in degrees.
void | setTabletPointerType (TabletPointerType pt)
| set the tablet pointer type.
TabletPointerType | getTabletPointerType () const
| get the tablet pointer type.
const osg::Matrix | getPenOrientation () const
| set the orientation from a tablet input device as a matrix.
void | addTouchPoint (unsigned int id, TouchPhase phase, float x, float y, unsigned int tapCount=0)
void | setTouchData (TouchData *td)
TouchData * | getTouchData () const
bool | isMultiTouchEvent () const
float | getTouchPointNormalizedX (unsigned int ndx) const
float | getTouchPointNormalizedY (unsigned int ndx) const
void | setPointerDataList (const PointerDataList &pdl)
PointerDataList & | getPointerDataList ()
const PointerDataList & | getPointerDataList () const
unsigned int | getNumPointerData () const
PointerData * | getPointerData (unsigned int i)
const PointerData * | getPointerData (unsigned int i) const
PointerData * | getPointerData (osg::Object *obj)
const PointerData * | getPointerData (osg::Object *obj) const
void | addPointerData (PointerData *pd)
void | copyPointerDataFrom (const osgGA::GUIEventAdapter &sourceEvent)
Public Member Functions inherited from osgGA::Event
| Event ()
| Event (const Event &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Object (osgGA, Event)
void | setHandled (bool handled) const
bool | getHandled () const
void | setTime (double time)
double | getTime () const
Public Member Functions inherited from osg::Object
| Object ()
| Object (bool threadSafeRefUnref)
| Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual Object * | cloneType () const =0
virtual Object * | clone (const CopyOp &) const =0
virtual bool | isSameKindAs (const Object *) const
virtual const char * | libraryName () const =0
virtual const char * | className () const =0
std::string | getCompoundClassName () const
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual NodeVisitor * | asNodeVisitor ()
virtual const NodeVisitor * | asNodeVisitor () const
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () const
virtual void | setThreadSafeRefUnref (bool threadSafe)
virtual void | setName (const std::string &name)
void | setName (const char *name)
const std::string & | getName () const
void | setDataVariance (DataVariance dv)
DataVariance | getDataVariance () const
virtual void | computeDataVariance ()
void | setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void | setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () const
template<typename T>
bool | getUserValue (const std::string &name, T &value) const
template<typename T>
void | setUserValue (const std::string &name, const T &value)
virtual void | resizeGLObjectBuffers (unsigned int)
virtual void | releaseGLObjects (osg::State *=0) const
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Static Public Member Functions

static osg::ref_ptr< GUIEventAdapter > & | getAccumulatedEventState ()
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()

## Protected Member Functions

virtual | ~GUIEventAdapter ()
Protected Member Functions inherited from osgGA::Event
virtual | ~Event ()
Protected Member Functions inherited from osg::Object
virtual | ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

EventType | _eventType
osg::observer_ptr< osg::GraphicsContext > | _context
int | _windowX
int | _windowY
int | _windowWidth
int | _windowHeight
int | _key
int | _unmodifiedKey
int | _button
float | _Xmin
float | _Xmax
float | _Ymin
float | _Ymax
float | _mx
float | _my
int | _buttonMask
int | _modKeyMask
MouseYOrientation | _mouseYOrientation
Scrolling | _scrolling
TabletPen | _tabletPen
osg::ref_ptr< TouchData > | _touchData
PointerDataList | _pointerDataList
Protected Attributes inherited from osgGA::Event
bool | _handled
double | _time
Protected Attributes inherited from osg::Object
std::string | _name
DataVariance | _dataVariance
osg::UserDataContainer * | _userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Detailed Description

Event class for storing Keyboard, mouse and window events.

## Member Typedef Documentation

## PointerDataList

typedef std::vector< osg::ref_ptr<PointerData> > osgGA::GUIEventAdapter::PointerDataList

## Member Enumeration Documentation

## EventType

enum osgGA::GUIEventAdapter::EventType

Enumerator
NONE |
PUSH |
RELEASE |
DOUBLECLICK |
DRAG |
MOVE |
KEYDOWN |
KEYUP |
FRAME |
RESIZE |
SCROLL |
PEN_PRESSURE |
PEN_ORIENTATION |
PEN_PROXIMITY_ENTER |
PEN_PROXIMITY_LEAVE |
CLOSE_WINDOW |
QUIT_APPLICATION |
USER |

## KeySymbol

enum osgGA::GUIEventAdapter::KeySymbol

Enumerator
KEY_Space |
KEY_0 |
KEY_1 |
KEY_2 |
KEY_3 |
KEY_4 |
KEY_5 |
KEY_6 |
KEY_7 |
KEY_8 |
KEY_9 |
KEY_A |
KEY_B |
KEY_C |
KEY_D |
KEY_E |
KEY_F |
KEY_G |
KEY_H |
KEY_I |
KEY_J |
KEY_K |
KEY_L |
KEY_M |
KEY_N |
KEY_O |
KEY_P |
KEY_Q |
KEY_R |
KEY_S |
KEY_T |
KEY_U |
KEY_V |
KEY_W |
KEY_X |
KEY_Y |
KEY_Z |
KEY_Exclaim |
KEY_Quotedbl |
KEY_Hash |
KEY_Dollar |
KEY_Ampersand |
KEY_Quote |
KEY_Leftparen |
KEY_Rightparen |
KEY_Asterisk |
KEY_Plus |
KEY_Comma |
KEY_Minus |
KEY_Period |
KEY_Slash |
KEY_Colon |
KEY_Semicolon |
KEY_Less |
KEY_Equals |
KEY_Greater |
KEY_Question |
KEY_At |
KEY_Leftbracket |
KEY_Backslash |
KEY_Rightbracket |
KEY_Caret |
KEY_Underscore |
KEY_Backquote |
KEY_BackSpace |
KEY_Tab |
KEY_Linefeed |
KEY_Clear |
KEY_Return |
KEY_Pause |
KEY_Scroll_Lock |
KEY_Sys_Req |
KEY_Escape |
KEY_Delete |
KEY_Home |
KEY_Left |
KEY_Up |
KEY_Right |
KEY_Down |
KEY_Prior |
KEY_Page_Up |
KEY_Next |
KEY_Page_Down |
KEY_End |
KEY_Begin |
KEY_Select |
KEY_Print |
KEY_Execute |
KEY_Insert |
KEY_Undo |
KEY_Redo |
KEY_Menu |
KEY_Find |
KEY_Cancel |
KEY_Help |
KEY_Break |
KEY_Mode_switch |
KEY_Script_switch |
KEY_Num_Lock |
KEY_KP_Space |
KEY_KP_Tab |
KEY_KP_Enter |
KEY_KP_F1 |
KEY_KP_F2 |
KEY_KP_F3 |
KEY_KP_F4 |
KEY_KP_Home |
KEY_KP_Left |
KEY_KP_Up |
KEY_KP_Right |
KEY_KP_Down |
KEY_KP_Prior |
KEY_KP_Page_Up |
KEY_KP_Next |
KEY_KP_Page_Down |
KEY_KP_End |
KEY_KP_Begin |
KEY_KP_Insert |
KEY_KP_Delete |
KEY_KP_Equal |
KEY_KP_Multiply |
KEY_KP_Add |
KEY_KP_Separator |
KEY_KP_Subtract |
KEY_KP_Decimal |
KEY_KP_Divide |
KEY_KP_0 |
KEY_KP_1 |
KEY_KP_2 |
KEY_KP_3 |
KEY_KP_4 |
KEY_KP_5 |
KEY_KP_6 |
KEY_KP_7 |
KEY_KP_8 |
KEY_KP_9 |
KEY_F1 |
KEY_F2 |
KEY_F3 |
KEY_F4 |
KEY_F5 |
KEY_F6 |
KEY_F7 |
KEY_F8 |
KEY_F9 |
KEY_F10 |
KEY_F11 |
KEY_F12 |
KEY_F13 |
KEY_F14 |
KEY_F15 |
KEY_F16 |
KEY_F17 |
KEY_F18 |
KEY_F19 |
KEY_F20 |
KEY_F21 |
KEY_F22 |
KEY_F23 |
KEY_F24 |
KEY_F25 |
KEY_F26 |
KEY_F27 |
KEY_F28 |
KEY_F29 |
KEY_F30 |
KEY_F31 |
KEY_F32 |
KEY_F33 |
KEY_F34 |
KEY_F35 |
KEY_Shift_L |
KEY_Shift_R |
KEY_Control_L |
KEY_Control_R |
KEY_Caps_Lock |
KEY_Shift_Lock |
KEY_Meta_L |
KEY_Meta_R |
KEY_Alt_L |
KEY_Alt_R |
KEY_Super_L |
KEY_Super_R |
KEY_Hyper_L |
KEY_Hyper_R |

## ModKeyMask

enum osgGA::GUIEventAdapter::ModKeyMask

Enumerator
MODKEY_LEFT_SHIFT |
MODKEY_RIGHT_SHIFT |
MODKEY_LEFT_CTRL |
MODKEY_RIGHT_CTRL |
MODKEY_LEFT_ALT |
MODKEY_RIGHT_ALT |
MODKEY_LEFT_META |
MODKEY_RIGHT_META |
MODKEY_LEFT_SUPER |
MODKEY_RIGHT_SUPER |
MODKEY_LEFT_HYPER |
MODKEY_RIGHT_HYPER |
MODKEY_NUM_LOCK |
MODKEY_CAPS_LOCK |
MODKEY_CTRL |
MODKEY_SHIFT |
MODKEY_ALT |
MODKEY_META |
MODKEY_SUPER |
MODKEY_HYPER |

## MouseButtonMask

enum osgGA::GUIEventAdapter::MouseButtonMask

Enumerator
LEFT_MOUSE_BUTTON |
MIDDLE_MOUSE_BUTTON |
RIGHT_MOUSE_BUTTON |

## MouseYOrientation

enum osgGA::GUIEventAdapter::MouseYOrientation

Enumerator
Y_INCREASING_UPWARDS |
Y_INCREASING_DOWNWARDS |

## ScrollingMotion

enum osgGA::GUIEventAdapter::ScrollingMotion

Enumerator
SCROLL_NONE |
SCROLL_LEFT |
SCROLL_RIGHT |
SCROLL_UP |
SCROLL_DOWN |
SCROLL_2D |

## TabletPointerType

enum osgGA::GUIEventAdapter::TabletPointerType

Enumerator
UNKNOWN |
PEN |
PUCK |
ERASER |

## TouchPhase

enum osgGA::GUIEventAdapter::TouchPhase

Enumerator
TOUCH_UNKNOWN |
TOUCH_BEGAN |
TOUCH_MOVED |
TOUCH_STATIONERY |
TOUCH_ENDED |

## Constructor & Destructor Documentation

## GUIEventAdapter() [1/2]

osgGA::GUIEventAdapter::GUIEventAdapter | ( |  | ) |

Referenced by asGUIEventAdapter(), asGUIEventAdapter(), GUIEventAdapter(), and META_Object().

## GUIEventAdapter() [2/2]

osgGA::GUIEventAdapter::GUIEventAdapter | ( | const GUIEventAdapter & | rhs,
|  | const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY )

References GUIEventAdapter(), and osg::CopyOp::SHALLOW_COPY.

## ~GUIEventAdapter()

virtual osgGA::GUIEventAdapter::~GUIEventAdapter | ( |  | ) |

protected virtual

Force users to create on heap, so that multiple referencing is safe.

## Member Function Documentation

## addPointerData()

void osgGA::GUIEventAdapter::addPointerData | ( | PointerData * | pd | ) |

inline

References _pointerDataList.

## addTouchPoint()

void osgGA::GUIEventAdapter::addTouchPoint | ( | unsigned int | id,
|  | TouchPhase | phase,
|  | float | x,
|  | float | y,
|  | unsigned int | tapCount = 0 )

## asGUIEventAdapter() [1/2]

virtual GUIEventAdapter * osgGA::GUIEventAdapter::asGUIEventAdapter | ( |  | ) |

inline virtual

Reimplemented from osgGA::Event.

References GUIEventAdapter().

## asGUIEventAdapter() [2/2]

virtual const GUIEventAdapter * osgGA::GUIEventAdapter::asGUIEventAdapter | ( |  | ) | const

inline virtual

Reimplemented from osgGA::Event.

References GUIEventAdapter().

## copyPointerDataFrom()

void osgGA::GUIEventAdapter::copyPointerDataFrom | ( | const osgGA::GUIEventAdapter & | sourceEvent | ) |

## getAccumulatedEventState()

osg::ref_ptr< GUIEventAdapter > & osgGA::GUIEventAdapter::getAccumulatedEventState | ( |  | ) |

static

Get the accumulated event state singleton. Typically all EventQueue will share this single GUIEventAdapter object for tracking the mouse position, keyboard and mouse masks.

## getButton()

int osgGA::GUIEventAdapter::getButton | ( |  | ) | const

inline

button pressed/released, return -1 if inappropriate for this GUIEventAdapter.

References _button.

## getButtonMask()

int osgGA::GUIEventAdapter::getButtonMask | ( |  | ) | const

inline

get current mouse button state.

References _buttonMask.

## getEventType()

virtual EventType osgGA::GUIEventAdapter::getEventType | ( |  | ) | const

inline virtual

get the event type.

References _eventType.

## getGraphicsContext() [1/2]

osg::GraphicsContext * osgGA::GUIEventAdapter::getGraphicsContext | ( |  | ) |

inline

References _context.

## getGraphicsContext() [2/2]

const osg::GraphicsContext * osgGA::GUIEventAdapter::getGraphicsContext | ( |  | ) | const

inline

References _context.

## getKey()

virtual int osgGA::GUIEventAdapter::getKey | ( |  | ) | const

inline virtual

get key pressed, return -1 if inappropriate for this GUIEventAdapter.

References _key.

## getModKeyMask()

int osgGA::GUIEventAdapter::getModKeyMask | ( |  | ) | const

inline

get modifier key mask.

References _modKeyMask.

## getMouseYOrientation()

MouseYOrientation osgGA::GUIEventAdapter::getMouseYOrientation | ( |  | ) | const

inline

get mouse-Y orientation (mouse-Y increases upwards or downwards).

References _mouseYOrientation.

## getNumPointerData()

unsigned int osgGA::GUIEventAdapter::getNumPointerData | ( |  | ) | const

inline

References _pointerDataList.

## getPenOrientation()

const osg::Matrix osgGA::GUIEventAdapter::getPenOrientation | ( |  | ) | const

set the orientation from a tablet input device as a matrix.

## getPenPressure()

float osgGA::GUIEventAdapter::getPenPressure | ( |  | ) | const

inline

get the tablet pen pressure (range 0..1).

References _tabletPen.

## getPenRotation()

float osgGA::GUIEventAdapter::getPenRotation | ( |  | ) | const

inline

get the tablet pen rotation around the Z-axis in degrees.

References _tabletPen.

## getPenTiltX()

float osgGA::GUIEventAdapter::getPenTiltX | ( |  | ) | const

inline

get the tablet pen tiltX in degrees.

References _tabletPen.

## getPenTiltY()

float osgGA::GUIEventAdapter::getPenTiltY | ( |  | ) | const

inline

get the tablet pen tiltY in degrees.

References _tabletPen.

## getPointerData() [1/4]

PointerData * osgGA::GUIEventAdapter::getPointerData | ( | osg::Object * | obj | ) |

inline

References _pointerDataList.

## getPointerData() [2/4]

const PointerData * osgGA::GUIEventAdapter::getPointerData | ( | osg::Object * | obj | ) | const

inline

References _pointerDataList.

## getPointerData() [3/4]

PointerData * osgGA::GUIEventAdapter::getPointerData | ( | unsigned int | i | ) |

inline

References _pointerDataList.

## getPointerData() [4/4]

const PointerData * osgGA::GUIEventAdapter::getPointerData | ( | unsigned int | i | ) | const

inline

References _pointerDataList.

## getPointerDataList() [1/2]

PointerDataList & osgGA::GUIEventAdapter::getPointerDataList | ( |  | ) |

inline

References _pointerDataList.

## getPointerDataList() [2/2]

const PointerDataList & osgGA::GUIEventAdapter::getPointerDataList | ( |  | ) | const

inline

References _pointerDataList.

## getScrollingDeltaX()

float osgGA::GUIEventAdapter::getScrollingDeltaX | ( |  | ) | const

inline

get the scrolling x-delta.

References _scrolling.

## getScrollingDeltaY()

float osgGA::GUIEventAdapter::getScrollingDeltaY | ( |  | ) | const

inline

get the scrolling y-delta.

References _scrolling.

## getScrollingMotion()

ScrollingMotion osgGA::GUIEventAdapter::getScrollingMotion | ( |  | ) | const

inline

get scrolling motion (for EventType::SCROLL).

References _scrolling.

## getTabletPointerType()

TabletPointerType osgGA::GUIEventAdapter::getTabletPointerType | ( |  | ) | const

inline

get the tablet pointer type.

References _tabletPen.

## getTouchData()

TouchData * osgGA::GUIEventAdapter::getTouchData | ( |  | ) | const

inline

References _touchData.

Referenced by getTouchPointNormalizedX(), and getTouchPointNormalizedY().

## getTouchPointNormalizedX()

float osgGA::GUIEventAdapter::getTouchPointNormalizedX | ( | unsigned int | ndx | ) | const

inline

References _Xmax, _Xmin, and getTouchData().

## getTouchPointNormalizedY()

float osgGA::GUIEventAdapter::getTouchPointNormalizedY | ( | unsigned int | ndx | ) | const

inline

References _mouseYOrientation, _Ymax, _Ymin, getTouchData(), and Y_INCREASING_UPWARDS.

## getUnmodifiedKey()

int osgGA::GUIEventAdapter::getUnmodifiedKey | ( |  | ) | const

inline

get virtual key pressed.

References _unmodifiedKey.

## getWindowHeight()

int osgGA::GUIEventAdapter::getWindowHeight | ( |  | ) | const

inline

get window height.

References _windowHeight.

## getWindowWidth()

int osgGA::GUIEventAdapter::getWindowWidth | ( |  | ) | const

inline

get window width.

References _windowWidth.

## getWindowX()

int osgGA::GUIEventAdapter::getWindowX | ( |  | ) | const

inline

get window x origin.

References _windowX.

## getWindowY()

int osgGA::GUIEventAdapter::getWindowY | ( |  | ) | const

inline

get window y origin.

References _windowY.

## getX()

float osgGA::GUIEventAdapter::getX | ( |  | ) | const

inline

get current mouse x position.

References _mx.

Referenced by getXnormalized().

## getXmax()

float osgGA::GUIEventAdapter::getXmax | ( |  | ) | const

inline

get mouse maximum x.

References _Xmax.

Referenced by getXnormalized().

## getXmin()

float osgGA::GUIEventAdapter::getXmin | ( |  | ) | const

inline

get mouse minimum x.

References _Xmin.

Referenced by getXnormalized().

## getXnormalized()

float osgGA::GUIEventAdapter::getXnormalized | ( |  | ) | const

inline

References _pointerDataList, getX(), getXmax(), and getXmin().

## getY()

float osgGA::GUIEventAdapter::getY | ( |  | ) | const

inline

get current mouse y position.

References _my.

Referenced by getYnormalized().

## getYmax()

float osgGA::GUIEventAdapter::getYmax | ( |  | ) | const

inline

get mouse maximum y.

References _Ymax.

Referenced by getYnormalized().

## getYmin()

float osgGA::GUIEventAdapter::getYmin | ( |  | ) | const

inline

get mouse minimum y.

References _Ymin.

Referenced by getYnormalized().

## getYnormalized()

float osgGA::GUIEventAdapter::getYnormalized | ( |  | ) | const

inline

References _mouseYOrientation, _pointerDataList, getY(), getYmax(), getYmin(), and Y_INCREASING_UPWARDS.

## isMultiTouchEvent()

bool osgGA::GUIEventAdapter::isMultiTouchEvent | ( |  | ) | const

inline

References _touchData.

## META_Object()

osgGA::GUIEventAdapter::META_Object | ( | osgGA | ,
|  | GUIEventAdapter | )

References GUIEventAdapter().

## setButton()

void osgGA::GUIEventAdapter::setButton | ( | int | button | ) |

inline

set button pressed/released.

References _button.

## setButtonMask()

void osgGA::GUIEventAdapter::setButtonMask | ( | int | mask | ) |

inline

set current mouse button state.

References _buttonMask.

## setEventType()

void osgGA::GUIEventAdapter::setEventType | ( | EventType | Type | ) |

inline

set the event type.

References _eventType.

## setGraphicsContext()

void osgGA::GUIEventAdapter::setGraphicsContext | ( | osg::GraphicsContext * | context | ) |

inline

References _context.

## setInputRange()

void osgGA::GUIEventAdapter::setInputRange | ( | float | Xmin,
|  | float | Ymin,
|  | float | Xmax,
|  | float | Ymax )

set mouse input range.

## setKey()

void osgGA::GUIEventAdapter::setKey | ( | int | key | ) |

inline

set key pressed.

References _key.

## setModKeyMask()

void osgGA::GUIEventAdapter::setModKeyMask | ( | int | mask | ) |

inline

set modifier key mask.

References _modKeyMask.

## setMouseYOrientation()

void osgGA::GUIEventAdapter::setMouseYOrientation | ( | MouseYOrientation | myo | ) |

inline

set mouse-Y orientation (mouse-Y increases upwards or downwards).

References _mouseYOrientation.

## setMouseYOrientationAndUpdateCoords()

void osgGA::GUIEventAdapter::setMouseYOrientationAndUpdateCoords | ( | MouseYOrientation | myo | ) |

set mouse-Y orientation (mouse-Y increases upwards or downwards) and recompute variables

## setPenPressure()

void osgGA::GUIEventAdapter::setPenPressure | ( | float | pressure | ) |

inline

set the tablet pen pressure (range 0..1).

References _tabletPen.

## setPenRotation()

void osgGA::GUIEventAdapter::setPenRotation | ( | float | rotation | ) |

inline

set the tablet pen rotation around the Z-axis in degrees.

References _tabletPen.

## setPenTiltX()

void osgGA::GUIEventAdapter::setPenTiltX | ( | float | tiltX | ) |

inline

set the tablet pen tiltX in degrees.

References _tabletPen.

## setPenTiltY()

void osgGA::GUIEventAdapter::setPenTiltY | ( | float | tiltY | ) |

inline

set the tablet pen tiltY in degrees.

References _tabletPen.

## setPointerDataList()

void osgGA::GUIEventAdapter::setPointerDataList | ( | const PointerDataList & | pdl | ) |

inline

References _pointerDataList.

## setScrollingDeltaX()

void osgGA::GUIEventAdapter::setScrollingDeltaX | ( | float | v | ) |

inline

set the scrolling x-delta.

References _scrolling.

## setScrollingDeltaY()

void osgGA::GUIEventAdapter::setScrollingDeltaY | ( | float | v | ) |

inline

set the scrolling y-delta.

References _scrolling.

## setScrollingMotion()

void osgGA::GUIEventAdapter::setScrollingMotion | ( | ScrollingMotion | motion | ) |

inline

set scrolling motion (for EventType::SCROLL).

References _scrolling.

## setScrollingMotionDelta()

void osgGA::GUIEventAdapter::setScrollingMotionDelta | ( | float | x,
|  | float | y )

inline

set the scrolling delta to x,y and the scrolling motion to SCROLL_2D.

References _scrolling, and SCROLL_2D.

## setTabletPointerType()

void osgGA::GUIEventAdapter::setTabletPointerType | ( | TabletPointerType | pt | ) |

inline

set the tablet pointer type.

References _tabletPen.

## setTouchData()

void osgGA::GUIEventAdapter::setTouchData | ( | TouchData * | td | ) |

inline

References _touchData.

## setUnmodifiedKey()

void osgGA::GUIEventAdapter::setUnmodifiedKey | ( | int | key | ) |

inline

set virtual key pressed.

References _unmodifiedKey.

## setWindowHeight()

void osgGA::GUIEventAdapter::setWindowHeight | ( | int | v | ) |

inline

set window height.

References _windowHeight.

## setWindowRectangle()

void osgGA::GUIEventAdapter::setWindowRectangle | ( | int | x,
|  | int | y,
|  | int | width,
|  | int | height,
|  | bool | updateMouseRange = true )

set window rectangle.

## setWindowWidth()

void osgGA::GUIEventAdapter::setWindowWidth | ( | int | v | ) |

inline

set window width.

References _windowWidth.

## setWindowX()

void osgGA::GUIEventAdapter::setWindowX | ( | int | v | ) |

inline

set window x origin.

References _windowX.

## setWindowY()

void osgGA::GUIEventAdapter::setWindowY | ( | int | v | ) |

inline

set window x origin.

References _windowY.

## setX()

void osgGA::GUIEventAdapter::setX | ( | float | x | ) |

inline

set current mouse x position.

References _mx.

## setXmax()

void osgGA::GUIEventAdapter::setXmax | ( | float | v | ) |

inline

set mouse maximum x.

References _Xmax.

## setXmin()

void osgGA::GUIEventAdapter::setXmin | ( | float | v | ) |

inline

set mouse minimum x.

References _Xmin.

## setY()

void osgGA::GUIEventAdapter::setY | ( | float | y | ) |

inline

set current mouse y position.

References _my.

## setYmax()

void osgGA::GUIEventAdapter::setYmax | ( | float | v | ) |

inline

set mouse maximum y.

References _Ymax.

## setYmin()

void osgGA::GUIEventAdapter::setYmin | ( | float | v | ) |

inline

set mouse minimum x.

References _Ymin.

## time()

double osgGA::GUIEventAdapter::time | ( |  | ) | const

inline

deprecated function for getting time of event.

References osgGA::Event::_time.

## Member Data Documentation

## _button

int osgGA::GUIEventAdapter::_button

protected

Referenced by getButton(), and setButton().

## _buttonMask

int osgGA::GUIEventAdapter::_buttonMask

protected

Referenced by getButtonMask(), and setButtonMask().

## _context

osg::observer_ptr<osg::GraphicsContext> osgGA::GUIEventAdapter::_context

protected

Referenced by getGraphicsContext(), getGraphicsContext(), and setGraphicsContext().

## _eventType

EventType osgGA::GUIEventAdapter::_eventType

protected

Referenced by getEventType(), and setEventType().

## _key

int osgGA::GUIEventAdapter::_key

protected

Referenced by getKey(), and setKey().

## _modKeyMask

int osgGA::GUIEventAdapter::_modKeyMask

protected

Referenced by getModKeyMask(), and setModKeyMask().

## _mouseYOrientation

MouseYOrientation osgGA::GUIEventAdapter::_mouseYOrientation

protected

Referenced by getMouseYOrientation(), getTouchPointNormalizedY(), getYnormalized(), and setMouseYOrientation().

## _mx

float osgGA::GUIEventAdapter::_mx

protected

Referenced by getX(), and setX().

## _my

float osgGA::GUIEventAdapter::_my

protected

Referenced by getY(), and setY().

## _pointerDataList

PointerDataList osgGA::GUIEventAdapter::_pointerDataList

protected

Referenced by addPointerData(), getNumPointerData(), getPointerData(), getPointerData(), getPointerData(), getPointerData(), getPointerDataList(), getPointerDataList(), getXnormalized(), getYnormalized(), and setPointerDataList().

## _scrolling

Scrolling osgGA::GUIEventAdapter::_scrolling

protected

Referenced by getScrollingDeltaX(), getScrollingDeltaY(), getScrollingMotion(), setScrollingDeltaX(), setScrollingDeltaY(), setScrollingMotion(), and setScrollingMotionDelta().

## _tabletPen

TabletPen osgGA::GUIEventAdapter::_tabletPen

protected

Referenced by getPenPressure(), getPenRotation(), getPenTiltX(), getPenTiltY(), getTabletPointerType(), setPenPressure(), setPenRotation(), setPenTiltX(), setPenTiltY(), and setTabletPointerType().

## _touchData

osg::ref_ptr<TouchData> osgGA::GUIEventAdapter::_touchData

protected

Referenced by getTouchData(), isMultiTouchEvent(), and setTouchData().

## _unmodifiedKey

int osgGA::GUIEventAdapter::_unmodifiedKey

protected

Referenced by getUnmodifiedKey(), and setUnmodifiedKey().

## _windowHeight

int osgGA::GUIEventAdapter::_windowHeight

protected

Referenced by getWindowHeight(), and setWindowHeight().

## _windowWidth

int osgGA::GUIEventAdapter::_windowWidth

protected

Referenced by getWindowWidth(), and setWindowWidth().

## _windowX

int osgGA::GUIEventAdapter::_windowX

protected

Referenced by getWindowX(), and setWindowX().

## _windowY

int osgGA::GUIEventAdapter::_windowY

protected

Referenced by getWindowY(), and setWindowY().

## _Xmax

float osgGA::GUIEventAdapter::_Xmax

protected

Referenced by getTouchPointNormalizedX(), getXmax(), and setXmax().

## _Xmin

float osgGA::GUIEventAdapter::_Xmin

protected

Referenced by getTouchPointNormalizedX(), getXmin(), and setXmin().

## _Ymax

float osgGA::GUIEventAdapter::_Ymax

protected

Referenced by getTouchPointNormalizedY(), getYmax(), and setYmax().

## _Ymin

float osgGA::GUIEventAdapter::_Ymin

protected

Referenced by getTouchPointNormalizedY(), getYmin(), and setYmin().

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

- GUIEventAdapter