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.
trace_form.cpp

The following code example demonstrate the use of trace_form form.

Windows

macOS

Gnome

#define TRACE
#include <xtd/xtd>
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 int counter = 0;
xtd::diagnostics::trace::write_line("Write line {}...", ++counter);
};
}
private:
};
int main() {
trace_form trace_form;
application::run(form1());
}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition: trace.h:323
static void run()
Begins running a standard application message loop on the current thread, without a form.
@ button1
The first button on the message box is the default button.
@ button
The appearance of a button.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13