OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
StyledText.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// std header
9#include <string>
10
11#pragma warning(disable:4251)
12
13namespace ot {
14
16 class StyledText {
17 public:
27
57
59 static std::string toString(ColorReference _colorReference);
60
62 static ColorReference stringToColorReference(const std::string& _colorReference);
63
64 private:
65 StyledText() = delete;
66 StyledText(const StyledText&) = delete;
67 StyledText& operator = (const StyledText&) = delete;
68 };
69
70}
The StyledText is used to manipulate the style when working with the StyledTextBuilder.
Definition StyledText.h:16
ColorReference
Controls color style references.
Definition StyledText.h:19
@ Warning
Current styled text comment color.
Definition StyledText.h:24
@ Comment
Current styled text light highlight color.
Definition StyledText.h:23
@ Error
Current styled text warning color.
Definition StyledText.h:25
@ Default
Definition StyledText.h:20
@ Highlight
Default text color.
Definition StyledText.h:21
@ LightHighlight
Current styled text highlight color.
Definition StyledText.h:22
static ColorReference stringToColorReference(const std::string &_colorReference)
Creates a ColorReference from the provided string.
Definition StyledText.cpp:24
static std::string toString(ColorReference _colorReference)
Creates a string representation of the provided ColorReference.
Definition StyledText.cpp:10
TextControl
Controls text character formatting.
Definition StyledText.h:29
@ NotLineTrough
Enable line trough text.
Definition StyledText.h:40
@ NotUnderline
Enable underline text.
Definition StyledText.h:38
@ NotBold
Enable bold text.
Definition StyledText.h:34
@ Header2
Medium header sized text (disable Text and other header setting).
Definition StyledText.h:51
@ LineTrough
Disable underline text.
Definition StyledText.h:39
@ Header3
Small header sized text (disable Text and other header setting).
Definition StyledText.h:54
@ NotItalic
Enable italic text.
Definition StyledText.h:36
@ Italic
Disable bold text.
Definition StyledText.h:35
@ ClearStyle
Resets all text style settings (use default style from now on). Will also reset the current ColorRefe...
Definition StyledText.h:32
@ Text
Definition StyledText.h:55
@ Bold
Definition StyledText.h:33
@ Underline
Disable italic text.
Definition StyledText.h:37
@ Header1
Disable line trough text.
Definition StyledText.h:48
Definition Connector.h:8