xtd 1.0.0
Loading...
Searching...
No Matches
string_format.hpp
Go to the documentation of this file.
1
4#pragma once
9#include "string_trimming.hpp"
10#include <xtd/object>
11#include <cstdint>
12#include <ostream>
13
15namespace xtd {
17 namespace drawing {
31 public:
33
41 string_format() = default;
46
48
53 [[nodiscard]] auto alignment() const noexcept -> xtd::drawing::string_alignment;
58
61 [[nodiscard]] auto format_flags() const noexcept -> xtd::drawing::string_format_flags;
64 auto format_flags(xtd::drawing::string_format_flags format_flag) noexcept -> string_format&;
65
69 [[nodiscard]] auto hotkey_prefix() const noexcept -> xtd::drawing::text::hotkey_prefix;
74
78 [[nodiscard]] auto line_alignment() const noexcept -> xtd::drawing::string_alignment;
83
86 [[nodiscard]] auto trimming() const noexcept -> xtd::drawing::string_trimming;
91
93
105 [[nodiscard]] static auto generic_default() noexcept -> string_format;
106
117 [[nodiscard]] static auto generic_typographic() noexcept -> string_format;
119
120 private:
122 xtd::drawing::string_format_flags format_flags_ = static_cast<xtd::drawing::string_format_flags>(0);
123 xtd::drawing::text::hotkey_prefix hotkey_prefix_ = xtd::drawing::text::hotkey_prefix::none;
124 xtd::drawing::string_alignment line_alignment_ = xtd::drawing::string_alignment::near;
126 };
127 }
128}
auto line_alignment() const noexcept -> xtd::drawing::string_alignment
Gets vertical alignment of the string.
static auto generic_default() noexcept -> string_format
Gets a generic default string_format object.
auto format_flags() const noexcept -> xtd::drawing::string_format_flags
Gets a string_formatFlags enumeration that contains formatting information.
auto trimming() const noexcept -> xtd::drawing::string_trimming
Gets the string_trimming enumeration for this string_format object.
auto alignment() const noexcept -> xtd::drawing::string_alignment
Gets horizontal alignment of the string.
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.
static auto generic_typographic() noexcept -> string_format
Gets a generic typographic string_format object.
auto hotkey_prefix() const noexcept -> xtd::drawing::text::hotkey_prefix
Gets the HotkeyPrefix object for this string_format object.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Contains drawing_export_ keyword.
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
string_trimming
Specifies how to trim characters from a string that does not completely fit into a layout shape.
Definition string_trimming.hpp:17
string_format_flags
Specifies the display and layout information for text strings. This enumeration allows a bitwise comb...
Definition string_format_flags.hpp:17
string_alignment
Specifies the alignment of a text string relative to its layout rectangle.
Definition string_alignment.hpp:23
Contains xtd::drawing::text::hotkey_prefix enum class.
The xtd::drawing::text namespace provides advanced GDI+ typography functionality.
Definition font_collection.hpp:14
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::drawing::string_alignment enum class.
Contains xtd::drawing::string_format_flags enum class.
Contains xtd::drawing::string_trimming enum class.