Represents a display device or multiple display devices on a single system.
- Header
#include <xtd/forms/screen>
- Namespace
- xtd::forms
- Library
- xtd.forms
- Examples
- The following code example demonstrates the use of screen class.
#include <xtd/forms/application>
#include <xtd/forms/form>
auto main()->int {
form1.
text(
"screen 1/4");
form2.
text(
"screen 2/4");
form3.
text(
"screen 3/4");
form4.
text(
"screen 4/4");
}
- Examples
- The following code example shows how to get screen informations of screen component.
#include <xtd/drawing/colors>
#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/screen>
#include <xtd/forms/text_box>
class main_form :
public form {
public:
main_form() {
client_size({450, 300});
text(
"Screen informations example");
screen_informations_text_box.multiline(true);
screen_informations_text_box.parent(*this);
screen_informations_text_box.read_only(true);
screen_informations_text_box.word_wrap(false);
auto index = 1;
screen_informations_text_box.append_text(ustring::format(
"Screen: {}\n", index,
environment::new_line()));
screen_informations_text_box.append_text(ustring::format(
" Scale factor: {}{}",
screen.
scale_factor()));
++index;
}
}
private:
};
auto main()->int {
}
- Examples:
- screen_informations.cpp.
|
static drawing::graphics | create_graphics () |
| Creates the xtd::drawing::graphics for the screen. More...
|
|
static screen | from_control (const control &control) |
| Retrieves a screen for the display that contains the largest portion of the specified control. More...
|
|
static screen | from_handle (intptr handle) |
| Retrieves a screen for the display that contains the largest portion of the object referred to by the specified handle. More...
|
|
static screen | from_point (const drawing::point &point) |
| Retrieves a screen for the display that contains the specified point. More...
|
|
static screen | from_rectangle (const drawing::rectangle &rect) |
| Retrieves a screen for the display that contains the largest portion of the rectangle. More...
|
|
static drawing::rectangle | get_bounds (const control &control) |
| Retrieves the bounds of the display that contains the largest portion of the specified control. More...
|
|
static drawing::rectangle | get_bounds (intptr handle) |
| Retrieves the bounds of the display that contains the largest portion of the specified handle. More...
|
|
static drawing::rectangle | get_bounds (const drawing::point &point) |
| Retrieves the bounds of the display that contains the specified point. More...
|
|
static drawing::rectangle | get_bounds (const drawing::rectangle &rect) |
| Retrieves the bounds of the display that contains the largest portion of the specified rectangle. More...
|
|
static int32 | get_standard_pixels_per_inch () |
| Gets the the standard number of pixels per inch of the display. More...
|
|
static drawing::rectangle | get_working_area (const control &control) |
| 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. More...
|
|
static drawing::rectangle | get_working_area (intptr handle) |
| 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. More...
|
|
static drawing::rectangle | get_working_area (const drawing::point &point) |
| 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. More...
|
|
static drawing::rectangle | get_working_area (const drawing::rectangle &rect) |
| 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. More...
|
|
|
| object ()=default |
| Create a new instance of the ultimate base class object. More...
|
|
bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More...
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More...
|
|
virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. More...
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const noexcept |
| Creates a shallow copy of the current object. More...
|
|
virtual xtd::ustring | to_string () const noexcept |
| Returns a sxd::ustring that represents the current object. More...
|
|
static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More...
|
|
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More...
|
|