Scippy

SoPlex

Sequential object-oriented simPlex

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 internal::color_type get_foreground () const FMT_NOEXCEPT
 
FMT_CONSTEXPR internal::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, internal::color_type text_color) FMT_NOEXCEPT
 

Private Attributes

internal::color_type foreground_color
 
internal::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 (internal::color_type foreground) FMT_NOEXCEPT
 
FMT_CONSTEXPR_DECL text_style bg (internal::color_type background) FMT_NOEXCEPT
 

Detailed Description

Definition at line 227 of file color.h.

Constructor & Destructor Documentation

◆ text_style() [1/2]

Definition at line 229 of file color.h.

◆ text_style() [2/2]

FMT_CONSTEXPR text_style ( bool  is_foreground,
internal::color_type  text_color 
)
private

Definition at line 315 of file color.h.

References bg(), fg(), FMT_CONSTEXPR_DECL, and FMT_NOEXCEPT.

Member Function Documentation

◆ get_background()

FMT_CONSTEXPR internal::color_type get_background ( ) const

Definition at line 305 of file color.h.

References FMT_ASSERT.

Referenced by internal::vformat_to().

◆ get_emphasis()

FMT_CONSTEXPR emphasis get_emphasis ( ) const

Definition at line 309 of file color.h.

References FMT_ASSERT.

Referenced by internal::vformat_to().

◆ get_foreground()

FMT_CONSTEXPR internal::color_type get_foreground ( ) const

Definition at line 301 of file color.h.

References FMT_ASSERT.

Referenced by internal::vformat_to().

◆ has_background()

FMT_CONSTEXPR bool has_background ( ) const

Definition at line 295 of file color.h.

Referenced by internal::vformat_to().

◆ has_emphasis()

FMT_CONSTEXPR bool has_emphasis ( ) const

Definition at line 298 of file color.h.

Referenced by internal::vformat_to().

◆ has_foreground()

FMT_CONSTEXPR bool has_foreground ( ) const

Definition at line 292 of file color.h.

Referenced by internal::vformat_to().

◆ operator &=()

◆ operator|=()

Friends And Related Function Documentation

◆ bg

Definition at line 345 of file color.h.

◆ fg

Definition at line 341 of file color.h.

◆ operator &

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

Definition at line 287 of file color.h.

◆ operator|

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

Definition at line 258 of file color.h.

Member Data Documentation

◆ background_color

internal::color_type background_color
private

Definition at line 335 of file color.h.

Referenced by operator &=(), and operator|=().

◆ ems

emphasis ems
private

Definition at line 338 of file color.h.

Referenced by operator &=(), and operator|=().

◆ foreground_color

internal::color_type foreground_color
private

Definition at line 334 of file color.h.

Referenced by operator &=(), and operator|=().

◆ set_background_color

bool set_background_color
private

Definition at line 337 of file color.h.

Referenced by operator &=(), and operator|=().

◆ set_foreground_color

bool set_foreground_color
private

Definition at line 336 of file color.h.

Referenced by operator &=(), and operator|=().