osgViewer::WindowSizeHandler Class Reference

Event handler allowing to change the screen resolution (in windowed mode) and toggle between fullscreen and windowed mode. More...

Inheritance diagram for osgViewer::WindowSizeHandler:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WindowSizeHandler ()
virtual void getUsage (osg::ApplicationUsage &usage) const
 Get the keyboard and mouse usage of this manipulator.
void setKeyEventToggleFullscreen (int key)
int getKeyEventToggleFullscreen () const
void setToggleFullscreen (bool flag)
bool getToggleFullscreen () const
void setKeyEventWindowedResolutionUp (int key)
int getKeyEventWindowedResolutionUp () const
void setKeyEventWindowedResolutionDown (int key)
int getKeyEventWindowedResolutionDown () const
void setChangeWindowedResolution (bool flag)
bool getChangeWindowedResolution () const
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
 Deprecated, Handle events, return true if handled, false otherwise.

Protected Member Functions

void toggleFullscreen (osgViewer::GraphicsWindow *window)
void changeWindowedResolution (osgViewer::GraphicsWindow *window, bool increase)
unsigned int getNearestResolution (int screenWidth, int screenHeight, int width, int height) const

Protected Attributes

int _keyEventToggleFullscreen
bool _toggleFullscreen
int _keyEventWindowedResolutionUp
int _keyEventWindowedResolutionDown
bool _changeWindowedResolution
std::vector< osg::Vec2_resolutionList
int _currentResolutionIndex


Detailed Description

Event handler allowing to change the screen resolution (in windowed mode) and toggle between fullscreen and windowed mode.


Constructor & Destructor Documentation

osgViewer::WindowSizeHandler::WindowSizeHandler (  ) 


Member Function Documentation

virtual void osgViewer::WindowSizeHandler::getUsage ( osg::ApplicationUsage usage  )  const [virtual]

Get the keyboard and mouse usage of this manipulator.

Reimplemented from osgGA::GUIEventHandler.

void osgViewer::WindowSizeHandler::setKeyEventToggleFullscreen ( int  key  )  [inline]

int osgViewer::WindowSizeHandler::getKeyEventToggleFullscreen (  )  const [inline]

void osgViewer::WindowSizeHandler::setToggleFullscreen ( bool  flag  )  [inline]

bool osgViewer::WindowSizeHandler::getToggleFullscreen (  )  const [inline]

void osgViewer::WindowSizeHandler::setKeyEventWindowedResolutionUp ( int  key  )  [inline]

int osgViewer::WindowSizeHandler::getKeyEventWindowedResolutionUp (  )  const [inline]

void osgViewer::WindowSizeHandler::setKeyEventWindowedResolutionDown ( int  key  )  [inline]

int osgViewer::WindowSizeHandler::getKeyEventWindowedResolutionDown (  )  const [inline]

void osgViewer::WindowSizeHandler::setChangeWindowedResolution ( bool  flag  )  [inline]

bool osgViewer::WindowSizeHandler::getChangeWindowedResolution (  )  const [inline]

virtual bool osgViewer::WindowSizeHandler::handle ( const osgGA::GUIEventAdapter ,
osgGA::GUIActionAdapter  
) [virtual]

Deprecated, Handle events, return true if handled, false otherwise.

Reimplemented from osgGA::GUIEventHandler.

void osgViewer::WindowSizeHandler::toggleFullscreen ( osgViewer::GraphicsWindow window  )  [protected]

void osgViewer::WindowSizeHandler::changeWindowedResolution ( osgViewer::GraphicsWindow window,
bool  increase 
) [protected]

unsigned int osgViewer::WindowSizeHandler::getNearestResolution ( int  screenWidth,
int  screenHeight,
int  width,
int  height 
) const [protected]


Member Data Documentation

int osgViewer::WindowSizeHandler::_keyEventToggleFullscreen [protected]

bool osgViewer::WindowSizeHandler::_toggleFullscreen [protected]

int osgViewer::WindowSizeHandler::_keyEventWindowedResolutionUp [protected]

int osgViewer::WindowSizeHandler::_keyEventWindowedResolutionDown [protected]

bool osgViewer::WindowSizeHandler::_changeWindowedResolution [protected]

std::vector<osg::Vec2> osgViewer::WindowSizeHandler::_resolutionList [protected]

int osgViewer::WindowSizeHandler::_currentResolutionIndex [protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:54 2007 for the OpenSceneGraph by doxygen 1.5.3.