Class Monitor#
Defined in File Monitor.h
Nested Relationships#
Nested Types#
Class Documentation#
- 
class Monitor#
 Class representing a physical monitor.
Remark
Headless mode: This class is not available in headless mode.
Public Functions
- 
constexpr ~Monitor() = default#
 Destructor.
- 
constexpr std::string GetName() const noexcept#
 Retrieve the name of a monitor.
- Returns:
 Name of the monitor.
- 
std::vector<VideoMode> GetVideoModes() const#
 Retrieve a list of available video modes for the monitor.
- Returns:
 Vector of video modes.
- 
std::optional<TRAP::Monitor::VideoMode> GetNativeVideoMode() const noexcept#
 Retrieve the native video mode.
- Returns:
 Native video mode on success, empty optional otherwise.
- 
std::optional<TRAP::Monitor::VideoMode> GetCurrentVideoMode() const noexcept#
 Retrieve the current video mode.
- Returns:
 Current video mode on success, empty optional otherwise.
- 
Math::Vec2 GetContentScale() const#
 Retrieve the monitors content scale.
- Returns:
 Vec2 containing the content scale.
- 
f32 GetContentScaleX() const#
 Retrieve the monitors X content scale.
- Returns:
 Monitors X content scale.
- 
f32 GetContentScaleY() const#
 Retrieve the monitors Y content scale.
- Returns:
 Monitors Y content scale.
- 
Math::Vec2i GetPosition() const#
 Retrieve the monitors viewport position.
- Returns:
 Vec2i containing the monitors viewport position.
- 
i32 GetPositionX() const#
 Retrieve the monitors X viewport position.
- Returns:
 Monitors X viewport position.
- 
i32 GetPositionY() const#
 Retrieve the monitors Y viewport position.
- Returns:
 Monitors Y viewport position.
- 
Math::Vec4i GetWorkArea() const#
 Retrieve the monitors work area.
Work area is the area of a monitor without task bars or menu bars.
- Returns:
 Vec4i containing the monitors work area.
- 
i32 GetWorkAreaWidth() const#
 Retrieve the monitors work area width.
- Returns:
 Monitors work area width.
- 
i32 GetWorkAreaHeight() const#
 Retrieve the monitors work area height.
- Returns:
 Monitors work area height.
- 
constexpr bool IsInUse() const noexcept#
 Check whether the monitor is currently used by a window.
- Returns:
 True if monitor is currently used, false otherwise.
Public Static Functions
- 
struct VideoMode#
 Struct representing a video mode used by TRAP::Monitors.
Remark
Headless mode: This struct is not available in headless mode.
- 
constexpr ~Monitor() = default#