FlightGear next
flightgear::FGEventHandler Class Reference

#include <FGEventHandler.hxx>

Inherits osgGA::GUIEventHandler.

Public Member Functions

 FGEventHandler ()
 
virtual ~FGEventHandler ()
 
virtual const char * className () const
 
bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us) override
 
void setIdleHandler (fgIdleHandler idleHandler)
 
fgIdleHandler getIdleHandler () const
 
void setKeyHandler (fgKeyHandler keyHandler)
 
fgKeyHandler getKeyHandler () const
 
void setMouseClickHandler (fgMouseClickHandler mouseClickHandler)
 
fgMouseClickHandler getMouseClickHandler ()
 
void setMouseMotionHandler (fgMouseMotionHandler mouseMotionHandler)
 
fgMouseMotionHandler getMouseMotionHandler ()
 
void setChangeStatsCameraRenderOrder (bool c)
 
int getCurrentModifiers () const
 
void setMouseWarped ()
 
bool getResizable ()
 Whether or not resizing is supported.
 
void setResizable (bool _resizable)
 
void reset ()
 
void clear ()
 
void setWindowRectangleInteriorWithCorrection (osgViewer::GraphicsWindow *window, int x, int y, int width, int height)
 

Static Public Member Functions

static int translateKey (const osgGA::GUIEventAdapter &ea)
 
static int translateModifiers (const osgGA::GUIEventAdapter &ea)
 

Protected Member Functions

void handleKey (const osgGA::GUIEventAdapter &ea, int &key, int &modifiers)
 
void handleStats (osgGA::GUIActionAdapter &us)
 

Protected Attributes

osg::ref_ptr< osg::Node > _node
 
fgIdleHandler idleHandler
 
fgKeyHandler keyHandler
 
fgMouseClickHandler mouseClickHandler
 
fgMouseMotionHandler mouseMotionHandler
 
osg::ref_ptr< FGStatsHandlerstatsHandler
 
osg::ref_ptr< osgGA::GUIEventAdapter > statsEvent
 
int statsType
 
int currentModifiers
 
bool resizable
 
bool mouseWarped
 
bool scrollButtonPressed
 
int release_keys [128]
 
bool changeStatsCameraRenderOrder
 
SGPropertyNode_ptr _display
 
SGPropertyNode_ptr _print
 

Detailed Description

Definition at line 25 of file FGEventHandler.hxx.

Constructor & Destructor Documentation

◆ FGEventHandler()

flightgear::FGEventHandler::FGEventHandler ( )

Definition at line 55 of file FGEventHandler.cxx.

◆ ~FGEventHandler()

virtual flightgear::FGEventHandler::~FGEventHandler ( )
inlinevirtual

Definition at line 29 of file FGEventHandler.hxx.

Member Function Documentation

◆ className()

virtual const char * flightgear::FGEventHandler::className ( ) const
inlinevirtual

Definition at line 31 of file FGEventHandler.hxx.

◆ clear()

void flightgear::FGEventHandler::clear ( )

Definition at line 81 of file FGEventHandler.cxx.

◆ getCurrentModifiers()

int flightgear::FGEventHandler::getCurrentModifiers ( ) const
inline

Definition at line 84 of file FGEventHandler.hxx.

◆ getIdleHandler()

fgIdleHandler flightgear::FGEventHandler::getIdleHandler ( ) const
inline

Definition at line 44 of file FGEventHandler.hxx.

◆ getKeyHandler()

fgKeyHandler flightgear::FGEventHandler::getKeyHandler ( ) const
inline

Definition at line 54 of file FGEventHandler.hxx.

◆ getMouseClickHandler()

fgMouseClickHandler flightgear::FGEventHandler::getMouseClickHandler ( )
inline

Definition at line 64 of file FGEventHandler.hxx.

◆ getMouseMotionHandler()

fgMouseMotionHandler flightgear::FGEventHandler::getMouseMotionHandler ( )
inline

Definition at line 74 of file FGEventHandler.hxx.

◆ getResizable()

bool flightgear::FGEventHandler::getResizable ( )
inline

Whether or not resizing is supported.

It might not be when using multiple displays.

Definition at line 97 of file FGEventHandler.hxx.

◆ handle()

bool flightgear::FGEventHandler::handle ( const osgGA::GUIEventAdapter & ea,
osgGA::GUIActionAdapter & us )
override

Definition at line 199 of file FGEventHandler.cxx.

◆ handleKey()

void flightgear::FGEventHandler::handleKey ( const osgGA::GUIEventAdapter & ea,
int & key,
int & modifiers )
protected

Definition at line 487 of file FGEventHandler.cxx.

◆ handleStats()

void flightgear::FGEventHandler::handleStats ( osgGA::GUIActionAdapter & us)
protected

