1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

GTextEditor: Add selected_text() function.

I don't have a clipboard to actually put the copied selection onto yet,
so just print the selected text to stdout so we can see what it is.
This commit is contained in:
Andreas Kling 2019-03-08 01:59:59 +01:00
parent 77359a5360
commit 6576ac8332
3 changed files with 33 additions and 5 deletions

View file

@ -53,6 +53,9 @@ public:
bool write_to_file(const String& path);
bool has_selection() const { return m_selection_start.is_valid(); }
String selected_text() const;
private:
virtual void paint_event(GPaintEvent&) override;
virtual void resize_event(GResizeEvent&) override;