terminalgui
0.1.0
Widgets for your terminal, powered by Qt! Create textual GUI (TUI) in your console easily.
|
3 #include <widgets/tgwidget.h>
10 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
11 Q_PROPERTY(
bool highlighted READ highlighted WRITE setHighlighted NOTIFY highlightedChanged)
16 Label(
const QString &text = QString(),
Widget *parent =
nullptr);
21 bool highlighted()
const;
24 void textChanged(
const QString &text)
const;
25 void highlightedChanged(
const bool highlighted)
const;
28 void setText(
const QString &text,
const bool expand =
false);
29 void setHighlighted(
const bool highlighted);
33 QString
drawPixel(
const QPoint &pixel)
const override;
35 int reservedCharactersCount()
const;
36 QString reservedText()
const;
37 void setReservedText(
const QString &reserved);
43 bool _highlighted =
false;
46 QString _reservedText;
47 QStringList _laidOutTextCache;
Screen is the "canvas" on which widgets (subclasses of Widget) are drawn.
Definition: tgscreen.h:31
QString drawPixel(const QPoint &pixel) const override
Returns ANSI-encoded string, used by Screen to draw the pixel.
Definition: tglabel.cpp:38
void init() override
Initializes Widget and it's connections.
Definition: tglabel.cpp:102
All Terminal GUI classes (both core and widgets) are defined within the Tg namespace.
Definition: tgcolor.h:6