osg::GraphicsContext::ScreenIdentifier Struct Reference

`#include <GraphicsContext>`

Inheritance diagram for osg::GraphicsContext::ScreenIdentifier:

## Public Member Functions

| ScreenIdentifier ()
| ScreenIdentifier (int in_screenNum)
| ScreenIdentifier (const std::string &in_hostName, int in_displayNum, int in_screenNum)
std::string | displayName () const
void | readDISPLAY ()
void | setScreenIdentifier (const std::string &displayName)
void | setUndefinedScreenDetailsToDefaultScreen ()

## Public Attributes

std::string | hostName
int | displayNum
int | screenNum

## Constructor & Destructor Documentation

## ScreenIdentifier() [1/3]

osg::GraphicsContext::ScreenIdentifier::ScreenIdentifier | ( |  | ) |

## ScreenIdentifier() [2/3]

osg::GraphicsContext::ScreenIdentifier::ScreenIdentifier | ( | int | in_screenNum | ) |

## ScreenIdentifier() [3/3]

osg::GraphicsContext::ScreenIdentifier::ScreenIdentifier | ( | const std::string & | in_hostName,
|  | int | in_displayNum,
|  | int | in_screenNum )

## Member Function Documentation

## displayName()

std::string osg::GraphicsContext::ScreenIdentifier::displayName | ( |  | ) | const

Return the display name in the form hostName::displayNum:screenNum.

Referenced by setScreenIdentifier().

## readDISPLAY()

void osg::GraphicsContext::ScreenIdentifier::readDISPLAY | ( |  | ) |

Read the DISPLAY environmental variable, and set the ScreenIdentifier accordingly. Note, if either of displayNum or screenNum are not defined then -1 is set respectively to signify that this parameter has not been set. When parameters are undefined one can call call setUndefinedScreenDetailsToDefaultScreen() after readDISPLAY() to ensure valid values.

## setScreenIdentifier()

void osg::GraphicsContext::ScreenIdentifier::setScreenIdentifier | ( | const std::string & | displayName | ) |

Set the screenIndentifier from the displayName string. Note, if either of displayNum or screenNum are not defined then -1 is set to signify that this parameter has not been set. When parameters are undefined one can call call setUndefinedScreenDetailsToDefaultScreen() after readDISPLAY() to ensure valid values.

References displayName().

## setUndefinedScreenDetailsToDefaultScreen()

void osg::GraphicsContext::ScreenIdentifier::setUndefinedScreenDetailsToDefaultScreen | ( |  | ) |

inline

Set any undefined displayNum or screenNum values (i.e. -1) to the default display & screen of 0 respectively.

References displayNum, and screenNum.

## Member Data Documentation

## displayNum

int osg::GraphicsContext::ScreenIdentifier::displayNum

Referenced by setUndefinedScreenDetailsToDefaultScreen().

## hostName

std::string osg::GraphicsContext::ScreenIdentifier::hostName

## screenNum

int osg::GraphicsContext::ScreenIdentifier::screenNum

Referenced by setUndefinedScreenDetailsToDefaultScreen().

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

- GraphicsContext