mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:07:34 +00:00
LibGUI: Add optional placeholder to TextEditor
This lets you show some disabled text when no text is entered, and the editor is not focused.
This commit is contained in:
parent
5b6ccbb918
commit
fa96e57c15
4 changed files with 19 additions and 1 deletions
|
@ -139,6 +139,8 @@ public:
|
|||
|
||||
virtual bool is_code_document() const { return false; }
|
||||
|
||||
bool is_empty() const;
|
||||
|
||||
protected:
|
||||
explicit TextDocument(Client* client);
|
||||
|
||||
|
@ -179,6 +181,7 @@ public:
|
|||
size_t first_non_whitespace_column() const;
|
||||
Optional<size_t> last_non_whitespace_column() const;
|
||||
bool ends_in_whitespace() const;
|
||||
bool is_empty() const { return length() == 0; }
|
||||
|
||||
private:
|
||||
// NOTE: This vector is null terminated.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue