xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Toggle main menu visibility
Home
Categories
Documentation
Namespaces
Classes
Class List
Class Index
Class Hierarchy
Files
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
Loading...
Searching...
No Matches
xtd.forms
include
xtd
forms
text_format_flags.h
Go to the documentation of this file.
1
4
#pragma once
5
#include <
xtd/ustring.h
>
6
8
namespace
xtd
{
10
namespace
forms
{
18
enum class
text_format_flags
{
20
default_format
= 0b0,
22
glyph_overhang_padding
= 0b0,
24
left
= 0b0,
26
top
= 0b0,
28
horizontal_center
= 0b1,
30
right
= 0b10,
32
vertical_center
= 0b100,
34
bottom
= 0b1000,
36
word_break
= 0b10000,
38
single_line
= 0b100000,
40
expand_tabs
= 0b1000000,
42
no_clipping
= 0b100000000,
44
external_leading
= 0b1000000000,
46
no_prefix
= 0b10000000000,
48
internal
= 0b1000000000000,
50
text_box_control
= 0b10000000000000,
52
path_ellipsis
= 0b100000000000000,
54
end_ellipse
= 0b1000000000000000,
56
modify_string
= 0b10000000000000000,
58
right_to_left
= 0b100000000000000000,
60
word_ellipsis
= 0b1000000000000000000,
62
no_full_width_characterB_break
= 0b10000000000000000000,
64
hide_prefix
= 0b100000000000000000000,
66
prefix_only
= 0b1000000000000000000000,
68
preserve_graphics_clipping
= 0b1000000000000000000000000,
70
preserve_graphics_translate_transform
= 0b10000000000000000000000000,
72
no_padding
= 0b10000000000000000000000000000,
74
left_and_right_padding
= 0b100000000000000000000000000000,
75
};
76
78
inline
text_format_flags
& operator +=(
text_format_flags
& lhs,
text_format_flags
rhs) {lhs =
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) +
static_cast<
long
long
>
(rhs));
return
lhs;}
79
inline
text_format_flags
& operator -=(
text_format_flags
& lhs,
text_format_flags
rhs) {lhs =
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) -
static_cast<
long
long
>
(rhs));
return
lhs;}
80
inline
text_format_flags
& operator &=(
text_format_flags
& lhs,
text_format_flags
rhs) {lhs =
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) &
static_cast<
long
long
>
(rhs));
return
lhs;}
81
inline
text_format_flags
& operator |=(
text_format_flags
& lhs,
text_format_flags
rhs) {lhs =
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) |
static_cast<
long
long
>
(rhs));
return
lhs;}
82
inline
text_format_flags
& operator ^=(
text_format_flags
& lhs,
text_format_flags
rhs) {lhs =
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) ^
static_cast<
long
long
>
(rhs));
return
lhs;}
83
inline
text_format_flags
operator +(
text_format_flags
lhs,
text_format_flags
rhs) {
return
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) +
static_cast<
long
long
>
(rhs));}
84
inline
text_format_flags
operator -(
text_format_flags
lhs,
text_format_flags
rhs) {
return
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) -
static_cast<
long
long
>
(rhs));}
85
inline
text_format_flags
operator ~(
text_format_flags
rhs) {
return
static_cast<
text_format_flags
>
(~static_cast<long long>(rhs));}
86
inline
text_format_flags
operator &(
text_format_flags
lhs,
text_format_flags
rhs) {
return
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) &
static_cast<
long
long
>
(rhs));}
87
inline
text_format_flags
operator |(
text_format_flags
lhs,
text_format_flags
rhs) {
return
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) |
static_cast<
long
long
>
(rhs));}
88
inline
text_format_flags
operator ^(
text_format_flags
lhs,
text_format_flags
rhs) {
return
static_cast<
text_format_flags
>
(
static_cast<
long
long
>
(lhs) ^
static_cast<
long
long
>
(rhs));}
89
inline
std::ostream& operator<<(std::ostream& os,
text_format_flags
value) {
return
os <<
to_string
(value, {{
text_format_flags::default_format
,
"default_format"
}});}
90
inline
std::wostream& operator<<(std::wostream& os,
text_format_flags
value) {
return
os <<
to_string
(value, {{
text_format_flags::default_format
, L
"default_format"
}});}
92
}
93
}
xtd::to_string
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition:
to_string.h:37
xtd::forms::text_format_flags
text_format_flags
Specifies the display and layout information for text strings.
Definition:
text_format_flags.h:18
xtd::forms::text_format_flags::modify_string
@ modify_string
Has no effect on the drawn text or text measurements. When used to draw text by TextRenderer,...
xtd::forms::text_format_flags::vertical_center
@ vertical_center
Centers the text vertically, within the bounding rectangle.
xtd::forms::text_format_flags::expand_tabs
@ expand_tabs
Expands tab characters. The default number of characters per tab is eight. The word_ellipsis,...
xtd::forms::text_format_flags::default_format
@ default_format
Applies the default formatting, which is left-aligned.
xtd::forms::text_format_flags::preserve_graphics_translate_transform
@ preserve_graphics_translate_transform
Preserves the transformation specified by a graphics. Applies only to methods receiving an ideviceCon...
xtd::forms::text_format_flags::no_prefix
@ no_prefix
Turns off processing of prefix characters. Typically, the ampersand (&) mnemonic-prefix character is ...
xtd::forms::text_format_flags::right_to_left
@ right_to_left
Displays the text from right to left.
xtd::forms::text_format_flags::word_break
@ word_break
Breaks the text at the end of a word.
xtd::forms::text_format_flags::external_leading
@ external_leading
Includes the font external leading in line height. Typically, external leading is not included in the...
xtd::forms::text_format_flags::preserve_graphics_clipping
@ preserve_graphics_clipping
Preserves the clipping specified by a graphics object. Applies only to methods receiving an idevice_c...
xtd::forms::text_format_flags::word_ellipsis
@ word_ellipsis
Trims the line to the nearest word and an ellipsis is placed at the end of a trimmed line....
xtd::forms::text_format_flags::glyph_overhang_padding
@ glyph_overhang_padding
Adds padding to the bounding rectangle to accommodate overhanging glyphs. This is the default.
xtd::forms::text_format_flags::end_ellipse
@ end_ellipse
Removes the end of trimmed lines, and replaces them with an ellipsis. When used to draw text by text_...
xtd::forms::text_format_flags::hide_prefix
@ hide_prefix
Ignores the ampersand (&) prefix character in the text, so that the letter that follows won't be unde...
xtd::forms::text_format_flags::path_ellipsis
@ path_ellipsis
Removes the center of trimmed lines and replaces it with an ellipsis. When used to draw text by text_...
xtd::forms::text_format_flags::text_box_control
@ text_box_control
Specifies the text should be formatted for display on a TextBox control.
xtd::forms::text_format_flags::left_and_right_padding
@ left_and_right_padding
Adds padding to both sides of the bounding rectangle.
xtd::forms::text_format_flags::single_line
@ single_line
Displays the text in a single line.
xtd::forms::text_format_flags::internal
@ internal
Uses the system font to calculate text metrics.
xtd::forms::text_format_flags::no_clipping
@ no_clipping
Allows the overhanging parts of glyphs and unwrapped text reaching outside the formatting rectangle t...
xtd::forms::text_format_flags::no_padding
@ no_padding
Does not add padding to the bounding rectangle.
xtd::forms::text_format_flags::horizontal_center
@ horizontal_center
Centers the text horizontally within the bounding rectangle.
xtd::forms::text_format_flags::no_full_width_characterB_break
@ no_full_width_characterB_break
A legacy value that has no effect. It prevents a line break at a double-wide character string,...
xtd::forms::text_format_flags::prefix_only
@ prefix_only
Draws only an underline at the position of the character following the ampersand (&) prefix character...
xtd::forms::anchor_styles::bottom
@ bottom
The parent form of this multiple document interface (MDI) form is closing.
xtd::forms::anchor_styles::right
@ right
The Microsoft Windows Task Manager is closing the application.
xtd::forms::anchor_styles::left
@ left
The user is closing the form through the user interface (UI), for example by clicking the Close butto...
xtd::forms::anchor_styles::top
@ top
The operating system is closing all applications before shutting down.
xtd::forms
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition:
about_box.h:13
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition:
system_report.h:17
ustring.h
Contains xtd::ustring class.
Generated on Sat Jan 28 2023 18:12:26 for xtd - Reference Guide by
Gammasoft
. All rights reserved.