mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
GTextEditor: More work on basic line editing. Insert/remove characters.
This commit is contained in:
parent
8425ea971a
commit
6094f592a9
2 changed files with 47 additions and 0 deletions
|
@ -60,6 +60,7 @@ private:
|
|||
virtual bool accepts_focus() const override { return true; }
|
||||
|
||||
class Line {
|
||||
friend class GTextEditor;
|
||||
public:
|
||||
Line();
|
||||
|
||||
|
@ -67,6 +68,10 @@ private:
|
|||
int length() const { return m_text.size() - 1; }
|
||||
int width(const Font&) const;
|
||||
void set_text(const String&);
|
||||
void append(char);
|
||||
void prepend(char);
|
||||
void insert(int index, char);
|
||||
void remove(int index);
|
||||
|
||||
private:
|
||||
// NOTE: This vector is null terminated.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue