Photon 1.0.0
Loading...
Searching...
No Matches
text_style Class Reference

#include <color.h>

Public Member Functions

FMT_CONSTEXPR text_style (emphasis em=emphasis()) noexcept
 
FMT_CONSTEXPR text_styleoperator|= (const text_style &rhs)
 
FMT_CONSTEXPR bool has_foreground () const noexcept
 
FMT_CONSTEXPR bool has_background () const noexcept
 
FMT_CONSTEXPR bool has_emphasis () const noexcept
 
FMT_CONSTEXPR detail::color_type get_foreground () const noexcept
 
FMT_CONSTEXPR detail::color_type get_background () const noexcept
 
FMT_CONSTEXPR emphasis get_emphasis () const noexcept
 

Private Member Functions

FMT_CONSTEXPR text_style (bool is_foreground, detail::color_type text_color) noexcept
 

Private Attributes

detail::color_type foreground_color
 
detail::color_type background_color
 
bool set_foreground_color
 
bool set_background_color
 
emphasis ems
 

Friends

FMT_CONSTEXPR text_style operator| (text_style lhs, const text_style &rhs)
 
FMT_CONSTEXPR text_style fg (detail::color_type foreground) noexcept
 
FMT_CONSTEXPR text_style bg (detail::color_type background) noexcept
 

Detailed Description

A text style consisting of foreground and background colors and emphasis.

Constructor & Destructor Documentation

◆ text_style() [1/2]

FMT_CONSTEXPR text_style::text_style ( emphasis  em = emphasis())
inlinenoexcept

◆ text_style() [2/2]

FMT_CONSTEXPR text_style::text_style ( bool  is_foreground,
detail::color_type  text_color 
)
inlineprivatenoexcept

Member Function Documentation

◆ get_background()

FMT_CONSTEXPR detail::color_type text_style::get_background ( ) const
inlinenoexcept

◆ get_emphasis()

FMT_CONSTEXPR emphasis text_style::get_emphasis ( ) const
inlinenoexcept

◆ get_foreground()

FMT_CONSTEXPR detail::color_type text_style::get_foreground ( ) const
inlinenoexcept

◆ has_background()

FMT_CONSTEXPR bool text_style::has_background ( ) const
inlinenoexcept

◆ has_emphasis()

FMT_CONSTEXPR bool text_style::has_emphasis ( ) const
inlinenoexcept

◆ has_foreground()

FMT_CONSTEXPR bool text_style::has_foreground ( ) const
inlinenoexcept

◆ operator|=()

FMT_CONSTEXPR text_style & text_style::operator|= ( const text_style rhs)
inline

Friends And Related Symbol Documentation

◆ bg

FMT_CONSTEXPR text_style bg ( detail::color_type  background)
friend

Creates a text style from the background color.

◆ fg

FMT_CONSTEXPR text_style fg ( detail::color_type  foreground)
friend

Creates a text style from the foreground (text) color.

◆ operator|

FMT_CONSTEXPR text_style operator| ( text_style  lhs,
const text_style rhs 
)
friend

Member Data Documentation

◆ background_color

detail::color_type text_style::background_color
private

◆ ems

emphasis text_style::ems
private

◆ foreground_color

detail::color_type text_style::foreground_color
private

◆ set_background_color

bool text_style::set_background_color
private

◆ set_foreground_color

bool text_style::set_foreground_color
private

The documentation for this class was generated from the following file: