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

The following code example demonstrate the use of debug_form form.

Windows

macOS

Gnome

#define DEBUG // Force debug mode even if example is builded in release.
#include <xtd/xtd>
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Debug 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::debug::write_line("Write line {}...", ++counter);
};
}
private:
};
int main() {
debug_form debug_form;
debug_form.back_color(xtd::drawing::color::black);
debug_form.fore_color(xtd::drawing::color::lime);
application::run(form1());
}
static void write_line()
Writes a line terminator to the trace listeners in the listeners collection.
Definition: debug.h:336
static const xtd::drawing::color lime
Gets a system-defined color that has an ARGB value of 0xFF00FF00. This field is constant.
Definition: color.h:276
static const xtd::drawing::color black
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
Definition: color.h:69
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