xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
background_color.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
console.hpp
"
6
#include "
object.hpp
"
7
9
namespace
xtd
{
24
class
background_color
final :
public
object
{
25
public
:
27
35
explicit
background_color
(
console_color
color) : color(color) {}
37
39
[[nodiscard]]
friend
auto
operator <<(std::ostream& os,
const
background_color
& color) -> std::ostream& {
40
if
(!
console::is_output_redirected
() && os.rdbuf() ==
console::out
.rdbuf())
41
console::background_color
(color.color);
42
return
os;
43
}
45
46
private
:
47
console_color
color ;
48
};
49
}
xtd::background_color
Represent background color output manipulator class.
Definition
background_color.hpp:24
xtd::background_color::background_color
background_color(console_color color)
Sets the background color of the console.
Definition
background_color.hpp:35
xtd::console::out
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition
console.hpp:52
xtd::console::is_output_redirected
static auto is_output_redirected() -> bool
Gets a value that indicates whether the output stream has been redirected from the standard output st...
xtd::console::background_color
static auto background_color() -> console_color
Gets the background color of the console.
xtd::object::object
object()=default
Create a new instance of the ultimate base class object.
console.hpp
Contains xtd::console class.
xtd::console_color
console_color
Specifies constants that define foreground and background colors for the console.
Definition
console_color.hpp:20
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
object.hpp
Contains xtd::object class.
Generated on
for xtd by
Gammasoft
. All rights reserved.