## class OSGGA_EXPORT osgGA::GUIEventAdapter

> Pure virtual base class for adapting platform specific events into generic keyboard and mouse events.

## Inheritance:

### Public Methods

virtual EventType getEventType() const = 0
  Get the EventType of the GUI event
virtual int getKey() const = 0
  key pressed, return -1 if inappr opriate for this event.
virtual int getButton() const = 0
  button pressed/released, return -1 if inappropriate for this event
void setMouseYOrientation(MouseYOrientation myo)
MouseYOrientation getMouseYOrientation() const
virtual float getXmin() const = 0
  manimum x mouse position.
virtual float getXmax() const = 0
  maximum x mouse position.
virtual float getYmin() const = 0
  minimum y mouse position.
virtual float getYmax() const = 0
  maximum y mouse position.
virtual float getX() const = 0
  current mouse x position
virtual float getY() const = 0
  current mouse y position
virtual unsigned int getButtonMask() const = 0
  current mouse button state
virtual unsigned int getModKeyMask() const = 0
  current modkey state
virtual double time() const = 0
  time in seconds of event.
inline float getXnormalized() const
  return the getX() value normalised to the range of -1 to 1.
inline float getYnormalized() const
  return the getY() value normalised to the range of -1 to 1.

### Public Members

enum MouseButtonMask
enum EventType
enum KeySymbol
enum ModKeyMask
enum MouseYOrientation

### Protected Fields

MouseYOrientation _mouseYOrientation

### Protected Methods

GUIEventAdapter(MouseYOrientation myo=Y_INCREASING_DOWNWARDS)
virtual ~GUIEventAdapter()
  Force users to create on heap, so that multiple referencing is safe

## Documentation

> Pure virtual base class for adapting platform specific events into generic keyboard and mouse events.

> Used as GUI toolkit-independent input into GUIEventAdapters. Viewer writers should subclass this base class to implement the functionality to translate one of their GUI events, e.g. a Qt Event or an MFC Event, as appropriate.

`enum MouseButtonMask`

`LEFT_MOUSE_BUTTON`

`MIDDLE_MOUSE_BUTTON`

`RIGHT_MOUSE_BUTTON`

`enum EventType`

`NONE`

`PUSH`

`RELEASE`

`DOUBLECLICK`

`DRAG`

`MOVE`

`KEYDOWN`

`KEYUP`

`FRAME`

`RESIZE`

`SCROLLUP`

`SCROLLDOWN`

`SCROLLLEFT`

`SCROLLRIGHT`

`enum KeySymbol`

`KEY_Space`

`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`

`enum ModKeyMask`

`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_NUM_LOCK`

`MODKEY_CAPS_LOCK`

`MODKEY_CTRL`

`MODKEY_SHIFT`

`MODKEY_ALT`

`MODKEY_META`

`virtual EventType getEventType() const = 0`
  Get the EventType of the GUI event

`virtual int getKey() const = 0`
  key pressed, return -1 if inappr opriate for this event.

`virtual int getButton() const = 0`
  button pressed/released, return -1 if inappropriate for this event

`enum MouseYOrientation`

`Y_INCREASING_UPWARDS`

`Y_INCREASING_DOWNWARDS`

`void setMouseYOrientation(MouseYOrientation myo)`

`MouseYOrientation getMouseYOrientation() const`

`virtual float getXmin() const = 0`
  manimum x mouse position.

`virtual float getXmax() const = 0`
  maximum x mouse position.

`virtual float getYmin() const = 0`
  minimum y mouse position.

`virtual float getYmax() const = 0`
  maximum y mouse position.

`virtual float getX() const = 0`
  current mouse x position

`virtual float getY() const = 0`
  current mouse y position

`virtual unsigned int getButtonMask() const = 0`
  current mouse button state

`virtual unsigned int getModKeyMask() const = 0`
  current modkey state

`virtual double time() const = 0`
  time in seconds of event.

`inline float getXnormalized() const`
  return the getX() value normalised to the range of -1 to 1. -1 would be the left hand side of the window. 0.0 would be the middle of the window. +1 would be the right hand side of the window.

`inline float getYnormalized() const`
  return the getY() value normalised to the range of -1 to 1. -1 would be the bottom of the window. 0.0 would be the middle of the window. +1 would be the top of the window.

`GUIEventAdapter(MouseYOrientation myo=Y_INCREASING_DOWNWARDS)`

`virtual ~GUIEventAdapter()`
  Force users to create on heap, so that multiple referencing is safe

`MouseYOrientation _mouseYOrientation`

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.