FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
business_logic::components::UIText Class Reference

The UI renderable text primitive. More...

#include <UIText.h>

+ Collaboration diagram for business_logic::components::UIText:

Public Types

enum class  Variant : std::uint8_t { Headline , MenuCaption , Choice , Caption }
 The visual display variant of the text. More...
 

Public Member Functions

 UIText (const std::string &text, const Variant &variant)
 Constructor.
 
virtual ~UIText ()=default
 
 UIText (const UIText &)=default
 
UITextoperator= (const UIText &)
 
 UIText (UIText &&) noexcept
 
UITextoperator= (UIText &&) noexcept
 
const std::string & getText () const
 Gets the text.
 
const VariantgetVariant () const
 Gets the visual display variant of the text.
 

Private Attributes

std::string text
 The text to display.
 
Variant variant
 The visual display variant of the text.
 

Detailed Description

The UI renderable text primitive.

Definition at line 14 of file UIText.h.

Member Enumeration Documentation

◆ Variant

enum class business_logic::components::UIText::Variant : std::uint8_t
strong

The visual display variant of the text.

Enumerator
Headline 
MenuCaption 
Choice 
Caption 

Definition at line 19 of file UIText.h.

Constructor & Destructor Documentation

◆ UIText() [1/3]

business_logic::components::UIText::UIText ( const std::string &  text,
const Variant variant 
)

Constructor.

Parameters
textThe text to display
variantThe visual display variant of the text

Definition at line 4 of file UIText.cpp.

◆ ~UIText()

virtual business_logic::components::UIText::~UIText ( )
virtualdefault

◆ UIText() [2/3]

business_logic::components::UIText::UIText ( const UIText )
default

◆ UIText() [3/3]

business_logic::components::UIText::UIText ( UIText &&  other)
noexcept

Definition at line 16 of file UIText.cpp.

Member Function Documentation

◆ getText()

const std::string & business_logic::components::UIText::getText ( ) const
inline

Gets the text.

Returns
The text

Definition at line 40 of file UIText.h.

References text.

◆ getVariant()

const Variant & business_logic::components::UIText::getVariant ( ) const
inline

Gets the visual display variant of the text.

Returns
The visual display variant of the text

Definition at line 46 of file UIText.h.

References variant.

◆ operator=() [1/2]

UIText & business_logic::components::UIText::operator= ( const UIText other)

Definition at line 7 of file UIText.cpp.

References text, and variant.

◆ operator=() [2/2]

UIText & business_logic::components::UIText::operator= ( UIText &&  other)
noexcept

Definition at line 18 of file UIText.cpp.

Member Data Documentation

◆ text

std::string business_logic::components::UIText::text
private

The text to display.

Definition at line 52 of file UIText.h.

Referenced by getText(), and operator=().

◆ variant

Variant business_logic::components::UIText::variant
private

The visual display variant of the text.

Definition at line 57 of file UIText.h.

Referenced by getVariant(), and operator=().


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