Definition at line 519 of file FGEventHandler.cxx.

◆ reset()

void flightgear::FGEventHandler::reset ( )

Definition at line 87 of file FGEventHandler.cxx.

◆ setChangeStatsCameraRenderOrder()

void flightgear::FGEventHandler::setChangeStatsCameraRenderOrder ( bool c)
inline

Definition at line 79 of file FGEventHandler.hxx.

◆ setIdleHandler()

void flightgear::FGEventHandler::setIdleHandler ( fgIdleHandler idleHandler)
inline

Definition at line 39 of file FGEventHandler.hxx.

◆ setKeyHandler()

void flightgear::FGEventHandler::setKeyHandler ( fgKeyHandler keyHandler)
inline

Definition at line 49 of file FGEventHandler.hxx.

◆ setMouseClickHandler()

void flightgear::FGEventHandler::setMouseClickHandler ( fgMouseClickHandler mouseClickHandler)
inline

Definition at line 59 of file FGEventHandler.hxx.

◆ setMouseMotionHandler()

void flightgear::FGEventHandler::setMouseMotionHandler ( fgMouseMotionHandler mouseMotionHandler)
inline

Definition at line 69 of file FGEventHandler.hxx.

◆ setMouseWarped()

void flightgear::FGEventHandler::setMouseWarped ( )
inline

Definition at line 89 of file FGEventHandler.hxx.

◆ setResizable()

void flightgear::FGEventHandler::setResizable ( bool _resizable)
inline

Definition at line 98 of file FGEventHandler.hxx.

◆ setWindowRectangleInteriorWithCorrection()

void flightgear::FGEventHandler::setWindowRectangleInteriorWithCorrection ( osgViewer::GraphicsWindow * window,
int x,
int y,
int width,
int height )

Definition at line 179 of file FGEventHandler.cxx.

◆ translateKey()

int flightgear::FGEventHandler::translateKey ( const osgGA::GUIEventAdapter & ea)
static

Definition at line 350 of file FGEventHandler.cxx.

◆ translateModifiers()

int flightgear::FGEventHandler::translateModifiers ( const osgGA::GUIEventAdapter & ea)
static

Definition at line 463 of file FGEventHandler.cxx.

Member Data Documentation

◆ _display

SGPropertyNode_ptr flightgear::FGEventHandler::_display
protected

Definition at line 129 of file FGEventHandler.hxx.

◆ _node

osg::ref_ptr<osg::Node> flightgear::FGEventHandler::_node
protected

Definition at line 111 of file FGEventHandler.hxx.

◆ _print

SGPropertyNode_ptr flightgear::FGEventHandler::_print
protected

Definition at line 129 of file FGEventHandler.hxx.

◆ changeStatsCameraRenderOrder

bool flightgear::FGEventHandler::changeStatsCameraRenderOrder
protected

Definition at line 128 of file FGEventHandler.hxx.

◆ currentModifiers

int flightgear::FGEventHandler::currentModifiers
protected

Definition at line 119 of file FGEventHandler.hxx.

◆ idleHandler

fgIdleHandler flightgear::FGEventHandler::idleHandler
protected

Definition at line 112 of file FGEventHandler.hxx.

◆ keyHandler

fgKeyHandler flightgear::FGEventHandler::keyHandler
protected

Definition at line 113 of file FGEventHandler.hxx.

◆ mouseClickHandler

fgMouseClickHandler flightgear::FGEventHandler::mouseClickHandler
protected

Definition at line 114 of file FGEventHandler.hxx.

◆ mouseMotionHandler

fgMouseMotionHandler flightgear::FGEventHandler::mouseMotionHandler
protected

Definition at line 115 of file FGEventHandler.hxx.

◆ mouseWarped

bool flightgear::FGEventHandler::mouseWarped
protected

Definition at line 123 of file FGEventHandler.hxx.

◆ release_keys

int flightgear::FGEventHandler::release_keys[128]
protected

Definition at line 126 of file FGEventHandler.hxx.

◆ resizable

bool flightgear::FGEventHandler::resizable
protected

Definition at line 122 of file FGEventHandler.hxx.

◆ scrollButtonPressed

bool flightgear::FGEventHandler::scrollButtonPressed
protected

Definition at line 125 of file FGEventHandler.hxx.

◆ statsEvent

osg::ref_ptr<osgGA::GUIEventAdapter> flightgear::FGEventHandler::statsEvent
protected

Definition at line 117 of file FGEventHandler.hxx.

◆ statsHandler

osg::ref_ptr<FGStatsHandler> flightgear::FGEventHandler::statsHandler
protected

Definition at line 116 of file FGEventHandler.hxx.

◆ statsType

int flightgear::FGEventHandler::statsType
protected

Definition at line 118 of file FGEventHandler.hxx.


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