xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
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:
button button1;
};
int main() {
application::run(form1());
}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition trace.h:323
Represents a Windows button control.
Definition button.h:54
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:40
Represents a form that displays trace form. This class cannot be inherited.
Definition trace_form.h:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition about_box.h:13