Manages details about connected display devices. More...
#include <juce_Displays.h>
Classes | |
struct | Display |
Represents a connected display device. More... | |
Public Member Functions | |
const Display & | findDisplayForPoint (Point< int >, bool isPhysical=false) const noexcept |
Returns the Display object representing the display containing a given Point (either in logical or physical pixels). More... | |
const Display & | findDisplayForRect (Rectangle< int >, bool isPhysical=false) const noexcept |
Returns the Display object representing the display containing a given Rectangle (either in logical or physical pixels). More... | |
const Display & | getMainDisplay () const noexcept |
Returns the Display object representing the display acting as the user's main screen. More... | |
RectangleList< int > | getRectangleList (bool userAreasOnly) const |
Returns a RectangleList made up of all the displays in LOGICAL pixels. More... | |
Rectangle< int > | getTotalBounds (bool userAreasOnly) const |
Returns the smallest bounding box which contains all the displays in LOGICAL pixels. More... | |
Rectangle< int > | logicalToPhysical (Rectangle< int >, const Display *useScaleFactorOfDisplay=nullptr) const noexcept |
Converts a Rectangle from logical to physical pixels. More... | |
template<typename ValueType > | |
Point< ValueType > | logicalToPhysical (Point< ValueType >, const Display *useScaleFactorOfDisplay=nullptr) const noexcept |
Converts a Point from logical to physical pixels. More... | |
Rectangle< int > | physicalToLogical (Rectangle< int >, const Display *useScaleFactorOfDisplay=nullptr) const noexcept |
Converts a Rectangle from physical to logical pixels. More... | |
template<typename ValueType > | |
Point< ValueType > | physicalToLogical (Point< ValueType >, const Display *useScaleFactorOfDisplay=nullptr) const noexcept |
Converts a Point from physical to logical pixels. More... | |
Public Attributes | |
Array< Display > | displays |
An Array containing the Display objects for all of the connected displays. More... | |
Private Member Functions | |
Displays (Desktop &) | |
void | findDisplays (float masterScale) |
void | init (Desktop &) |
void | updateToLogical () |
Friends | |
class | Desktop |
Manages details about connected display devices.
{GUI}
|
private |
|
noexcept |
Returns the Display object representing the display containing a given Rectangle (either in logical or physical pixels).
If the Rectangle lies outside all the displays then the nearest one will be returned.
Referenced by juce::OpenGLContext::NativeContext::getWindowScaleFactor().
|
private |
|
noexcept |
Returns the Display object representing the display acting as the user's main screen.
Referenced by juce::OpenGLContext::NativeContext::updateWindowPosition().
RectangleList<int> juce::Displays::getRectangleList | ( | bool | userAreasOnly | ) | const |
Returns a RectangleList made up of all the displays in LOGICAL pixels.
Returns the smallest bounding box which contains all the displays in LOGICAL pixels.
|
private |
|
noexcept |
Converts a Point from logical to physical pixels.
|
noexcept |
Converts a Point from physical to logical pixels.
|
private |
|
friend |