![]() |
Gorgon Game Engine
|
Public Member Functions | |
~Monitor () | |
Geometry::Rectangle | GetArea () const |
Returns the area of the entire monitor including shift for multihead displays. More... | |
Geometry::Point | GetLocation () const |
Returns the location of this monitor relative to the other monitors in pixels. More... | |
std::string | GetName () const |
Returns the name of the monitor. More... | |
Geometry::Size | GetSize () const |
Returns the size of this monitor in pixels. More... | |
Geometry::Bounds | GetUsable () const |
Returns the area usable rectangle of the monitor. This region excludes any panels on the screen. More... | |
bool | IsPrimary () const |
Whether this display is primary. More... | |
Static Public Member Functions | |
static const Monitor * | FromLocation (Geometry::Point location) |
Returns the monitor from the given location. If none found, will return nullptr. More... | |
static bool | IsChangeEventSupported () |
In some cases, Changed event is not supported. More... | |
static const Containers::Collection< Monitor > & | Monitors () |
Returns all monitors connected to this device. More... | |
static Monitor & | Primary () |
Returns the default monitor. More... | |
static void | Refresh (bool force=false) |
Asks WindowManager to refresh the list of monitors. More... | |
Static Public Attributes | |
static Event | ChangedEvent |
Fires when window manager raises an event about a change in the monitor or screen layout. More... | |
~Monitor | ( | ) |
|
static |
Returns the monitor from the given location. If none found, will return nullptr.
References Gorgon::Geometry::IsInside().
Geometry::Rectangle GetArea | ( | ) | const |
Returns the area of the entire monitor including shift for multihead displays.
Geometry::Point GetLocation | ( | ) | const |
Returns the location of this monitor relative to the other monitors in pixels.
This function is expected to return (0, 0) if there are no other monitors in the system.
References basic_Rectangle< T_ >::TopLeft().
std::string GetName | ( | ) | const |
Returns the name of the monitor.
Geometry::Size GetSize | ( | ) | const |
Returns the size of this monitor in pixels.
References basic_Rectangle< T_ >::GetSize().
Geometry::Bounds GetUsable | ( | ) | const |
Returns the area usable rectangle of the monitor. This region excludes any panels on the screen.
|
static |
In some cases, Changed event is not supported.
This function might be used to query if it works or not. Even this event is not supported, RefreshMonitors function causes it to be raised after gathering information.
bool IsPrimary | ( | ) | const |
Whether this display is primary.
|
static |
Returns all monitors connected to this device.
|
static |
Asks WindowManager to refresh the list of monitors.
This may deallocate monitors and cause problems. Calling this method raises DisplayChanged to mitigate this problem partially. This function will not re-create monitor list if window manager determines that there are no changes in the monitors. You may set force parameter to true to ensure monitors list is re-created.
References basic_Rectangle< T_ >::Height, basic_Rectangle< T_ >::Width, basic_Rectangle< T_ >::X, and basic_Rectangle< T_ >::Y.
|
static |
Fires when window manager raises an event about a change in the monitor or screen layout.
Additionally, this event will be fired when RefreshMonitors causes monitor list to be re-created. If monitor pointers are stored, this event should be listened as a call to RefreshMonitors may invalidate these pointers.