mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
impr: Move items from pattern editor console area to more appropriate places
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
struct VirtualFile {
|
||||
std::fs::path path;
|
||||
std::vector<u8> data;
|
||||
Region region;
|
||||
};
|
||||
|
||||
class ViewPatternData : public View::Window {
|
||||
public:
|
||||
ViewPatternData();
|
||||
@@ -26,6 +32,8 @@ namespace hex::plugin::builtin {
|
||||
PerProvider<std::map<u64, std::unique_ptr<ui::PatternDrawer>>> m_patternDrawer;
|
||||
Region m_hoveredPatternRegion = Region::Invalid();
|
||||
ui::PatternValueEditor m_patternValueEditor;
|
||||
PerProvider<std::vector<VirtualFile>> m_virtualFiles;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -68,12 +68,6 @@ namespace hex::plugin::builtin {
|
||||
void setPopupWindowHeight(u32 height) { m_popupWindowHeight = height; }
|
||||
u32 getPopupWindowHeight() const { return m_popupWindowHeight; }
|
||||
|
||||
struct VirtualFile {
|
||||
std::fs::path path;
|
||||
std::vector<u8> data;
|
||||
Region region;
|
||||
};
|
||||
|
||||
enum class DangerousFunctionPerms : u8 {
|
||||
Ask,
|
||||
Allow,
|
||||
@@ -165,13 +159,13 @@ namespace hex::plugin::builtin {
|
||||
PerProvider<std::map<std::string, pl::core::Token::Literal>> m_lastEvaluationOutVars;
|
||||
PerProvider<std::map<std::string, PatternVariable>> m_patternVariables;
|
||||
|
||||
PerProvider<std::vector<VirtualFile>> m_virtualFiles;
|
||||
|
||||
PerProvider<std::list<EnvVar>> m_envVarEntries;
|
||||
|
||||
PerProvider<TaskHolder> m_analysisTask;
|
||||
PerProvider<bool> m_shouldAnalyze;
|
||||
PerProvider<bool> m_breakpointHit;
|
||||
PerProvider<bool> m_debuggerActive;
|
||||
PerProvider<std::unique_ptr<ui::PatternDrawer>> m_debuggerDrawer;
|
||||
std::atomic<bool> m_resetDebuggerVariables;
|
||||
int m_debuggerScopeIndex = 0;
|
||||
@@ -207,11 +201,12 @@ namespace hex::plugin::builtin {
|
||||
TextHighlighter m_textHighlighter = TextHighlighter(this,&this->m_editorRuntime);
|
||||
private:
|
||||
void drawConsole(ImVec2 size);
|
||||
void drawEnvVars(ImVec2 size, std::list<EnvVar> &envVars);
|
||||
void drawVariableSettings(ImVec2 size, std::map<std::string, PatternVariable> &patternVariables);
|
||||
void drawVirtualFiles(ImVec2 size, const std::vector<VirtualFile> &virtualFiles) const;
|
||||
void drawDebugger(ImVec2 size);
|
||||
|
||||
void drawPatternSettings();
|
||||
void drawEnvVars(std::list<EnvVar> &envVars);
|
||||
void drawVariableSettings(std::map<std::string, PatternVariable> &patternVariables);
|
||||
|
||||
void drawPatternTooltip(pl::ptrn::Pattern *pattern);
|
||||
|
||||
void drawTextEditorFindReplacePopup(ui::TextEditor *textEditor);
|
||||
|
||||
Reference in New Issue
Block a user