xtd 0.2.0
Loading...
Searching...
No Matches
enable_debug.cpp

demonstrates the use of xtd::enable_debugs::enable_debug container.

Windows

macOS

Gnome

#define DEBUG // Force debug mode even if example is builded in release.
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/debug_form>
#include <xtd/forms/enable_debug>
#include <xtd/forms/form>
#include <xtd/forms/text_box>
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;
};
auto main()->int {
auto df = debug_form {};
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:47
Represents a form that displays debug form. This class cannot be inherited.
Definition debug_form.h:34
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:52
Represents a standard Windows text box.
Definition text_box.h:29
@ verbose
Output all debugging and tracing messages.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12