mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:17:44 +00:00
HexEditor: Add 'Find All' option to Find Dialog to find all matches
This commit is contained in:
parent
d7797c8bf8
commit
6aa766f8ca
9 changed files with 238 additions and 30 deletions
|
@ -20,21 +20,24 @@ class FindDialog : public GUI::Dialog {
|
|||
C_OBJECT(FindDialog);
|
||||
|
||||
public:
|
||||
static int show(GUI::Window* parent_window, String& out_tex, ByteBuffer& out_buffer);
|
||||
static int show(GUI::Window* parent_window, String& out_tex, ByteBuffer& out_buffer, bool& find_all);
|
||||
|
||||
private:
|
||||
Result<ByteBuffer, String> process_input(String text_value, OptionId opt);
|
||||
|
||||
String text_value() const { return m_text_value; }
|
||||
OptionId selected_option() const { return m_selected_option; }
|
||||
bool find_all() const { return m_find_all; }
|
||||
|
||||
FindDialog();
|
||||
virtual ~FindDialog() override;
|
||||
|
||||
RefPtr<GUI::TextEditor> m_text_editor;
|
||||
RefPtr<GUI::Button> m_ok_button;
|
||||
RefPtr<GUI::Button> m_find_button;
|
||||
RefPtr<GUI::Button> m_find_all_button;
|
||||
RefPtr<GUI::Button> m_cancel_button;
|
||||
|
||||
bool m_find_all { false };
|
||||
String m_text_value;
|
||||
OptionId m_selected_option { OPTION_INVALID };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue