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
Static Public Attributes | Static Public Member Functions | List of all members
xtd::forms::enable_debug Class Reference

#include <enable_debug.h>

Definition

Represent enable debug class.

Namespace
xtd::forms
Library
xtd.forms
Remarks
You can activate or deactivate one, some or all debug trace categories.
Examples
The following code example demonstrate the use of enable_debug class.
#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() {
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.
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
static const enable_debug mouse_events
Represent mouse events debug.
Definition enable_debug.h:47
static xtd::diagnostics::trace_switch & trace_switch()
Gets a trace switch to configure debug traces.
Definition enable_debug.h:64
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
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.
@ button1
The first button on the message box is the default button.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition about_box.h:13

Inherits xtd::object.

Static Public Attributes

static const enable_debug all
 Represent all debug.
 
static const enable_debug creation
 Represent creation debug.
 
static const enable_debug events
 Represent events debug.
 
static const enable_debug key_events
 Represent key events debug.
 
static const enable_debug layout
 Represent layout debug.
 
static const enable_debug mouse_events
 Represent mouse events debug.
 
static const enable_debug none
 Represent none debug.
 
static const enable_debug workaround
 Represent workaround debug.
 

Static Public Member Functions

static bool get (const enable_debug &flags)
 Gets enable_debug flags status.
 
static void set (const enable_debug &flags, bool on)
 Sets enable_debug flags status.
 
static xtd::diagnostics::trace_switchtrace_switch ()
 Gets a trace switch to configure debug traces.
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance.
 
virtual xtd::ustring to_string () const noexcept
 Returns a std::string that represents the current object.
 

Member Function Documentation

◆ get()

static bool xtd::forms::enable_debug::get ( const enable_debug flags)
inlinestatic

Gets enable_debug flags status.

Returns
true if enable_debug flags is on; otherwise false.

◆ set()

static void xtd::forms::enable_debug::set ( const enable_debug flags,
bool  on 
)
inlinestatic

Sets enable_debug flags status.

Parameters
ontrue if enable_debug flags is on; otherwise false.

◆ trace_switch()

static xtd::diagnostics::trace_switch & xtd::forms::enable_debug::trace_switch ( )
inlinestatic

Gets a trace switch to configure debug traces.

Returns
a xtd::diagnostics::trace_switch to configure debug traces.

Member Data Documentation

◆ all

const enable_debug xtd::forms::enable_debug::all
static

Represent all debug.

◆ creation

const enable_debug xtd::forms::enable_debug::creation
static

Represent creation debug.

◆ events

const enable_debug xtd::forms::enable_debug::events
static

Represent events debug.

◆ key_events

const enable_debug xtd::forms::enable_debug::key_events
static

Represent key events debug.

◆ layout

const enable_debug xtd::forms::enable_debug::layout
static

Represent layout debug.

◆ mouse_events

const enable_debug xtd::forms::enable_debug::mouse_events
static

Represent mouse events debug.

◆ none

const enable_debug xtd::forms::enable_debug::none
static

Represent none debug.

◆ workaround

const enable_debug xtd::forms::enable_debug::workaround
static

Represent workaround debug.


The documentation for this class was generated from the following file: