Classes | Public Member Functions | Public Attributes | List of all members
Displays Class Reference

Manages details about connected display devices. More...

Classes

struct  Display
 Represents a connected display device. More...
 

Public Member Functions

Rectangle< intphysicalToLogical (Rectangle< int > physicalRect, const Display *useScaleFactorOfDisplay=nullptr) const noexcept
 Converts an integer Rectangle from physical to logical pixels. More...
 
Rectangle< float > physicalToLogical (Rectangle< float > physicalRect, const Display *useScaleFactorOfDisplay=nullptr) const noexcept
 Converts a floating-point Rectangle from physical to logical pixels. More...
 
Rectangle< intlogicalToPhysical (Rectangle< int > logicalRect, const Display *useScaleFactorOfDisplay=nullptr) const noexcept
 Converts an integer Rectangle from logical to physical pixels. More...
 
Rectangle< float > logicalToPhysical (Rectangle< float > logicalRect, const Display *useScaleFactorOfDisplay=nullptr) const noexcept
 Converts a floating-point Rectangle from logical to physical pixels. More...
 
template<typename ValueType >
Point< ValueType > physicalToLogical (Point< ValueType > physicalPoint, const Display *useScaleFactorOfDisplay=nullptr) const noexcept
 Converts a Point from physical to logical pixels. More...
 
template<typename ValueType >
Point< ValueType > logicalToPhysical (Point< ValueType > logicalPoint, const Display *useScaleFactorOfDisplay=nullptr) const noexcept
 Converts a Point from logical to physical pixels. More...
 
const DisplaygetDisplayForRect (Rectangle< int > rect, bool isPhysical=false) const noexcept
 Returns the Display object representing the display containing a given Rectangle (either in logical or physical pixels), or nullptr if there are no connected displays. More...
 
const DisplaygetDisplayForPoint (Point< int > point, bool isPhysical=false) const noexcept
 Returns the Display object representing the display containing a given Point (either in logical or physical pixels), or nullptr if there are no connected displays. More...
 
const DisplaygetPrimaryDisplay () const noexcept
 Returns the Display object representing the display acting as the user's main screen, or nullptr if there are no connected displays. More...
 
RectangleList< intgetRectangleList (bool userAreasOnly) const
 Returns a RectangleList made up of all the displays in LOGICAL pixels. More...
 
Rectangle< intgetTotalBounds (bool userAreasOnly) const
 Returns the smallest bounding box which contains all the displays in LOGICAL pixels. More...
 

Public Attributes

Array< Displaydisplays
 An Array containing the Display objects for all of the connected displays. More...
 

Detailed Description

Manages details about connected display devices.

Member Function Documentation

◆ physicalToLogical() [1/3]

Rectangle<int> Displays::physicalToLogical ( Rectangle< int physicalRect,
const Display useScaleFactorOfDisplay = nullptr 
) const
noexcept

Converts an integer Rectangle from physical to logical pixels.

If useScaleFactorOfDisplay is not null then its scale factor will be used for the conversion regardless of the display that the Rectangle to be converted is on.

◆ physicalToLogical() [2/3]

Rectangle<float> Displays::physicalToLogical ( Rectangle< float >  physicalRect,
const Display useScaleFactorOfDisplay = nullptr 
) const
noexcept

Converts a floating-point Rectangle from physical to logical pixels.

If useScaleFactorOfDisplay is not null then its scale factor will be used for the conversion regardless of the display that the Rectangle to be converted is on.

◆ logicalToPhysical() [1/3]

Rectangle<int> Displays::logicalToPhysical ( Rectangle< int logicalRect,
const Display useScaleFactorOfDisplay = nullptr 
) const
noexcept

Converts an integer Rectangle from logical to physical pixels.

If useScaleFactorOfDisplay is not null then its scale factor will be used for the conversion regardless of the display that the Rectangle to be converted is on.

◆ logicalToPhysical() [2/3]

Rectangle<float> Displays::logicalToPhysical ( Rectangle< float >  logicalRect,
const Display useScaleFactorOfDisplay = nullptr 
) const
noexcept

Converts a floating-point Rectangle from logical to physical pixels.

If useScaleFactorOfDisplay is not null then its scale factor will be used for the conversion regardless of the display that the Rectangle to be converted is on.

◆ physicalToLogical() [3/3]

template<typename ValueType >
Point<ValueType> Displays::physicalToLogical ( Point< ValueType >  physicalPoint,
const Display useScaleFactorOfDisplay = nullptr 
) const
noexcept

Converts a Point from physical to logical pixels.

If useScaleFactorOfDisplay is not null then its scale factor will be used for the conversion regardless of the display that the Point to be converted is on.

◆ logicalToPhysical() [3/3]

template<typename ValueType >
Point<ValueType> Displays::logicalToPhysical ( Point< ValueType >  logicalPoint,
const Display useScaleFactorOfDisplay = nullptr 
) const
noexcept

Converts a Point from logical to physical pixels.

If useScaleFactorOfDisplay is not null then its scale factor will be used for the conversion regardless of the display that the Point to be converted is on.

◆ getDisplayForRect()

const Display* Displays::getDisplayForRect ( Rectangle< int rect,
bool  isPhysical = false 
) const
noexcept

Returns the Display object representing the display containing a given Rectangle (either in logical or physical pixels), or nullptr if there are no connected displays.

If the Rectangle lies outside all the displays then the nearest one will be returned.

◆ getDisplayForPoint()

const Display* Displays::getDisplayForPoint ( Point< int point,
bool  isPhysical = false 
) const
noexcept

Returns the Display object representing the display containing a given Point (either in logical or physical pixels), or nullptr if there are no connected displays.

If the Point lies outside all the displays then the nearest one will be returned.

◆ getPrimaryDisplay()

const Display* Displays::getPrimaryDisplay ( ) const
noexcept

Returns the Display object representing the display acting as the user's main screen, or nullptr if there are no connected displays.

◆ getRectangleList()

RectangleList<int> Displays::getRectangleList ( bool  userAreasOnly) const

Returns a RectangleList made up of all the displays in LOGICAL pixels.

◆ getTotalBounds()

Rectangle<int> Displays::getTotalBounds ( bool  userAreasOnly) const

Returns the smallest bounding box which contains all the displays in LOGICAL pixels.

Member Data Documentation

◆ displays

Array<Display> Displays::displays

An Array containing the Display objects for all of the connected displays.


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