mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-08 05:20:39 -06:00
* Build refactoring and initial plugin support * Possibly fixed linux / mac build * Added libdl to libglad build script * Add glfw to imgui dependencies * Refactored common functionality into "libimhex" for plugins * Added plugin loading and example plugin * Added proper API for creating a custom view and a custom tools entry with plugins
39 lines
897 B
C++
39 lines
897 B
C++
#pragma once
|
|
|
|
#include "lang/ast_node.hpp"
|
|
|
|
#include "views/view.hpp"
|
|
#include "lang/pattern_data.hpp"
|
|
|
|
#include "providers/provider.hpp"
|
|
|
|
#include <cstring>
|
|
#include <filesystem>
|
|
|
|
#include "ImGuiFileBrowser.h"
|
|
#include "TextEditor.h"
|
|
|
|
namespace hex {
|
|
|
|
class ViewPattern : public View {
|
|
public:
|
|
explicit ViewPattern(prv::Provider* &dataProvider, std::vector<lang::PatternData*> &patternData);
|
|
~ViewPattern() override;
|
|
|
|
void drawMenu() override;
|
|
void drawContent() override;
|
|
|
|
private:
|
|
std::vector<lang::PatternData*> &m_patternData;
|
|
prv::Provider* &m_dataProvider;
|
|
std::filesystem::path m_possiblePatternFile;
|
|
|
|
TextEditor m_textEditor;
|
|
imgui_addons::ImGuiFileBrowser m_fileBrowser;
|
|
|
|
void loadPatternFile(std::string path);
|
|
void clearPatternData();
|
|
void parsePattern(char *buffer);
|
|
};
|
|
|
|
} |