#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 = 0;
screen_informations_text_box.append_text(string::format(
"Screen: {}\n", ++index,
environment::new_line()));
screen_informations_text_box.append_text(string::format(
" Scale factor: {}{}",
screen.
scale_factor()));
}
}
private:
};
auto main() -> int {
}
static xtd::drawing::color dark_blue() noexcept
A system-defined color object.
static xtd::drawing::color yellow() noexcept
A system-defined color object.
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
@ text_box
The system-defined color of the accent color (macos specific. On other platform is same as window).
Definition known_color.hpp:501
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8