mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
HackStudio: Add FindWidget
The find widget appears on Ctrl+F. It uses the GUI::TextEditor search API to search for text, which also takes care of highlighting the search results.
This commit is contained in:
parent
de902ab659
commit
d9d299f884
8 changed files with 186 additions and 4 deletions
|
@ -8,6 +8,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Debugger/BreakpointCallback.h"
|
||||
#include "FindWidget.h"
|
||||
#include "Git/GitRepo.h"
|
||||
#include "LanguageClient.h"
|
||||
#include <AK/Function.h>
|
||||
|
@ -52,6 +53,9 @@ public:
|
|||
Function<void()> on_change;
|
||||
Function<void(EditorWrapper&)> on_tab_close_request;
|
||||
|
||||
void search_action();
|
||||
FindWidget const& find_widget() const { return *m_find_widget; }
|
||||
|
||||
private:
|
||||
static constexpr auto untitled_label = "(Untitled)";
|
||||
|
||||
|
@ -62,6 +66,7 @@ private:
|
|||
String m_filename;
|
||||
String m_filename_title;
|
||||
RefPtr<Editor> m_editor;
|
||||
RefPtr<FindWidget> m_find_widget;
|
||||
|
||||
Optional<String> m_project_root;
|
||||
RefPtr<GitRepo> m_git_repo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue