#pragma once #include #include #include #include #include #include #include #include #include #include namespace hex::plugin::builtin { class ViewPatternEditor : public View { public: ViewPatternEditor(); ~ViewPatternEditor() override; void drawMenu() override; void drawAlwaysVisible() override; void drawContent() override; private: pl::PatternLanguage *m_patternLanguageRuntime; std::vector m_possiblePatternFiles; u32 m_selectedPatternFile = 0; bool m_runAutomatically = false; bool m_evaluatorRunning = false; bool m_hasUnevaluatedChanges = false; bool m_acceptPatternWindowOpen = false; TextEditor m_textEditor; std::vector> m_console; enum class EnvVarType { Integer, Float, String, Bool }; struct EnvVar { std::string name; pl::Token::Literal value; EnvVarType type; }; std::vector m_envVarEntries; void loadPatternFile(const std::string &path); void clearPatternData(); void parsePattern(char *buffer); }; }