xtd 0.2.0
Loading...
Searching...
No Matches
trace_form_base.h
Go to the documentation of this file.
1
4#pragma once
5#include "form.h"
6#include "text_box.h"
7#include <xtd/drawing/font_family>
8#include <xtd/date_time>
9
11xtd::string& __xtd_forms_trace_form_base_default_form_name__() noexcept;
12xtd::string& __xtd_forms_trace_form_base_default_text_box_name__() noexcept;
14
16namespace xtd {
18 namespace forms {
19
31 struct data;
32
33 public:
35
38
41 virtual const xtd::string& header_separator() const noexcept;
46
47 const xtd::string& name() const noexcept override;
48
51 virtual bool show_date() const noexcept;
55 virtual trace_form_base& show_date(bool value);
56
59 virtual bool show_time() const noexcept;
63 virtual trace_form_base& show_time(bool value);
65
66 protected:
68
72 explicit trace_form_base(const xtd::string& text);
74
76
78 void on_back_color_changed(const xtd::event_args& e) override;
79 void on_fore_color_changed(const xtd::event_args& e) override;
80
83 virtual void write(const xtd::string& trace);
84
87 virtual void write_line(const xtd::string& trace);
88
91 virtual void write_header();
92
96 virtual bool need_header() const;
101 virtual trace_form_base& need_header(bool value);
103
104 private:
105 using form::name;
106
107 void update_format();
108
109 xtd::sptr<data> data_;
110 };
111 }
112}
Represents text as a sequence of character units.
Definition basic_string.h:79
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Defines the base class for controls, which are components with visual representation.
Definition control.h:81
virtual dock_style dock() const noexcept
Gets which control borders are docked to its parent control and determines how a control is resized w...
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Represents a base form for debug_form and trace_form forms. This class cannot be instantiated.
Definition trace_form_base.h:30
void on_fore_color_changed(const xtd::event_args &e) override
Raises the xtd::forms::control::fore_color_changed event.
virtual const xtd::string & header_separator() const noexcept
Gets the string used to separate date and/or time from trace text.
const xtd::string & name() const noexcept override
Gets the name of the control.
xtd::forms::control & dock(xtd::forms::dock_style dock) override
Sets which control borders are docked to its parent control and determines how a control is resized w...
virtual bool show_date() const noexcept
Gets a value indicate if date is showing before trace text.
virtual bool show_time() const noexcept
Gets a value indicate if time is showing before trace text.
virtual void write_line(const xtd::string &trace)
Writes trace string to the multiline text followed by a line terminator.
virtual void write(const xtd::string &trace)
Writes trace string to the multiline text.
void on_back_color_changed(const xtd::event_args &e) override
Raises the xtd::forms::control::back_color_changed event.
virtual bool need_header() const
Gets a value indicate if header need written.
virtual void write_header()
Writes header, if needed. Writes date and/or time and header_separator.
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
dock_style
Specifies the position and manner in which a control is docked.
Definition dock_style.h:23
@ e
The E key.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::style_sheets::form alias.
Contains xtd::forms::text_box control.