Represents a display device or multiple display devices on a single system.
Public Properties | |
| auto | bits_per_pixel () const noexcept -> xtd::int32 |
| Gets the number of bits of memory, associated with one pixel of data. | |
| auto | bounds () const noexcept -> const xtd::drawing::rectangle & |
| Gets the bounds of the display. | |
| auto | device_name () const -> const xtd::string & |
| Gets the device name associated with a display. | |
| auto | high_resolution () const noexcept -> bool |
| Gets a value indicating whether a particular display is high resolution. | |
| auto | pixels_per_inch () const noexcept -> xtd::int32 |
| Gets the number of pixels per inch of the display. | |
| auto | primary () const noexcept -> bool |
| Gets a value indicating whether a particular display is the primary device. | |
| auto | scale_factor () const noexcept -> double |
| Gets the scale factor of the display. | |
| auto | working_area () const noexcept -> const xtd::drawing::rectangle & |
| Gets the working area of the display. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. | |
Public Methods | |
| auto | equals (const xtd::object &obj) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
| auto | equals (const screen &other) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
| auto | get_hash_code () const noexcept -> xtd::usize override |
| Serves as a hash function for a particular type. | |
Public Static Properties | |
| static auto | all_screens () -> xtd::array< screen > |
| Gets an array of all displays on the system. | |
| static auto | primary_screen () -> screen |
| Gets the primary display. | |
Public Static Methods | |
| static auto | create_graphics () -> xtd::drawing::graphics |
| Creates the xtd::drawing::graphics for the screen. | |
| static auto | from_control (const xtd::forms::control &control) -> screen |
| Retrieves a screen for the display that contains the largest portion of the specified control. | |
| static auto | from_handle (xtd::intptr handle) -> screen |
| Retrieves a screen for the display that contains the largest portion of the object referred to by the specified handle. | |
| static auto | from_point (const xtd::drawing::point &point) -> screen |
| Retrieves a screen for the display that contains the specified point. | |
| static auto | from_rectangle (const xtd::drawing::rectangle &rect) -> screen |
| Retrieves a screen for the display that contains the largest portion of the rectangle. | |
| static auto | get_bounds (const xtd::forms::control &control) -> xtd::drawing::rectangle |
| Retrieves the bounds of the display that contains the largest portion of the specified control. | |
| static auto | get_bounds (xtd::intptr handle) -> xtd::drawing::rectangle |
| Retrieves the bounds of the display that contains the largest portion of the specified handle. | |
| static auto | get_bounds (const xtd::drawing::point &point) -> xtd::drawing::rectangle |
| Retrieves the bounds of the display that contains the specified point. | |
| static auto | get_bounds (const xtd::drawing::rectangle &rect) -> xtd::drawing::rectangle |
| Retrieves the bounds of the display that contains the largest portion of the specified rectangle. | |
| static auto | get_standard_pixels_per_inch () -> xtd::int32 |
| Gets the the standard number of pixels per inch of the display. | |
| static auto | get_working_area (const xtd::forms::control &control) -> xtd::drawing::rectangle |
| Retrieves the working area for the display that contains the largest region of the specified control. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. | |
| static auto | get_working_area (xtd::intptr handle) -> xtd::drawing::rectangle |
| Retrieves the working area for the display that contains the largest region of the specified handle. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. | |
| static auto | get_working_area (const xtd::drawing::point &point) -> xtd::drawing::rectangle |
| Retrieves the working area closest to the specified point. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. | |
| static auto | get_working_area (const xtd::drawing::rectangle &rect) -> xtd::drawing::rectangle |
| Retrieves the working area for the display that contains the largest portion of the specified rectangle. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| virtual auto | equals (const screen &) const noexcept -> bool=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
|
nodiscardnoexcept |
Gets the number of bits of memory, associated with one pixel of data.
|
nodiscardnoexcept |
Gets the bounds of the display.
|
nodiscard |
Gets the device name associated with a display.
|
nodiscardnoexcept |
Gets a value indicating whether a particular display is high resolution.
|
nodiscardnoexcept |
Gets the number of pixels per inch of the display.
|
nodiscardnoexcept |
Gets a value indicating whether a particular display is the primary device.
|
nodiscardnoexcept |
Gets the scale factor of the display.
|
nodiscardnoexcept |
Gets the working area of the display. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars.
|
staticnodiscard |
Gets an array of all displays on the system.
|
staticnodiscard |
Gets the primary display.
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
nodiscardoverridenoexcept |
Determines whether the specified object is equal to the current object.
| other | The object to compare with the current object. |
|
nodiscardoverridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
staticnodiscard |
Creates the xtd::drawing::graphics for the screen.
|
staticnodiscard |
Retrieves a screen for the display that contains the largest portion of the specified control.
| control | A xtd::forms::control for which to retrieve a Screen. |
|
staticnodiscard |
Retrieves a screen for the display that contains the largest portion of the object referred to by the specified handle.
| handle | The window handle for which to retrieve the screen. |
|
staticnodiscard |
Retrieves a screen for the display that contains the specified point.
| point | A xtd::drawing::point that specifies the location for which to retrieve a screen. |
|
staticnodiscard |
Retrieves a screen for the display that contains the largest portion of the rectangle.
| A | xtd::drawing::rectangle that specifies the area for which to retrieve the display. |
|
staticnodiscard |
Retrieves the bounds of the display that contains the largest portion of the specified control.
| control | The control for which to retrieve the display bounds. |
|
staticnodiscard |
Retrieves the bounds of the display that contains the largest portion of the specified handle.
| handle | The window handle for which to retrieve the display bounds. |
|
staticnodiscard |
Retrieves the bounds of the display that contains the specified point.
| point | A xtd::drawing::point that specifies the coordinates for which to retrieve the display bounds. |
|
staticnodiscard |
Retrieves the bounds of the display that contains the largest portion of the specified rectangle.
| rect | A xtd::drawing::rectangle that specifies the area for which to retrieve the display bounds. |
|
staticnodiscard |
Gets the the standard number of pixels per inch of the display.
| Values and conversion | Windows | macOS | linux |
|---|---|---|---|
| Pixels per inch (PPI) | 96 | 72 | 96 |
| Pixels per centimeters (pixel/cm) | 38 | 28 | 38 |
| Pitch (µm) | 265 | 353 | 265 |
|
staticnodiscard |
Retrieves the working area for the display that contains the largest region of the specified control. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars.
| control | The control for which to retrieve the working area. |
|
staticnodiscard |
Retrieves the working area for the display that contains the largest region of the specified handle. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars.
| handle | The window handle for which to retrieve the working area. |
|
staticnodiscard |
Retrieves the working area closest to the specified point. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars.
| point | A xtd::drawing::point that specifies the coordinates for which to retrieve the working area. |
|
staticnodiscard |
Retrieves the working area for the display that contains the largest portion of the specified rectangle. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars.
| rect | The xtd::drawing::rectangle that specifies the area for which to retrieve the working area. |