xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
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:
text_box text_box1;
};
int main() {
debug_form debug_form;
application::run(form1());
}

Static Public Attributes

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

Static Public Member Functions

static bool get (const enable_debug &flags)
 Gets enable_debug flags status. More...
 
static void set (const enable_debug &flags, bool on)
 Sets enable_debug flags status. More...
 
static xtd::diagnostics::trace_switchtrace_switch ()
 Gets a trace switch to configure debug traces. More...
 
- 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. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Additional Inherited Members

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

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

◆ 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.
Examples:
enable_debug.cpp.

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.

Examples:
enable_debug.cpp.

◆ 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.

Examples:
enable_debug.cpp.

◆ 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: