xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
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:
button button1;
};
int main() {
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
Represents a Windows button control.
Definition: button.h:54
virtual drawing::color fore_color() const
Gets the foreground color of the control.
virtual drawing::color back_color() const
Gets the background color for the control.
Represents a form that displays debug form. This class cannot be inherited.
Definition: debug_form.h:25
Represents a window or dialog box that makes up an application's user interface.
Definition: form.h:40
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13