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
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:
button button1;
text_box text_box1;
};
int main() {
enable_debug::trace_switch().level(xtd::diagnostics::trace_level::verbose);
enable_debug::set(enable_debug::key_events|enable_debug::mouse_events, true);
application::run(form1());
}
Represents a Windows button control.
Definition button.h:54
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
Represents a standard Windows text box.
Definition text_box.h:22
@ verbose
Output all debugging and tracing messages.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition about_box.h:13