xtd 0.2.0
Loading...
Searching...
No Matches
string_format.h
Go to the documentation of this file.
1
4#pragma once
5#include "../drawing_export.h"
7#include "string_alignment.h"
9#include "string_trimming.h"
10#include <xtd/object>
11#include <cstdint>
12#include <ostream>
13
15namespace xtd {
17 namespace drawing {
31 public:
33
41 string_format() = default;
49
51
60 xtd::drawing::string_format& alignment(xtd::drawing::string_alignment alignment) noexcept;
61
64 xtd::drawing::string_format_flags format_flags() const noexcept;
67 xtd::drawing::string_format& format_flags(xtd::drawing::string_format_flags format_flag) noexcept;
68
72 xtd::drawing::text::hotkey_prefix hotkey_prefix() const noexcept;
76 xtd::drawing::string_format& hotkey_prefix(xtd::drawing::text::hotkey_prefix hotkey_prefix) noexcept;
77
81 xtd::drawing::string_alignment line_alignment() const noexcept;
85 xtd::drawing::string_format& line_alignment(xtd::drawing::string_alignment line_alignment) noexcept;
86
89 xtd::drawing::string_trimming trimming() const noexcept;
92 xtd::drawing::string_format& trimming(xtd::drawing::string_trimming trimming) noexcept;
94
96
108 static xtd::drawing::string_format generic_default() noexcept;
109
120 static xtd::drawing::string_format generic_typographic() noexcept;
122
123 private:
124 xtd::drawing::text::hotkey_prefix hotkey_prefix_ = xtd::drawing::text::hotkey_prefix::none;
125 xtd::drawing::string_format_flags format_flags_ = static_cast<xtd::drawing::string_format_flags>(0);
126 xtd::drawing::string_alignment alignment_ = xtd::drawing::string_alignment::near;
127 xtd::drawing::string_alignment line_alignment_ = xtd::drawing::string_alignment::near;
128 xtd::drawing::string_trimming trimming_ = xtd::drawing::string_trimming::none;
129 };
130 }
131}
Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulat...
Definition string_format.h:30
string_format()=default
Initializes a new string_format object.
string_format(xtd::drawing::string_format_flags options)
Initializes a new string_format object with the specified string_format_flags enumeration.
string_format(const xtd::drawing::string_format &format)=default
Initializes a new string_format object from the specified existing string_format object.
xtd::drawing::string_alignment alignment() const noexcept
Gets horizontal alignment of the string.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define drawing_export_
Define shared library export.
Definition drawing_export.h:13
string_trimming
Specifies how to trim characters from a string that does not completely fit into a layout shape.
Definition string_trimming.h:17
string_format_flags
Specifies the display and layout information for text strings. This enumeration allows a bitwise comb...
Definition string_format_flags.h:17
string_alignment
Specifies the alignment of a text string relative to its layout rectangle.
Definition string_alignment.h:23
Contains xtd::drawing::text::hotkey_prefix enum class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::drawing::string_alignment enum class.
Contains xtd::drawing::string_format_flags enum class.
Contains xtd::drawing::string_trimming enum class.