xtd 0.2.0
screen.cpp

demonstrates the use of xtd::forms::screen component.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/form>
using namespace xtd::forms;
auto main() -> int {
form form1;
form1.location(area.location());
form1.size({area.size().width / 2, area.size().height / 2});
form1.text("screen 1/4");
form1.visible(true);
form form2;
form2.location({area.location().x + area.size().width / 2, area.location().y});
form2.size({area.size().width / 2, area.size().height / 2});
form2.text("screen 2/4");
form2.visible(true);
form form3;
form3.location({area.location().x, area.location().y + area.size().height / 2});
form3.size({area.size().width / 2, area.size().height / 2});
form3.text("screen 3/4");
form3.visible(true);
form form4;
form4.location({area.location().x + area.size().width / 2, area.location().y + area.size().height / 2});
form4.size({area.size().width / 2, area.size().height / 2});
form4.text("screen 4/4");
form4.visible(true);
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual const xtd::string & text() const noexcept
Gets the text associated with this control.
virtual drawing::size size() const noexcept
Gets the height and width of the control.
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
control & visible(bool visible) override
Sets a value indicating whether the control and all its child controls are displayed.
virtual form_start_position start_position() const noexcept
Gets the starting position of the form at run time.
static screen primary_screen()
Gets the primary display.
@ manual
The position of the form is determined by the Location property.
Definition form_start_position.hpp:24
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:217
int32 y
Gets or sets the y-coordinate of this xtd::drawing::point.
Definition point.hpp:198
int32 x
Gets or sets the x-coordinate of this xtd::drawing::point.
Definition point.hpp:175
Stores a set of four integers that represent the location and size of a rectangle.
Definition rectangle.hpp:44
xtd::drawing::size size() const noexcept
Gets the size of this xtd::drawing::rectangle.
xtd::drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of this xtd::drawing::rectangle structure.
int32 height
Gets or sets he vertical component of this xtd::drawing::size class.
Definition size.hpp:70
int32 width
Gets or sets the horizontal component of this xtd::drawing::size class.
Definition size.hpp:65