OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::StyledText Class Reference

The StyledText is used to manipulate the style when working with the StyledTextBuilder. More...

#include "StyledText.h"

Public Types

enum  ColorReference {
  Default , Highlight , LightHighlight , Comment ,
  Warning , Error
}
 Controls color style references. More...
 
enum  TextControl {
  ClearStyle , Bold , NotBold , Italic ,
  NotItalic , Underline , NotUnderline , LineTrough ,
  NotLineTrough , Header1 , Header2 , Header3 ,
  Text
}
 Controls text character formatting. More...
 

Static Public Member Functions

static std::string toString (ColorReference _colorReference)
 Creates a string representation of the provided ColorReference.
 
static ColorReference stringToColorReference (const std::string &_colorReference)
 Creates a ColorReference from the provided string.
 

Detailed Description

The StyledText is used to manipulate the style when working with the StyledTextBuilder.

Member Enumeration Documentation

◆ ColorReference

Controls color style references.

Enumerator
Default 
Highlight 

Default text color.

LightHighlight 

Current styled text highlight color.

Comment 

Current styled text light highlight color.

Warning 

Current styled text comment color.

Error 

Current styled text warning color.

Current styled text error color.

◆ TextControl

Controls text character formatting.

Enumerator
ClearStyle 

Resets all text style settings (use default style from now on). Will also reset the current ColorReference back to Default.

Bold 
NotBold 

Enable bold text.

Italic 

Disable bold text.

NotItalic 

Enable italic text.

Underline 

Disable italic text.

NotUnderline 

Enable underline text.

LineTrough 

Disable underline text.

NotLineTrough 

Enable line trough text.

Header1 

Disable line trough text.

Big header sized text (disable Text and other header setting).

Note
Note that the header text will be displayed on a separate line.
If the text is "<text><header><text>" the output will be:
<text>
<header>
<text>
Header2 

Medium header sized text (disable Text and other header setting).

Header3 

Small header sized text (disable Text and other header setting).

Text 

Member Function Documentation

◆ stringToColorReference()

ot::StyledText::ColorReference ot::StyledText::stringToColorReference ( const std::string & _colorReference)
static

Creates a ColorReference from the provided string.

◆ toString()

std::string ot::StyledText::toString ( ColorReference _colorReference)
static

Creates a string representation of the provided ColorReference.


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