build: Refactor ContentRegistry into multiple separate files

This commit is contained in:
WerWolv
2025-08-14 21:22:03 +02:00
parent d920718b44
commit fbde2942de
141 changed files with 2337 additions and 2007 deletions

View File

@@ -1,6 +1,6 @@
#include <fonts/vscode_icons.hpp>
#include <hex/plugin.hpp>
#include <hex/api/content_registry.hpp>
#include <hex/api/content_registry/user_interface.hpp>
#include <hex/api/task_manager.hpp>
#include <hex/api/localization_manager.hpp>
@@ -86,7 +86,7 @@ std::vector<const Script*> loadAllScripts() {
void addScriptsMenu() {
static std::vector<const Script*> scripts;
static TaskHolder runnerTask, updaterTask;
hex::ContentRegistry::Interface::addMenuItemSubMenu({ "hex.builtin.menu.extras" }, 5000, [] {
hex::ContentRegistry::UserInterface::addMenuItemSubMenu({ "hex.builtin.menu.extras" }, 5000, [] {
static bool menuJustOpened = true;
if (menu::beginMenuEx("hex.script_loader.menu.run_script"_lang, ICON_VS_LIBRARY)) {

View File

@@ -1,5 +1,5 @@
#include <script_api.hpp>
#include <hex/api/content_registry.hpp>
#include <hex/api/content_registry/provider.hpp>
#include <hex/api/imhex_api/provider.hpp>
#include <hex/api/imhex_api/hex_editor.hpp>

View File

@@ -1,5 +1,6 @@
#include <script_api.hpp>
#include <hex/api/content_registry.hpp>
#include <hex/api/content_registry/views.hpp>
#include <hex/api/content_registry/user_interface.hpp>
#include <hex/api/imhex_api/system.hpp>
#include <hex/api/localization_manager.hpp>
@@ -182,5 +183,5 @@ SCRIPT_API(void registerView, const char *icon, const char *name, void *drawFunc
SCRIPT_API(void addMenuItem, const char *icon, const char *menuName, const char *itemName, void *function) {
using MenuFunction = void(*)();
ContentRegistry::Interface::addMenuItem({ menuName, itemName }, icon, 9999, Shortcut::None, reinterpret_cast<MenuFunction>(function));
ContentRegistry::UserInterface::addMenuItem({ menuName, itemName }, icon, 9999, Shortcut::None, reinterpret_cast<MenuFunction>(function));
}