xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
font_style.h
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/ustring.h>
6
8namespace xtd {
10 namespace drawing {
17 enum class font_style {
19 regular = 0,
21 bold = 0b1,
23 italic = 0b10,
25 underline = 0b100,
27 strikeout = 0b1000
28 };
29
31 inline font_style& operator +=(font_style& lhs, font_style rhs) {lhs = static_cast<font_style>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs;}
32 inline font_style& operator -=(font_style& lhs, font_style rhs) {lhs = static_cast<font_style>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs;}
33 inline font_style& operator &=(font_style& lhs, font_style rhs) {lhs = static_cast<font_style>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs;}
34 inline font_style& operator |=(font_style& lhs, font_style rhs) {lhs = static_cast<font_style>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs;}
35 inline font_style& operator ^=(font_style& lhs, font_style rhs) {lhs = static_cast<font_style>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs;}
36 inline font_style operator +(font_style lhs, font_style rhs) {return static_cast<font_style>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
37 inline font_style operator -(font_style lhs, font_style rhs) {return static_cast<font_style>(static_cast<long long>(lhs) - static_cast<long long>(rhs));}
38 inline font_style operator ~(font_style rhs) {return static_cast<font_style>(~static_cast<long long>(rhs));}
39 inline font_style operator &(font_style lhs, font_style rhs) {return static_cast<font_style>(static_cast<long long>(lhs) & static_cast<long long>(rhs));}
40 inline font_style operator |(font_style lhs, font_style rhs) {return static_cast<font_style>(static_cast<long long>(lhs) | static_cast<long long>(rhs));}
41 inline font_style operator ^(font_style lhs, font_style rhs) {return static_cast<font_style>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs));}
42 inline std::ostream& operator<<(std::ostream& os, font_style value) {return os << xtd::to_string(value, {{font_style::regular, "regular"}, {font_style::bold, "bold"}, {font_style::italic, "italic"}, {font_style::underline, "underline"}, {font_style::strikeout, "strikeout"}});}
43 inline std::wostream& operator<<(std::wostream& os, font_style value) {return os << xtd::to_string(value, {{font_style::regular, L"regular"}, {font_style::bold, L"bold"}, {font_style::italic, L"italic"}, {font_style::underline, L"underline"}, {font_style::strikeout, L"strikeout"}});}
45 }
46}
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
font_style
Specifies style information applied to text. This enumeration has a flags attribute that allows a bit...
Definition font_style.h:17
@ underline
Underline text.
@ strikeout
Text with a line through the middle.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17
Contains xtd::ustring class.