mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:28:11 +00:00
LibWeb: Implement basic text copying :^)
You can now press Ctrl+C to copy the selected text in a Web::PageView to the system clipboard. Very cool!
This commit is contained in:
parent
da66d99566
commit
f87881e198
2 changed files with 54 additions and 0 deletions
|
@ -73,6 +73,9 @@ public:
|
|||
|
||||
virtual bool accepts_focus() const override { return true; }
|
||||
|
||||
GUI::Action& copy_action() { return *m_copy_action; }
|
||||
String selected_text() const;
|
||||
|
||||
private:
|
||||
PageView();
|
||||
|
||||
|
@ -114,6 +117,8 @@ private:
|
|||
bool m_should_show_line_box_borders { false };
|
||||
|
||||
NonnullOwnPtr<Page> m_page;
|
||||
|
||||
RefPtr<GUI::Action> m_copy_action;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue