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

The following code example demonstrate the use of enable_debug class.

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("Enable debug example");
name("form1");
button1.auto_repeat(true);
button1.auto_size(true);
button1.location({10, 10});
button1.parent(*this);
button1.text("click-me");
button1.name("button1");
text_box1.location({10, 50});
text_box1.parent(*this);
text_box1.text("Text box");
text_box1.name("text_box1");
}
private:
text_box text_box1;
};
int main() {
debug_form debug_form;
application::run(form1());
}
xtd::diagnostics::trace_level level() const
Gets the trace level that determines the messages the switch allows.
static void run()
Begins running a standard application message loop on the current thread, without a form.
static const enable_debug mouse_events
Represent mouse events debug.
Definition: enable_debug.h:47
static const enable_debug key_events
Represent key events debug.
Definition: enable_debug.h:45
static void set(const enable_debug &flags, bool on)
Sets enable_debug flags status.
Definition: enable_debug.h:60
static xtd::diagnostics::trace_switch & trace_switch()
Gets a trace switch to configure debug traces.
Definition: enable_debug.h:64
@ verbose
Output all debugging and tracing messages.
@ text_box
The system-defined color of the accent color (macos specific. On other platform is same as window).
@ 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