#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/screen>
auto main() -> int {
auto form_color = known_color::alice_blue;
auto form_main = form::create(
"Main Form",
point {screen::primary_screen().working_area().width() - 340, 40});
auto create_button = button::create(form_main, "Create", {10, 10});
create_button.click += [&] {
auto colored_form = new_ptr<form>();
colored_forms.push_back(colored_form);
form_color = form_color != known_color::yellow_green ? as<known_color>(as<int>(form_color) + 1) : known_color::alice_blue;
};
application::run(form_main);
}
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.h:71
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition point.h:54
Provides the base class for enumerations.
Definition enum_object.h:42
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.h:15
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.h:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10