mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
Made tools registry more in-line with the other APIs
This commit is contained in:
@@ -110,9 +110,14 @@ namespace hex {
|
||||
struct Tools {
|
||||
Tools() = delete;
|
||||
|
||||
static void add(const std::function<void()> &function);
|
||||
struct Entry {
|
||||
std::string name;
|
||||
std::function<void()> function;
|
||||
};
|
||||
|
||||
static std::vector<std::function<void()>>& getEntries();
|
||||
static void add(std::string_view name, const std::function<void()> &function);
|
||||
|
||||
static std::vector<Entry>& getEntries();
|
||||
};
|
||||
|
||||
/* Data Inspector Registry. Allows adding of new types to the data inspector */
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace hex {
|
||||
static std::vector<ContentRegistry::CommandPaletteCommands::Entry> commandPaletteCommands;
|
||||
static std::map<std::string, ContentRegistry::PatternLanguageFunctions::Function> patternLanguageFunctions;
|
||||
static std::vector<View*> views;
|
||||
static std::vector<std::function<void()>> toolsEntries;
|
||||
static std::vector<ContentRegistry::Tools::Entry> toolsEntries;
|
||||
static std::vector<ContentRegistry::DataInspector::Entry> dataInspectorEntries;
|
||||
|
||||
static int mainArgc;
|
||||
|
||||
Reference in New Issue
Block a user