xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
buttons.cpp

The following code example demonstrate the use of buttons control factory.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd::forms;
int main() {
auto main_form = control::create<form>("Buttons example", {100, 200}, {450, 200});
auto actual_size_button = buttons::actual_size(*main_form, {10, 10}, {90, 25});
auto zoom_in_button = buttons::zoom_in(*main_form, {110, 10}, {90, 25});
auto zoom_out_button = buttons::zoom_out(*main_form, {210, 10}, {90, 25});
auto zoom_to_fit_button = buttons::zoom_to_fit(*main_form, {310, 10}, {90, 25});
application::run(*main_form);
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
static std::unique_ptr< button > actual_size(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined button that represent actual size button.
Definition: buttons.h:59
static std::unique_ptr< button > zoom_in(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined button that represent zoom in button.
Definition: buttons.h:1214
static std::unique_ptr< button > zoom_to_fit(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined button that represent zoom to fit button.
Definition: buttons.h:1244
static std::unique_ptr< button > zoom_out(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined button that represent zoom out button.
Definition: buttons.h:1229
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13