1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

TextEditor: Implement replacement functionality

This patch adds a new replace widget that cooperates with the find
widget, the replace widget takes the input in the find textbox, searches
for occurences of that input, and replaces them with the input provied
in the replace textbox.
This commit is contained in:
0xtechnobabble 2020-01-11 20:52:47 +02:00 committed by Andreas Kling
parent 2b20e8e187
commit ecf58ddd4f
3 changed files with 131 additions and 13 deletions

View file

@ -36,17 +36,26 @@ private:
RefPtr<GAction> m_open_action;
RefPtr<GAction> m_save_action;
RefPtr<GAction> m_save_as_action;
RefPtr<GAction> m_find_action;
RefPtr<GAction> m_find_replace_action;
RefPtr<GAction> m_line_wrapping_setting_action;
RefPtr<GAction> m_find_next_action;
RefPtr<GAction> m_find_previous_action;
RefPtr<GAction> m_replace_next_action;
RefPtr<GAction> m_replace_previous_action;
RefPtr<GAction> m_replace_all_action;
RefPtr<GStatusBar> m_statusbar;
RefPtr<GTextBox> m_find_textbox;
RefPtr<GTextBox> m_replace_textbox;
GButton* m_find_previous_button { nullptr };
GButton* m_find_next_button { nullptr };
GButton* m_replace_previous_button { nullptr };
GButton* m_replace_next_button { nullptr };
GButton* m_replace_all_button { nullptr };
RefPtr<GWidget> m_find_replace_widget;
RefPtr<GWidget> m_find_widget;
RefPtr<GWidget> m_replace_widget;
bool m_document_dirty { false };
bool m_document_opening { false };