xtd 0.2.0
Loading...
Searching...
No Matches
trace_form.cpp

demonstrates the use of xtd::trace_forms::trace_form container.

Windows

macOS

Gnome

#define TRACE
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/trace_form>
using namespace xtd::diagnostics;
using namespace xtd::drawing;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Trace form example");
button1.auto_repeat(true);
button1.auto_size(true);
button1.location({10, 10});
button1.parent(*this);
button1.text("Write line...");
button1.click += [&] {
static auto counter = 0;
trace::write_line("Write line {}...", ++counter);
};
}
private:
button button1;
};
auto main() -> int {
auto tf = trace_form {};
tf.back_color(color::navy);
tf.fore_color(color::white);
application::run(form1 {});
}
Represents a Windows button control.
Definition button.h:49
virtual drawing::color back_color() const noexcept
Gets the background color for the control.
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Represents a form that displays trace form. This class cannot be inherited.
Definition trace_form.h:36
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.h:10
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition brush.h:18
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12