xtd 1.0.0
Loading...
Searching...
No Matches
trace_form_base.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "form.hpp"
6#include "text_box.hpp"
7#include <xtd/drawing/font_family>
8#include <xtd/date_time>
9
11auto __xtd_forms_trace_form_base_default_form_name__() noexcept -> xtd::string&;
12auto __xtd_forms_trace_form_base_default_text_box_name__() noexcept -> xtd::string&;
14
16namespace xtd {
18 namespace forms {
19
31 struct data;
32
33 public:
35
39
42 [[nodiscard]] virtual auto header_separator() const noexcept -> const xtd::string&;
46 virtual auto header_separator(const xtd::string& value) -> trace_form_base&;
47
48 [[nodiscard]] auto name() const noexcept -> const xtd::string& override;
49
52 [[nodiscard]] virtual auto show_date() const noexcept -> bool;
56 virtual auto show_date(bool value) -> trace_form_base&;
57
60 [[nodiscard]] virtual auto show_time() const noexcept -> bool;
64 virtual auto show_time(bool value) -> trace_form_base&;
66
67 protected:
69
73 explicit trace_form_base(const xtd::string& text);
75
77
82 [[nodiscard]] virtual auto need_header() const -> bool;
87 virtual auto need_header(bool value) -> trace_form_base&;
89
91
93 auto on_back_color_changed(const xtd::event_args& e) -> void override;
94 auto on_fore_color_changed(const xtd::event_args& e) -> void override;
95
98 virtual auto write(const xtd::string& trace) -> void;
99
102 virtual auto write_line(const xtd::string& trace) -> void;
103
106 virtual auto write_header() -> void;
108
109 private:
110 using form::name;
111
112 auto update_format() -> void;
113
114 xtd::sptr<data> data_;
115 };
116 }
117}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
virtual auto dock() const noexcept -> xtd::forms::dock_style
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.hpp:54
form()
Initializes a new instance of the Form class.
virtual auto write_line(const xtd::string &trace) -> void
Writes trace string to the multiline text followed by a line terminator.
virtual auto write_header() -> void
Writes header, if needed. Writes date and/or time and header_separator.
auto dock(xtd::forms::dock_style dock) -> xtd::forms::control &override
Sets which control borders are docked to its parent control and determines how a control is resized w...
virtual auto write(const xtd::string &trace) -> void
Writes trace string to the multiline text.
auto on_back_color_changed(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::back_color_changed event.
trace_form_base(const xtd::string &text)
Initializes a new instance of the trace_form_base class with specified caption text.
virtual auto show_date() const noexcept -> bool
Gets a value indicate if date is showing before trace text.
auto on_fore_color_changed(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::fore_color_changed event.
virtual auto need_header() const -> bool
Gets a value indicate if header need written.
auto name() const noexcept -> const xtd::string &override
Gets the name of the control.
virtual auto show_time() const noexcept -> bool
Gets a value indicate if time is showing before trace text.
virtual auto header_separator() const noexcept -> const xtd::string &
Gets the string used to separate date and/or time from trace text.
Contains xtd::forms::form container.
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
dock_style
Specifies the position and manner in which a control is docked.
Definition dock_style.hpp:23
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Contains xtd::forms::text_box control.