Rosetta
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
text_style Class Reference

#include <color.h>

Public Member Functions

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

Private Member Functions

FMT_CONSTEXPR text_style (bool is_foreground, detail::color_type text_color) FMT_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 operator& (text_style lhs, const text_style &rhs)
 
FMT_CONSTEXPR_DECL text_style fg (detail::color_type foreground) FMT_NOEXCEPT
 
FMT_CONSTEXPR_DECL text_style bg (detail::color_type background) FMT_NOEXCEPT
 

Constructor & Destructor Documentation

◆ text_style() [1/2]

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

◆ text_style() [2/2]

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

Member Function Documentation

◆ get_background()

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

◆ get_emphasis()

FMT_CONSTEXPR emphasis text_style::get_emphasis ( ) const
inline

References ems, FMT_ASSERT, and has_emphasis().

Referenced by detail::vformat_to().

◆ get_foreground()

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

◆ has_background()

FMT_CONSTEXPR bool text_style::has_background ( ) const
inline

◆ has_emphasis()

FMT_CONSTEXPR bool text_style::has_emphasis ( ) const
inline

References ems.

Referenced by get_emphasis(), and detail::vformat_to().

◆ has_foreground()

FMT_CONSTEXPR bool text_style::has_foreground ( ) const
inline

◆ operator&=()

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

◆ operator|=()

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

Friends And Related Function Documentation

◆ bg

◆ fg

◆ operator&

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

◆ 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: