terminalgui  0.1.0
Widgets for your terminal, powered by Qt! Create textual GUI (TUI) in your console easily.
tgstyle.h
1 #pragma once
2 
3 #include <tgcolor.h>
4 #include <tgkey.h>
5 
6 #include "tgborderstyle.h"
7 
8 #include <QChar>
9 #include <QString>
10 
11 namespace Tg {
17 class Style
18 {
19 public:
24 
29  void setBorderStyleValues(const BorderStyle &borderStyle);
30 
37 
42 
47 
52 
57 
62 
67 
72 
77 
82 
87 
92 
97 
98  // CheckBox
99  // TODO: add these as properties to Tg:Checkbox!
100  QString checkBoxChecked = u8"\u2612 ";
101  QString checkBoxPartiallyChecked = u8"\u25A3 ";
102  QString checkBoxUnChecked = u8"\u2610 ";
103 
104  // RadioButton
105  // TODO: add these as properties to Tg:RadioButton!
106  QString radioButtonChecked = u8"\u25C9 ";
107  QString radioButtonUnChecked = u8"\u25CE ";
108 
109  // ScrollBar
110  // https://decodeunicode.org/en/u+025C8
111  QString sliderCharacter = u8"\u25C8";
113  Tg::Color sliderActiveColor = Tg::Color::Predefined::Green;
114  Tg::Color sliderInactiveColor = Tg::Color::Predefined::Gray;
115  Tg::Color sliderBackgroundColor = Tg::Color::Predefined::Black;
116  Tg::Color sliderActiveBackgroundColor = Tg::Color::Predefined::Gray;
117  Tg::Color sliderInactiveBackgroundColor = Tg::Color::Predefined::Black;
118 
119  QString backwardArrowUpCharacter = u8"\u25B2";
120  QString backwardArrowLeftCharacter = u8"\u25C0";
121  Tg::Color backwardArrowColor = Tg::Color::Predefined::Green;
122  Tg::Color backwardArrowActiveColor = Tg::Color::Predefined::Black;
123  Tg::Color backwardArrowInactiveColor = Tg::Color::Predefined::White;
124  Tg::Color backwardArrowBackgroundColor = Tg::Color::Predefined::Black;
125  Tg::Color backwardArrowActiveBackgroundColor = Tg::Color::Predefined::Green;
126  Tg::Color backwardArrowInactiveBackgroundColor = Tg::Color::Predefined::Gray;
127 
128  QString forwardArrowDownCharacter = u8"\u25BC";
129  QString forwardArrowRightCharacter = u8"\u25B6";
130  Tg::Color forwardArrowColor = backwardArrowColor;
131  Tg::Color forwardArrowActiveColor = backwardArrowActiveColor;
132  Tg::Color forwardArrowInactiveColor = backwardArrowInactiveColor;
133  Tg::Color forwardArrowBackgroundColor = backwardArrowBackgroundColor;
134  Tg::Color forwardArrowActiveBackgroundColor = backwardArrowActiveBackgroundColor;
135  Tg::Color forwardArrowInactiveBackgroundColor = backwardArrowInactiveBackgroundColor;
136 
137  // ListView
138  Tg::Color currentIndexColor = Tg::Color::Predefined::Cyan;
139 };
140 }
Tg::Style::backgroundColor
Tg::Color backgroundColor
See Widget::backgroundColor.
Definition: tgstyle.h:46
Tg::Style::pressedTextColor
Tg::Color pressedTextColor
See Button::pressedTextColor.
Definition: tgstyle.h:91
Tg::Style::alternativeBackgroundColor
Tg::Color alternativeBackgroundColor
See ListView::alternativeBackgroundColor.
Definition: tgstyle.h:51
Tg::Style::backgroundCharacter
QChar backgroundCharacter
See Widget::backgroundCharacter.
Definition: tgstyle.h:56
Tg::Style::inactiveBackgroundColor
Tg::Color inactiveBackgroundColor
See Button::inactiveBackgroundColor.
Definition: tgstyle.h:86
Tg::Color::Predefined::Black
@ Black
Default black color, depends on terminal settings.
Tg::Style
Defines how Widget (and all it's subclasses) draw their contents.
Definition: tgstyle.h:18
Tg::Color::Predefined::LightWhite
@ LightWhite
Tg::Style::pressedBackgroundColor
Tg::Color pressedBackgroundColor
See Button::pressedBackgroundColor.
Definition: tgstyle.h:96
Tg::Style::border
BorderStyle * border
Style object used to draw Widget borders.
Definition: tgstyle.h:23
Tg::Style::inactiveTextColor
Tg::Color inactiveTextColor
See Button::inactiveTextColor.
Definition: tgstyle.h:81
Tg
All Terminal GUI classes (both core and widgets) are defined within the Tg namespace.
Definition: tgcolor.h:6
Tg::Color::Predefined::White
@ White
Default white color, depends on terminal settings.
Tg::Style::setBorderStyleValues
void setBorderStyleValues(const BorderStyle &borderStyle)
Copies all information from borderStyle into border object held by this Style object.
Definition: tgstyle.cpp:4
Tg::Style::activeBackgroundColor
Tg::Color activeBackgroundColor
See Button::activeBackgroundColor.
Definition: tgstyle.h:76
Tg::Color
Represents colors in a terminal.
Definition: tgcolor.h:20
Tg::Style::placeholderTextColor
Tg::Color placeholderTextColor
See LineEdit::placeholderTextColor.
Definition: tgstyle.h:61
Tg::Style::activeTextColor
Tg::Color activeTextColor
See Button::activeTextColor.
Definition: tgstyle.h:71
Tg::Color::Predefined::Yellow
@ Yellow
Default yellow color, depends on terminal settings.
Tg::Style::screenBackground
QChar screenBackground
Character drawn in empty space on a Screen.
Definition: tgstyle.h:36
Tg::Color::Predefined::Cyan
@ Cyan
Default cyan color, depends on terminal settings.
Tg::Color::Predefined::Gray
@ Gray
Default gray color, depends on terminal settings.
Tg::BorderStyle
Defines colors, characters with which Widget draws it's borders.
Definition: tgborderstyle.h:15
Tg::Key::space
const QChar space
Space key.
Definition: tgkey.h:62
Tg::Style::textColor
Tg::Color textColor
See Widget::textColor.
Definition: tgstyle.h:41
Tg::Color::Predefined::Green
@ Green
Default green color, depends on terminal settings.
Tg::Style::placeholderBackgroundColor
Tg::Color placeholderBackgroundColor
See LineEdit::placeholderBackgroundColor.
Definition: tgstyle.h:66