libpromeki
1.0.0-alpha
PROfessional MEdia toolKIt
Loading...
Searching...
No Matches
textarea.h
Go to the documentation of this file.
1
8
#pragma once
9
10
#include <
promeki/namespace.h
>
11
#include <
promeki/string.h
>
12
#include <
promeki/stringlist.h
>
13
#include <
promeki/tui/widget.h
>
14
15
PROMEKI_NAMESPACE_BEGIN
16
24
class
TuiTextArea
:
public
TuiWidget
{
25
PROMEKI_OBJECT(
TuiTextArea
,
TuiWidget
)
26
public
:
27
TuiTextArea
(ObjectBase *parent =
nullptr
);
28
~TuiTextArea
()
override
;
29
30
void
setText(
const
String &text);
31
String text()
const
;
32
33
void
setReadOnly(
bool
readOnly) { _readOnly = readOnly; }
34
bool
isReadOnly()
const
{
return
_readOnly; }
35
36
void
appendLine(
const
String &line);
37
38
Size2Di32 sizeHint()
const override
;
39
40
PROMEKI_SIGNAL(textChanged)
41
42
protected
:
43
void
paintEvent(PaintEvent *e)
override
;
44
void
keyPressEvent(KeyEvent *e)
override
;
45
46
private
:
47
StringList _lines;
48
int
_cursorRow = 0;
49
int
_cursorCol = 0;
50
int
_scrollRow = 0;
51
int
_scrollCol = 0;
52
bool
_readOnly =
false
;
53
};
54
55
PROMEKI_NAMESPACE_END
promeki::TuiTextArea
Multi-line text editing/display widget.
Definition
textarea.h:24
promeki::TuiWidget
TUI-specific widget base class.
Definition
widget.h:33
namespace.h
string.h
stringlist.h
widget.h
include
promeki
tui
textarea.h
Generated on 2026-05-21 02:27:58 from commit ffbc5cc (1.0.0-alpha).