Locator.h 615 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/HashMap.h>
  8. #include <LibGUI/Widget.h>
  9. namespace HackStudio {
  10. class Locator final : public GUI::Widget {
  11. C_OBJECT(Locator)
  12. public:
  13. virtual ~Locator() override;
  14. void open();
  15. void close();
  16. private:
  17. void update_suggestions();
  18. void open_suggestion(const GUI::ModelIndex&);
  19. Locator(Core::Object* parent = nullptr);
  20. RefPtr<GUI::TextBox> m_textbox;
  21. RefPtr<GUI::Window> m_popup_window;
  22. RefPtr<GUI::TableView> m_suggestion_view;
  23. };
  24. }