/* * Copyright (c) 2022, Itamar S. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "Editor.h" #include #include #include #include namespace HackStudio { class Editor; class EditorWrapper; class FindWidget final : public GUI::Widget { C_OBJECT(FindWidget) public: ~FindWidget() = default; void show(); void hide(); bool visible() const { return m_visible; } private: FindWidget(NonnullRefPtr); void find_next(GUI::TextEditor::SearchDirection); static constexpr auto widget_height = 25; NonnullRefPtr m_editor; RefPtr m_input_field; RefPtr m_index_label; RefPtr m_next; RefPtr m_previous; bool m_visible { false }; }; }