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::ustring& __xtd_forms_trace_form_base_default_form_name__() noexcept;
12xtd::ustring& __xtd_forms_trace_form_base_default_text_box_name__() noexcept;
14
16namespace xtd {
18 namespace forms {
19
29 struct data;
30
31 public:
33
36
39 virtual const xtd::ustring& header_separator() const noexcept;
44
45 const xtd::ustring& name() const noexcept override;
46
49 virtual bool show_date() const noexcept;
53 virtual trace_form_base& show_date(bool value);
54
57 virtual bool show_time() const noexcept;
61 virtual trace_form_base& show_time(bool value);
63
64 protected:
66
70 explicit trace_form_base(const xtd::ustring& text);
72
74
76 void on_back_color_changed(const xtd::event_args& e) override;
77 void on_fore_color_changed(const xtd::event_args& e) override;
78
81 virtual void write(const xtd::ustring& trace);
82
85 virtual void write_line(const xtd::ustring& trace);
86
89 virtual void write_header();
90
94 virtual bool need_header() const;
99 virtual trace_form_base& need_header(bool value);
101
102 private:
103 using form::name;
104
105 void update_format();
106
107 std::shared_ptr<data> data_;
108 };
109 }
110}
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:79
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:52
Represents a base form for debug_form and trace_form forms. This class cannot be instantiated.
Definition trace_form_base.h:28
void on_fore_color_changed(const xtd::event_args &e) override
Raises the xtd::forms::control::fore_color_changed event.
const xtd::ustring & 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 const xtd::ustring & header_separator() const noexcept
Gets the string used to separate date and/or time from trace text.
virtual void write_line(const xtd::ustring &trace)
Writes trace string to the multiline text followed by a line terminator.
virtual void write(const xtd::ustring &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.
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
dock_style
Specifies the position and manner in which a control is docked.
Definition dock_style.h:21
@ 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.