#pragma once #include #include "imgui.h" #include "views/view.hpp" #include "lang/pattern_data.hpp" #include #include #include namespace hex { namespace prv { class Provider; } class ViewCommandPalette : public View { public: ViewCommandPalette(); ~ViewCommandPalette() override; void drawContent() override; void drawMenu() override; bool handleShortcut(int key, int mods) override; bool hasViewMenuItemEntry() override { return false; } ImVec2 getMinSize() override { return ImVec2(400, 100); } ImVec2 getMaxSize() override { return ImVec2(400, 100); } private: bool m_justOpened = false; std::vector m_commandBuffer; std::vector m_lastResults; std::string m_exactResult; std::vector getCommandResults(std::string_view command); }; }