xtd 0.2.0
xtd::forms::enable_debug Class Reference

Definition

Represent enable debug class.

Header
#include <xtd/forms/enable_debug>
Namespace
xtd::forms
Library
xtd.forms
Remarks
You can activate or deactivate one, some or all debug trace categories.
Examples
The following code example demonstrates the use of enable_debug class.
#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:
text_box text_box1;
};
auto main()->int {
auto df = debug_form {};
application::run(form1 {});
}

Fields

static const enable_debug none
 Represent none 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 mouse_events
 Represent mouse events debug. More...
 
static const enable_debug layout
 Represent layout debug. More...
 
static const enable_debug workaround
 Represent workaround debug. More...
 
static const enable_debug all
 Represent all debug. More...
 

Properties

static xtd::diagnostics::trace_switchtrace_switch () noexcept
 Gets a trace switch to configure debug traces. More...
 

Methods

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...
 
bool equals (const enable_debug &value) const noexcept override
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
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...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
 
- Public Member Functions inherited from xtd::iequatable< enable_debug >
virtual bool equals (const enable_debug &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type. 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...
 

Member Function Documentation

◆ get()

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

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 
)
static

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 ( )
staticnoexcept

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: