OpenSceneGraph 2.8.3

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:

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

void osgViewer::WindowSizeHandler::changeWindowedResolution ( osgViewer::GraphicsWindow window,
bool  increase 
) [protected]
bool osgViewer::WindowSizeHandler::getChangeWindowedResolution ( ) const [inline]
int osgViewer::WindowSizeHandler::getKeyEventToggleFullscreen ( ) const [inline]
int osgViewer::WindowSizeHandler::getKeyEventWindowedResolutionDown ( ) const [inline]
int osgViewer::WindowSizeHandler::getKeyEventWindowedResolutionUp ( ) const [inline]
unsigned int osgViewer::WindowSizeHandler::getNearestResolution ( int  screenWidth,
int  screenHeight,
int  width,
int  height 
) const [protected]
bool osgViewer::WindowSizeHandler::getToggleFullscreen ( ) const [inline]
virtual void osgViewer::WindowSizeHandler::getUsage ( osg::ApplicationUsage usage) const [virtual]

Get the keyboard and mouse usage of this manipulator.

Reimplemented from osgGA::GUIEventHandler.

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::setChangeWindowedResolution ( bool  flag) [inline]
void osgViewer::WindowSizeHandler::setKeyEventToggleFullscreen ( int  key) [inline]
void osgViewer::WindowSizeHandler::setKeyEventWindowedResolutionDown ( int  key) [inline]
void osgViewer::WindowSizeHandler::setKeyEventWindowedResolutionUp ( int  key) [inline]
void osgViewer::WindowSizeHandler::setToggleFullscreen ( bool  flag) [inline]
void osgViewer::WindowSizeHandler::toggleFullscreen ( osgViewer::GraphicsWindow window) [protected]

Member Data Documentation


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

osg logo
Generated at Tue Mar 22 2011 13:20:31 for the OpenSceneGraph by doxygen 1.7.3.