Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osgGA::GUIEventAdapter Class Reference

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

Inheritance diagram for osgGA::GUIEventAdapter:

Inheritance graph
[legend]
List of all members.

Public Types

enum  MouseButtonMask { LEFT_MOUSE_BUTTON = 1, MIDDLE_MOUSE_BUTTON = 2, RIGHT_MOUSE_BUTTON = 4 }
enum  EventType {
  PUSH, RELEASE, DRAG, MOVE,
  KEYBOARD, FRAME, RESIZE, NONE
}

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.

virtual int getXmin () const=0
 window minimum x.

virtual int getXmax () const=0
 window maximum x.

virtual int getYmin () const=0
 window minimum y.

virtual int getYmax () const=0
 window maximum y.

virtual int getX () const=0
 current mouse x position.

virtual int getY () const=0
 current mouse y position.

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

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


Protected Methods

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


Detailed Description

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.


Member Enumeration Documentation

enum osgGA::GUIEventAdapter::EventType
 

Enumeration values:
PUSH 
RELEASE 
DRAG 
MOVE 
KEYBOARD 
FRAME 
RESIZE 
NONE 

enum osgGA::GUIEventAdapter::MouseButtonMask
 

Enumeration values:
LEFT_MOUSE_BUTTON 
MIDDLE_MOUSE_BUTTON 
RIGHT_MOUSE_BUTTON 


Constructor & Destructor Documentation

osgGA::GUIEventAdapter::GUIEventAdapter   [inline, protected]
 

virtual osgGA::GUIEventAdapter::~GUIEventAdapter   [inline, protected, virtual]
 

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


Member Function Documentation

virtual int osgGA::GUIEventAdapter::getButton   const [pure virtual]
 

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

Implemented in osgGLUT::GLUTEventAdapter.

virtual unsigned int osgGA::GUIEventAdapter::getButtonMask   const [pure virtual]
 

current mouse button state

Implemented in osgGLUT::GLUTEventAdapter.

virtual EventType osgGA::GUIEventAdapter::getEventType   const [pure virtual]
 

Get the EventType of the GUI event.

Implemented in osgGLUT::GLUTEventAdapter.

virtual int osgGA::GUIEventAdapter::getKey   const [pure virtual]
 

key pressed, return -1 if inappr opriate for this event.

Implemented in osgGLUT::GLUTEventAdapter.

virtual int osgGA::GUIEventAdapter::getX   const [pure virtual]
 

current mouse x position.

Implemented in osgGLUT::GLUTEventAdapter.

virtual int osgGA::GUIEventAdapter::getXmax   const [pure virtual]
 

window maximum x.

Implemented in osgGLUT::GLUTEventAdapter.

virtual int osgGA::GUIEventAdapter::getXmin   const [pure virtual]
 

window minimum x.

Implemented in osgGLUT::GLUTEventAdapter.

virtual int osgGA::GUIEventAdapter::getY   const [pure virtual]
 

current mouse y position.

Implemented in osgGLUT::GLUTEventAdapter.

virtual int osgGA::GUIEventAdapter::getYmax   const [pure virtual]
 

window maximum y.

Implemented in osgGLUT::GLUTEventAdapter.

virtual int osgGA::GUIEventAdapter::getYmin   const [pure virtual]
 

window minimum y.

Implemented in osgGLUT::GLUTEventAdapter.

virtual double osgGA::GUIEventAdapter::time   const [pure virtual]
 

time in seconds of event.

Implemented in osgGLUT::GLUTEventAdapter.


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:49 2002 for the Open Scene Graph by doxygen 1.2.16.