feat: Added virtual files to the pattern language

This commit is contained in:
WerWolv
2024-01-11 20:11:22 +01:00
parent 5f02320e8e
commit 72f4331703
13 changed files with 171 additions and 27 deletions

View File

@@ -285,6 +285,7 @@ namespace hex {
EVENT_DEF(RequestOpenFile, std::fs::path);
EVENT_DEF(RequestChangeTheme, std::string);
EVENT_DEF(RequestOpenPopup, std::string);
EVENT_DEF(RequestAddVirtualFile, std::fs::path, std::vector<u8>, Region);
/**
* @brief Creates a provider from it's unlocalized name, and add it to the provider list

View File

@@ -202,6 +202,14 @@ namespace hex {
*/
void setSelection(u64 address, size_t size, prv::Provider *provider = nullptr);
/**
* @brief Adds a virtual file to the list in the Hex Editor
* @param path The path of the file
* @param data The data of the file
* @param region The location of the file in the Hex Editor if available
*/
void addVirtualFile(const std::fs::path &path, std::vector<u8> data, Region region = Region::Invalid());
}
/* Functions to interact with Bookmarks */