16PROMEKI_NAMESPACE_BEGIN
46 void drawText(
int x,
int y,
const String &text);
53 void drawRect(
const Rect2Di32 &rect,
char32_t ch = 0);
56 void fillRect(
const Rect2Di32 &rect,
char32_t ch = U
' ');
59 void drawHLine(
int x,
int y,
int len,
char32_t ch = U
'\u2500');
62 void drawVLine(
int x,
int y,
int len,
char32_t ch = U
'\u2502');
71 void setAttrs(uint8_t attrs) { _style.setAttrs(attrs); }
83 uint8_t
attrs()
const {
return _style.attrs(); }
92 const Rect2Di32 &
clipRect()
const {
return _clipRect; }
99 void putCell(
int x,
int y,
char32_t ch);
Painting context for TUI widgets.
Definition painter.h:33
void drawRect(const Rect2Di32 &rect, char32_t ch=0)
Draws a rectangle outline using the given character.
void drawVLine(int x, int y, int len, char32_t ch=U'\u2502')
Draws a vertical line.
void drawHLine(int x, int y, int len, char32_t ch=U'\u2500')
Draws a horizontal line.
TuiPainter(TuiScreen &screen, const Rect2Di32 &clipRect)
Constructs a TuiPainter.
const Rect2Di32 & clipRect() const
Returns the current clipping rectangle.
Definition painter.h:92
uint8_t attrs() const
Returns the current attribute flags.
Definition painter.h:83
Color foreground() const
Returns the current foreground color.
Definition painter.h:77
const TuiStyle & style() const
Returns the current style.
Definition painter.h:86
void setClipRect(const Rect2Di32 &rect)
Sets the clipping rectangle.
Definition painter.h:89
void fillRect(const Rect2Di32 &rect, char32_t ch=U' ')
Fills a rectangle with the given character.
void drawText(int x, int y, const String &text)
Draws horizontal text at the given position.
void setAttrs(uint8_t attrs)
Sets the current attribute flags.
Definition painter.h:71
void setForeground(const Color &color)
Sets the current foreground color.
Definition painter.h:65
void setBackground(const Color &color)
Sets the current background color.
Definition painter.h:68
Color background() const
Returns the current background color.
Definition painter.h:80
void setStyle(const TuiStyle &style)
Sets all visual properties from a TuiStyle.
Definition painter.h:74
void drawChar(int x, int y, char32_t ch)
Draws a single character at the given position.
Double-buffered character cell grid for TUI rendering.
Definition screen.h:68
Visual properties of a TUI cell (everything except the character).
Definition style.h:35