From 4a53717676d1ed6c6e13efc1c24963a004883b00 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 7 Dec 2021 22:47:41 +0100 Subject: [PATCH] sys: Moved all views to builtin plugin --- CMakeLists.txt | 26 - .../ImGui/include/imgui_imhex_extensions.h | 2 + .../ImGui/source/imgui_imhex_extensions.cpp | 7 + plugins/builtin/CMakeLists.txt | 27 ++ .../content}/providers/file_provider.hpp | 12 +- .../include/content}/views/view_bookmarks.hpp | 2 +- .../content}/views/view_command_palette.hpp | 2 +- .../include/content}/views/view_constants.hpp | 2 +- .../content}/views/view_data_inspector.hpp | 2 +- .../content}/views/view_data_processor.hpp | 4 +- .../include/content}/views/view_diff.hpp | 2 +- .../content}/views/view_disassembler.hpp | 4 +- .../include/content}/views/view_hashes.hpp | 2 +- .../include/content}/views/view_help.hpp | 2 +- .../include/content}/views/view_hexeditor.hpp | 8 +- .../content}/views/view_information.hpp | 2 +- .../include/content}/views/view_patches.hpp | 2 +- .../content}/views/view_pattern_data.hpp | 5 + .../content}/views/view_pattern_editor.hpp | 2 +- .../include/content}/views/view_settings.hpp | 2 +- .../include/content}/views/view_store.hpp | 2 +- .../include/content}/views/view_strings.hpp | 2 +- .../include/content}/views/view_tools.hpp | 2 +- .../include/content}/views/view_yara.hpp | 2 +- .../content}/providers/file_provider.cpp | 15 +- .../builtin/source/content/tools_entries.cpp | 25 +- plugins/builtin/source/content/ui_items.cpp | 2 +- plugins/builtin/source/content/views.cpp | 47 ++ .../source/content}/views/view_bookmarks.cpp | 28 +- .../content}/views/view_command_palette.cpp | 10 +- .../source/content}/views/view_constants.cpp | 16 +- .../content}/views/view_data_inspector.cpp | 14 +- .../content}/views/view_data_processor.cpp | 16 +- .../source/content}/views/view_diff.cpp | 8 +- .../content}/views/view_disassembler.cpp | 62 +-- .../source/content}/views/view_hashes.cpp | 48 +- .../source/content}/views/view_help.cpp | 34 +- .../source/content}/views/view_hexeditor.cpp | 214 +++++---- .../content}/views/view_information.cpp | 38 +- .../source/content}/views/view_patches.cpp | 18 +- .../content}/views/view_pattern_data.cpp | 20 +- .../content}/views/view_pattern_editor.cpp | 32 +- .../source/content}/views/view_settings.cpp | 14 +- .../source/content}/views/view_store.cpp | 38 +- .../source/content}/views/view_strings.cpp | 38 +- .../source/content}/views/view_tools.cpp | 8 +- .../source/content}/views/view_yara.cpp | 32 +- plugins/builtin/source/lang/de_DE.cpp | 450 ++++++++--------- plugins/builtin/source/lang/en_US.cpp | 453 +++++++++--------- plugins/builtin/source/lang/it_IT.cpp | 446 ++++++++--------- plugins/builtin/source/lang/zh_CN.cpp | 446 ++++++++--------- plugins/builtin/source/plugin_builtin.cpp | 4 + plugins/libimhex/CMakeLists.txt | 5 + .../include/hex/api/content_registry.hpp | 28 +- plugins/libimhex/include/hex/api/event.hpp | 1 + .../include/hex}/helpers/disassembler.hpp | 0 .../include/hex}/helpers/encoding_file.hpp | 0 .../hex}/helpers/loader_script_handler.hpp | 0 .../libimhex/include/hex}/helpers/patches.hpp | 0 .../hex}/helpers/project_file_handler.hpp | 0 .../include/hex/helpers/shared_data.hpp | 2 + .../libimhex/source/api/content_registry.cpp | 11 + .../source}/helpers/encoding_file.cpp | 2 +- .../source}/helpers/loader_script_handler.cpp | 2 +- .../libimhex/source}/helpers/patches.cpp | 2 +- .../source}/helpers/project_file_handler.cpp | 2 +- .../libimhex/source/helpers/shared_data.cpp | 2 + source/init/tasks.cpp | 47 +- source/window/window.cpp | 21 +- 69 files changed, 1470 insertions(+), 1356 deletions(-) rename {include => plugins/builtin/include/content}/providers/file_provider.hpp (90%) rename {include => plugins/builtin/include/content}/views/view_bookmarks.hpp (90%) rename {include => plugins/builtin/include/content}/views/view_command_palette.hpp (97%) rename {include => plugins/builtin/include/content}/views/view_constants.hpp (95%) rename {include => plugins/builtin/include/content}/views/view_data_inspector.hpp (96%) rename {include => plugins/builtin/include/content}/views/view_data_processor.hpp (90%) rename {include => plugins/builtin/include/content}/views/view_diff.hpp (94%) rename {include => plugins/builtin/include/content}/views/view_disassembler.hpp (93%) rename {include => plugins/builtin/include/content}/views/view_hashes.hpp (97%) rename {include => plugins/builtin/include/content}/views/view_help.hpp (95%) rename {include => plugins/builtin/include/content}/views/view_hexeditor.hpp (94%) rename {include => plugins/builtin/include/content}/views/view_information.hpp (96%) rename {include => plugins/builtin/include/content}/views/view_patches.hpp (91%) rename {include => plugins/builtin/include/content}/views/view_pattern_data.hpp (92%) rename {include => plugins/builtin/include/content}/views/view_pattern_editor.hpp (97%) rename {include => plugins/builtin/include/content}/views/view_settings.hpp (92%) rename {include => plugins/builtin/include/content}/views/view_store.hpp (97%) rename {include => plugins/builtin/include/content}/views/view_strings.hpp (96%) rename {include => plugins/builtin/include/content}/views/view_tools.hpp (90%) rename {include => plugins/builtin/include/content}/views/view_yara.hpp (95%) rename {source => plugins/builtin/source/content}/providers/file_provider.cpp (96%) create mode 100644 plugins/builtin/source/content/views.cpp rename {source => plugins/builtin/source/content}/views/view_bookmarks.cpp (84%) rename {source => plugins/builtin/source/content}/views/view_command_palette.cpp (94%) rename {source => plugins/builtin/source/content}/views/view_constants.cpp (89%) rename {source => plugins/builtin/source/content}/views/view_data_inspector.cpp (88%) rename {source => plugins/builtin/source/content}/views/view_data_processor.cpp (96%) rename {source => plugins/builtin/source/content}/views/view_diff.cpp (96%) rename {source => plugins/builtin/source/content}/views/view_disassembler.cpp (75%) rename {source => plugins/builtin/source/content}/views/view_hashes.cpp (83%) rename {source => plugins/builtin/source/content}/views/view_help.cpp (93%) rename {source => plugins/builtin/source/content}/views/view_hexeditor.cpp (80%) rename {source => plugins/builtin/source/content}/views/view_information.cpp (79%) rename {source => plugins/builtin/source/content}/views/view_patches.cpp (81%) rename {source => plugins/builtin/source/content}/views/view_pattern_data.cpp (68%) rename {source => plugins/builtin/source/content}/views/view_pattern_editor.cpp (90%) rename {source => plugins/builtin/source/content}/views/view_settings.cpp (77%) rename {source => plugins/builtin/source/content}/views/view_store.cpp (86%) rename {source => plugins/builtin/source/content}/views/view_strings.cpp (84%) rename {source => plugins/builtin/source/content}/views/view_tools.cpp (58%) rename {source => plugins/builtin/source/content}/views/view_yara.cpp (87%) rename {include => plugins/libimhex/include/hex}/helpers/disassembler.hpp (100%) rename {include => plugins/libimhex/include/hex}/helpers/encoding_file.hpp (100%) rename {include => plugins/libimhex/include/hex}/helpers/loader_script_handler.hpp (100%) rename {include => plugins/libimhex/include/hex}/helpers/patches.hpp (100%) rename {include => plugins/libimhex/include/hex}/helpers/project_file_handler.hpp (100%) rename {source => plugins/libimhex/source}/helpers/encoding_file.cpp (97%) rename {source => plugins/libimhex/source}/helpers/loader_script_handler.cpp (99%) rename {source => plugins/libimhex/source}/helpers/patches.cpp (99%) rename {source => plugins/libimhex/source}/helpers/project_file_handler.cpp (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c1b363db..4277a955f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,33 +46,7 @@ add_executable(imhex ${application_type} source/init/splash_window.cpp source/init/tasks.cpp - source/helpers/patches.cpp - source/helpers/project_file_handler.cpp - source/helpers/loader_script_handler.cpp source/helpers/plugin_manager.cpp - source/helpers/encoding_file.cpp - - source/providers/file_provider.cpp - - source/views/view_hexeditor.cpp - source/views/view_pattern_editor.cpp - source/views/view_pattern_data.cpp - source/views/view_hashes.cpp - source/views/view_information.cpp - source/views/view_help.cpp - source/views/view_tools.cpp - source/views/view_strings.cpp - source/views/view_data_inspector.cpp - source/views/view_disassembler.cpp - source/views/view_bookmarks.cpp - source/views/view_patches.cpp - source/views/view_command_palette.cpp - source/views/view_settings.cpp - source/views/view_data_processor.cpp - source/views/view_yara.cpp - source/views/view_constants.cpp - source/views/view_store.cpp - source/views/view_diff.cpp ${imhex_icon} ) diff --git a/external/ImGui/include/imgui_imhex_extensions.h b/external/ImGui/include/imgui_imhex_extensions.h index 5646e6876..eab0997c7 100644 --- a/external/ImGui/include/imgui_imhex_extensions.h +++ b/external/ImGui/include/imgui_imhex_extensions.h @@ -45,6 +45,8 @@ namespace ImGui { } }; + int UpdateStringSizeCallback(ImGuiInputTextCallbackData *data); + bool IconHyperlink(const char *icon, const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0); bool Hyperlink(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0); bool BulletHyperlink(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0); diff --git a/external/ImGui/source/imgui_imhex_extensions.cpp b/external/ImGui/source/imgui_imhex_extensions.cpp index c8da2c2b2..f66354796 100644 --- a/external/ImGui/source/imgui_imhex_extensions.cpp +++ b/external/ImGui/source/imgui_imhex_extensions.cpp @@ -15,6 +15,13 @@ namespace ImGui { + int UpdateStringSizeCallback(ImGuiInputTextCallbackData *data) { + auto &mathInput = *static_cast(data->UserData); + + mathInput.resize(data->BufTextLen); + return 0; + } + bool IconHyperlink(const char *icon, const char* label, const ImVec2& size_arg, ImGuiButtonFlags flags) { ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) diff --git a/plugins/builtin/CMakeLists.txt b/plugins/builtin/CMakeLists.txt index 2b97dc599..b2599766d 100644 --- a/plugins/builtin/CMakeLists.txt +++ b/plugins/builtin/CMakeLists.txt @@ -13,6 +13,33 @@ add_library(${PROJECT_NAME} SHARED source/content/tools_entries.cpp source/content/data_processor_nodes.cpp source/content/ui_items.cpp + source/content/providers.cpp + source/content/views.cpp + + source/content/providers/file_provider.cpp + source/content/providers/gdb_provider.cpp + + source/content/views/view_hexeditor.cpp + source/content/views/view_pattern_editor.cpp + source/content/views/view_pattern_data.cpp + source/content/views/view_hashes.cpp + source/content/views/view_information.cpp + source/content/views/view_help.cpp + source/content/views/view_tools.cpp + source/content/views/view_strings.cpp + source/content/views/view_data_inspector.cpp + source/content/views/view_disassembler.cpp + source/content/views/view_bookmarks.cpp + source/content/views/view_patches.cpp + source/content/views/view_command_palette.cpp + source/content/views/view_settings.cpp + source/content/views/view_data_processor.cpp + source/content/views/view_yara.cpp + source/content/views/view_constants.cpp + source/content/views/view_store.cpp + source/content/views/view_diff.cpp + source/content/views/view_gdb.cpp + source/math_evaluator.cpp diff --git a/include/providers/file_provider.hpp b/plugins/builtin/include/content/providers/file_provider.hpp similarity index 90% rename from include/providers/file_provider.hpp rename to plugins/builtin/include/content/providers/file_provider.hpp index 4e3bc5559..9bd70de69 100644 --- a/include/providers/file_provider.hpp +++ b/plugins/builtin/include/content/providers/file_provider.hpp @@ -14,11 +14,11 @@ #include #endif -namespace hex::prv { +namespace hex::plugin::builtin::prv { - class FileProvider : public Provider { + class FileProvider : public hex::prv::Provider { public: - explicit FileProvider(std::string path); + explicit FileProvider(); ~FileProvider() override; bool isAvailable() const override; @@ -41,6 +41,9 @@ namespace hex::prv { [[nodiscard]] std::string getName() const override; [[nodiscard]] std::vector> getDataInformation() const override; + void open(const std::string &path); + void close(); + private: #if defined(OS_WINDOWS) HANDLE m_file = INVALID_HANDLE_VALUE; @@ -57,9 +60,6 @@ namespace hex::prv { struct stat m_fileStats = { 0 }; bool m_readable = false, m_writable = false; - - void open(); - void close(); }; } \ No newline at end of file diff --git a/include/views/view_bookmarks.hpp b/plugins/builtin/include/content/views/view_bookmarks.hpp similarity index 90% rename from include/views/view_bookmarks.hpp rename to plugins/builtin/include/content/views/view_bookmarks.hpp index 3593059d7..d93187e84 100644 --- a/include/views/view_bookmarks.hpp +++ b/plugins/builtin/include/content/views/view_bookmarks.hpp @@ -5,7 +5,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_command_palette.hpp b/plugins/builtin/include/content/views/view_command_palette.hpp similarity index 97% rename from include/views/view_command_palette.hpp rename to plugins/builtin/include/content/views/view_command_palette.hpp index 1d4d1affe..15121cdd8 100644 --- a/include/views/view_command_palette.hpp +++ b/plugins/builtin/include/content/views/view_command_palette.hpp @@ -9,7 +9,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_constants.hpp b/plugins/builtin/include/content/views/view_constants.hpp similarity index 95% rename from include/views/view_constants.hpp rename to plugins/builtin/include/content/views/view_constants.hpp index fdf4edaa2..6aaa690f3 100644 --- a/include/views/view_constants.hpp +++ b/plugins/builtin/include/content/views/view_constants.hpp @@ -5,7 +5,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { enum class ConstantType { Int10, diff --git a/include/views/view_data_inspector.hpp b/plugins/builtin/include/content/views/view_data_inspector.hpp similarity index 96% rename from include/views/view_data_inspector.hpp rename to plugins/builtin/include/content/views/view_data_inspector.hpp index cf88f8e5b..921b9ce8d 100644 --- a/include/views/view_data_inspector.hpp +++ b/plugins/builtin/include/content/views/view_data_inspector.hpp @@ -8,7 +8,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_data_processor.hpp b/plugins/builtin/include/content/views/view_data_processor.hpp similarity index 90% rename from include/views/view_data_processor.hpp rename to plugins/builtin/include/content/views/view_data_processor.hpp index 3304035ca..a2f4a816a 100644 --- a/include/views/view_data_processor.hpp +++ b/plugins/builtin/include/content/views/view_data_processor.hpp @@ -10,7 +10,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } @@ -27,7 +27,7 @@ namespace hex { std::list m_nodes; std::list m_links; - std::vector m_dataOverlays; + std::vector m_dataOverlays; int m_rightClickedId = -1; ImVec2 m_rightClickedCoords; diff --git a/include/views/view_diff.hpp b/plugins/builtin/include/content/views/view_diff.hpp similarity index 94% rename from include/views/view_diff.hpp rename to plugins/builtin/include/content/views/view_diff.hpp index f437f2c47..b506fd1ef 100644 --- a/include/views/view_diff.hpp +++ b/plugins/builtin/include/content/views/view_diff.hpp @@ -9,7 +9,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_disassembler.hpp b/plugins/builtin/include/content/views/view_disassembler.hpp similarity index 93% rename from include/views/view_disassembler.hpp rename to plugins/builtin/include/content/views/view_disassembler.hpp index 831467834..f9ec0063f 100644 --- a/include/views/view_disassembler.hpp +++ b/plugins/builtin/include/content/views/view_disassembler.hpp @@ -2,13 +2,13 @@ #include -#include "helpers/disassembler.hpp" +#include #include #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_hashes.hpp b/plugins/builtin/include/content/views/view_hashes.hpp similarity index 97% rename from include/views/view_hashes.hpp rename to plugins/builtin/include/content/views/view_hashes.hpp index 3defc32f7..6ec9c29a7 100644 --- a/include/views/view_hashes.hpp +++ b/plugins/builtin/include/content/views/view_hashes.hpp @@ -6,7 +6,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_help.hpp b/plugins/builtin/include/content/views/view_help.hpp similarity index 95% rename from include/views/view_help.hpp rename to plugins/builtin/include/content/views/view_help.hpp index 88f7b9da9..c31e6c7a9 100644 --- a/include/views/view_help.hpp +++ b/plugins/builtin/include/content/views/view_help.hpp @@ -9,7 +9,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_hexeditor.hpp b/plugins/builtin/include/content/views/view_hexeditor.hpp similarity index 94% rename from include/views/view_hexeditor.hpp rename to plugins/builtin/include/content/views/view_hexeditor.hpp index 6b589a06d..448235bed 100644 --- a/include/views/view_hexeditor.hpp +++ b/plugins/builtin/include/content/views/view_hexeditor.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include "helpers/encoding_file.hpp" +#include #include @@ -10,9 +10,11 @@ #include #include -namespace hex { +namespace hex::prv { class Provider; } + + +namespace hex::plugin::builtin { - namespace prv { class Provider; } using SearchFunction = std::vector> (*)(prv::Provider* &provider, std::string string); diff --git a/include/views/view_information.hpp b/plugins/builtin/include/content/views/view_information.hpp similarity index 96% rename from include/views/view_information.hpp rename to plugins/builtin/include/content/views/view_information.hpp index 382dbba66..95a9dbdb5 100644 --- a/include/views/view_information.hpp +++ b/plugins/builtin/include/content/views/view_information.hpp @@ -7,7 +7,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_patches.hpp b/plugins/builtin/include/content/views/view_patches.hpp similarity index 91% rename from include/views/view_patches.hpp rename to plugins/builtin/include/content/views/view_patches.hpp index 31e05a60d..b02e30266 100644 --- a/include/views/view_patches.hpp +++ b/plugins/builtin/include/content/views/view_patches.hpp @@ -7,7 +7,7 @@ #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_pattern_data.hpp b/plugins/builtin/include/content/views/view_pattern_data.hpp similarity index 92% rename from include/views/view_pattern_data.hpp rename to plugins/builtin/include/content/views/view_pattern_data.hpp index ed67c7d2e..abb868517 100644 --- a/include/views/view_pattern_data.hpp +++ b/plugins/builtin/include/content/views/view_pattern_data.hpp @@ -14,6 +14,11 @@ namespace hex { namespace prv { class Provider; } namespace lang { class PatternData; } +} + + +namespace hex::plugin::builtin { + class ViewPatternData : public View { public: ViewPatternData(); diff --git a/include/views/view_pattern_editor.hpp b/plugins/builtin/include/content/views/view_pattern_editor.hpp similarity index 97% rename from include/views/view_pattern_editor.hpp rename to plugins/builtin/include/content/views/view_pattern_editor.hpp index 2e243d958..099a2ccb5 100644 --- a/include/views/view_pattern_editor.hpp +++ b/plugins/builtin/include/content/views/view_pattern_editor.hpp @@ -13,7 +13,7 @@ #include -namespace hex { +namespace hex::plugin::builtin { class ViewPatternEditor : public View { public: diff --git a/include/views/view_settings.hpp b/plugins/builtin/include/content/views/view_settings.hpp similarity index 92% rename from include/views/view_settings.hpp rename to plugins/builtin/include/content/views/view_settings.hpp index 00f2fc9e1..de1728816 100644 --- a/include/views/view_settings.hpp +++ b/plugins/builtin/include/content/views/view_settings.hpp @@ -5,7 +5,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { class ViewSettings : public View { public: diff --git a/include/views/view_store.hpp b/plugins/builtin/include/content/views/view_store.hpp similarity index 97% rename from include/views/view_store.hpp rename to plugins/builtin/include/content/views/view_store.hpp index e81e59101..fdf324f37 100644 --- a/include/views/view_store.hpp +++ b/plugins/builtin/include/content/views/view_store.hpp @@ -11,7 +11,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { struct StoreEntry { std::string name; diff --git a/include/views/view_strings.hpp b/plugins/builtin/include/content/views/view_strings.hpp similarity index 96% rename from include/views/view_strings.hpp rename to plugins/builtin/include/content/views/view_strings.hpp index a5e3a6545..ecb59f606 100644 --- a/include/views/view_strings.hpp +++ b/plugins/builtin/include/content/views/view_strings.hpp @@ -5,7 +5,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_tools.hpp b/plugins/builtin/include/content/views/view_tools.hpp similarity index 90% rename from include/views/view_tools.hpp rename to plugins/builtin/include/content/views/view_tools.hpp index c202c3ac9..1e9c86198 100644 --- a/include/views/view_tools.hpp +++ b/plugins/builtin/include/content/views/view_tools.hpp @@ -8,7 +8,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace prv { class Provider; } diff --git a/include/views/view_yara.hpp b/plugins/builtin/include/content/views/view_yara.hpp similarity index 95% rename from include/views/view_yara.hpp rename to plugins/builtin/include/content/views/view_yara.hpp index 1c422b5d9..eabc0664c 100644 --- a/include/views/view_yara.hpp +++ b/plugins/builtin/include/content/views/view_yara.hpp @@ -5,7 +5,7 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { class ViewYara : public View { public: diff --git a/source/providers/file_provider.cpp b/plugins/builtin/source/content/providers/file_provider.cpp similarity index 96% rename from source/providers/file_provider.cpp rename to plugins/builtin/source/content/providers/file_provider.cpp index 42b848796..d624afb57 100644 --- a/source/providers/file_provider.cpp +++ b/plugins/builtin/source/content/providers/file_provider.cpp @@ -1,16 +1,16 @@ -#include "providers/file_provider.hpp" +#include "content/providers/file_provider.hpp" #include #include #include #include -#include "helpers/project_file_handler.hpp" +#include -namespace hex::prv { +namespace hex::plugin::builtin::prv { + + FileProvider::FileProvider() : Provider() { - FileProvider::FileProvider(std::string path) : Provider(), m_path(std::move(path)) { - this->open(); } FileProvider::~FileProvider() { @@ -135,7 +135,7 @@ namespace hex::prv { ::close(handle); #endif - this->open(); + this->open(this->m_path); } size_t FileProvider::getActualSize() const { @@ -161,7 +161,8 @@ namespace hex::prv { return result; } - void FileProvider::open() { + void FileProvider::open(const std::string &path) { + this->m_path = path; this->m_fileStatsValid = stat(this->m_path.data(), &this->m_fileStats) == 0; this->m_readable = true; diff --git a/plugins/builtin/source/content/tools_entries.cpp b/plugins/builtin/source/content/tools_entries.cpp index b5ed010d3..697d25fd3 100644 --- a/plugins/builtin/source/content/tools_entries.cpp +++ b/plugins/builtin/source/content/tools_entries.cpp @@ -30,13 +30,6 @@ namespace hex::plugin::builtin { using namespace std::literals::chrono_literals; using namespace hex::literals; - int updateStringSizeCallback(ImGuiInputTextCallbackData *data) { - auto &mathInput = *static_cast(data->UserData); - - mathInput.resize(data->BufTextLen); - return 0; - } - void drawDemangler() { static std::vector mangledBuffer(0xF'FFFF, 0x00); static std::string demangledName; @@ -108,9 +101,9 @@ namespace hex::plugin::builtin { static auto replacePattern = []{ std::string s; s.reserve(0xFFF); return s; }(); static auto regexOutput = []{ std::string s; s.reserve(0xFFF); return s; }(); - bool changed1 = ImGui::InputText("hex.builtin.tools.regex_replacer.pattern"_lang, regexPattern.data(), regexPattern.capacity(), ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, ®exPattern); - bool changed2 = ImGui::InputText("hex.builtin.tools.regex_replacer.replace"_lang, replacePattern.data(), replacePattern.capacity(), ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, &replacePattern); - bool changed3 = ImGui::InputTextMultiline("hex.builtin.tools.regex_replacer.input"_lang, regexInput.data(), regexInput.capacity(), ImVec2(0, 0), ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, ®exInput); + bool changed1 = ImGui::InputText("hex.builtin.tools.regex_replacer.pattern"_lang, regexPattern.data(), regexPattern.capacity(), ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, ®exPattern); + bool changed2 = ImGui::InputText("hex.builtin.tools.regex_replacer.replace"_lang, replacePattern.data(), replacePattern.capacity(), ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, &replacePattern); + bool changed3 = ImGui::InputTextMultiline("hex.builtin.tools.regex_replacer.input"_lang, regexInput.data(), regexInput.capacity(), ImVec2(0, 0), ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, ®exInput); if (changed1 || changed2 || changed3) { try { @@ -363,7 +356,7 @@ namespace hex::plugin::builtin { } ImGui::PushItemWidth(ImGui::GetContentRegionAvailWidth()); - if (ImGui::InputText("##input", mathInput.data(), mathInput.capacity(), ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, &mathInput)) { + if (ImGui::InputText("##input", mathInput.data(), mathInput.capacity(), ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, &mathInput)) { ImGui::SetKeyboardFocusHere(); evaluate = true; } @@ -619,7 +612,7 @@ namespace hex::plugin::builtin { bool startSearch; - startSearch = ImGui::InputText("##search", searchString.data(), searchString.capacity(), ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, &searchString); + startSearch = ImGui::InputText("##search", searchString.data(), searchString.capacity(), ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, &searchString); ImGui::SameLine(); ImGui::BeginDisabled(searchProcess.valid() && searchProcess.wait_for(0s) != std::future_status::ready || searchString.empty()); @@ -685,7 +678,7 @@ namespace hex::plugin::builtin { { ImGui::TextUnformatted("hex.builtin.tools.file_tools.shredder.input"_lang); ImGui::SameLine(); - ImGui::InputText("##path", selectedFile.data(), selectedFile.capacity(), ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, &selectedFile); + ImGui::InputText("##path", selectedFile.data(), selectedFile.capacity(), ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, &selectedFile); ImGui::SameLine(); if (ImGui::Button("...")) { hex::openFileBrowser("hex.builtin.tools.file_tools.shredder.picker"_lang, DialogMode::Open, {}, [](const std::string &path) { @@ -800,7 +793,7 @@ namespace hex::plugin::builtin { { ImGui::TextUnformatted("hex.builtin.tools.file_tools.splitter.input"_lang); ImGui::SameLine(); - ImGui::InputText("##path", selectedFile.data(), selectedFile.capacity(), ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, &selectedFile); + ImGui::InputText("##path", selectedFile.data(), selectedFile.capacity(), ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, &selectedFile); ImGui::SameLine(); if (ImGui::Button("...##input")) { hex::openFileBrowser("hex.builtin.tools.file_tools.splitter.picker.input"_lang, DialogMode::Open, {}, [](const std::string &path) { @@ -810,7 +803,7 @@ namespace hex::plugin::builtin { ImGui::TextUnformatted("hex.builtin.tools.file_tools.splitter.output"_lang); ImGui::SameLine(); - ImGui::InputText("##base_path", baseOutputPath.data(), baseOutputPath.capacity(), ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, &baseOutputPath); + ImGui::InputText("##base_path", baseOutputPath.data(), baseOutputPath.capacity(), ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, &baseOutputPath); ImGui::SameLine(); if (ImGui::Button("...##output")) { hex::openFileBrowser("hex.builtin.tools.file_tools.splitter.picker.output"_lang, DialogMode::Save, {}, [](const std::string &path) { @@ -957,7 +950,7 @@ namespace hex::plugin::builtin { { ImGui::TextUnformatted("hex.builtin.tools.file_tools.combiner.output"_lang); ImGui::SameLine(); - ImGui::InputText("##output_path", outputPath.data(), outputPath.capacity(), ImGuiInputTextFlags_CallbackEdit, updateStringSizeCallback, &outputPath); + ImGui::InputText("##output_path", outputPath.data(), outputPath.capacity(), ImGuiInputTextFlags_CallbackEdit, ImGui::UpdateStringSizeCallback, &outputPath); ImGui::SameLine(); if (ImGui::Button("...")) { hex::openFileBrowser("hex.builtin.tools.file_tools.combiner.output.picker"_lang, DialogMode::Save, {}, [](const std::string &path) { diff --git a/plugins/builtin/source/content/ui_items.cpp b/plugins/builtin/source/content/ui_items.cpp index d494fc7c7..0def86013 100644 --- a/plugins/builtin/source/content/ui_items.cpp +++ b/plugins/builtin/source/content/ui_items.cpp @@ -63,7 +63,7 @@ namespace hex::plugin::builtin { // Save file as ImGui::Disabled([&provider] { if (ImGui::ToolBarButton(ICON_VS_SAVE_AS, ImGui::GetCustomColorVec4(ImGuiCustomCol_ToolbarBlue))) - hex::openFileBrowser("hex.view.hexeditor.save_as"_lang, DialogMode::Save, { }, [&provider](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.save_as"_lang, DialogMode::Save, { }, [&provider](auto path) { provider->saveAs(path); }); }, !ImHexApi::Provider::isValid() || !provider->isSavable()); diff --git a/plugins/builtin/source/content/views.cpp b/plugins/builtin/source/content/views.cpp new file mode 100644 index 000000000..843a40ae5 --- /dev/null +++ b/plugins/builtin/source/content/views.cpp @@ -0,0 +1,47 @@ +#include "content/views/view_hexeditor.hpp" +#include "content/views/view_pattern_editor.hpp" +#include "content/views/view_pattern_data.hpp" +#include "content/views/view_hashes.hpp" +#include "content/views/view_information.hpp" +#include "content/views/view_help.hpp" +#include "content/views/view_tools.hpp" +#include "content/views/view_strings.hpp" +#include "content/views/view_data_inspector.hpp" +#include "content/views/view_disassembler.hpp" +#include "content/views/view_bookmarks.hpp" +#include "content/views/view_patches.hpp" +#include "content/views/view_command_palette.hpp" +#include "content/views/view_settings.hpp" +#include "content/views/view_data_processor.hpp" +#include "content/views/view_yara.hpp" +#include "content/views/view_constants.hpp" +#include "content/views/view_store.hpp" +#include "content/views/view_diff.hpp" +#include "content/views/view_gdb.hpp" + +namespace hex::plugin::builtin { + + void registerViews() { + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + ContentRegistry::Views::add(); + } + +} \ No newline at end of file diff --git a/source/views/view_bookmarks.cpp b/plugins/builtin/source/content/views/view_bookmarks.cpp similarity index 84% rename from source/views/view_bookmarks.cpp rename to plugins/builtin/source/content/views/view_bookmarks.cpp index f96bf79a9..1a397156b 100644 --- a/source/views/view_bookmarks.cpp +++ b/plugins/builtin/source/content/views/view_bookmarks.cpp @@ -1,22 +1,22 @@ -#include "views/view_bookmarks.hpp" +#include "content/views/view_bookmarks.hpp" #include #include -#include "helpers/project_file_handler.hpp" +#include #include -namespace hex { +namespace hex::plugin::builtin { - ViewBookmarks::ViewBookmarks() : View("hex.view.bookmarks.name") { + ViewBookmarks::ViewBookmarks() : View("hex.builtin.view.bookmarks.name") { EventManager::subscribe(this, [](ImHexApi::Bookmarks::Entry bookmark) { bookmark.comment.resize(0xF'FFFF); if (bookmark.name.empty()) { bookmark.name.resize(64); std::memset(bookmark.name.data(), 0x00, 64); - std::strcpy(bookmark.name.data(), hex::format("hex.view.bookmarks.default_title"_lang, + std::strcpy(bookmark.name.data(), hex::format("hex.builtin.view.bookmarks.default_title"_lang, bookmark.region.address, bookmark.region.address + bookmark.region.size - 1).c_str()); } @@ -51,13 +51,13 @@ namespace hex { } void ViewBookmarks::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.bookmarks.name").c_str(), &this->getWindowOpenState())) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.bookmarks.name").c_str(), &this->getWindowOpenState())) { if (ImGui::BeginChild("##scrolling")) { auto &bookmarks = ImHexApi::Bookmarks::getEntries(); if (bookmarks.empty()) { - std::string text = "hex.view.bookmarks.no_bookmarks"_lang; + std::string text = "hex.builtin.view.bookmarks.no_bookmarks"_lang; auto textSize = ImGui::CalcTextSize(text.c_str()); auto availableSpace = ImGui::GetContentRegionAvail(); @@ -79,9 +79,9 @@ namespace hex { ImGui::PushStyleColor(ImGuiCol_HeaderActive, color); ImGui::PushStyleColor(ImGuiCol_HeaderHovered, u32(hoverColor)); if (ImGui::CollapsingHeader((std::string(name.data()) + "###bookmark").c_str())) { - ImGui::TextUnformatted("hex.view.bookmarks.title.info"_lang); + ImGui::TextUnformatted("hex.builtin.view.bookmarks.title.info"_lang); ImGui::Separator(); - ImGui::TextUnformatted(hex::format("hex.view.bookmarks.address"_lang, region.address, region.address + region.size - 1, region.size).c_str()); + ImGui::TextUnformatted(hex::format("hex.builtin.view.bookmarks.address"_lang, region.address, region.address + region.size - 1, region.size).c_str()); if (ImGui::BeginChild("hexData", ImVec2(0, ImGui::GetTextLineHeight() * 8), true)) { size_t offset = region.address % 0x10; @@ -128,11 +128,11 @@ namespace hex { } ImGui::EndChild(); - if (ImGui::Button("hex.view.bookmarks.button.jump"_lang)) + if (ImGui::Button("hex.builtin.view.bookmarks.button.jump"_lang)) EventManager::post(region); ImGui::SameLine(0, 15); - if (ImGui::Button("hex.view.bookmarks.button.remove"_lang)) + if (ImGui::Button("hex.builtin.view.bookmarks.button.remove"_lang)) bookmarkToRemove = iter; ImGui::SameLine(0, 15); @@ -143,10 +143,10 @@ namespace hex { } ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.bookmarks.header.name"_lang); + ImGui::TextUnformatted("hex.builtin.view.bookmarks.header.name"_lang); ImGui::Separator(); - ImGui::ColorEdit4("hex.view.bookmarks.header.color"_lang, (float*)&headerColor.Value, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_NoAlpha | (locked ? ImGuiColorEditFlags_NoPicker : ImGuiColorEditFlags_None)); + ImGui::ColorEdit4("hex.builtin.view.bookmarks.header.color"_lang, (float*)&headerColor.Value, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_NoAlpha | (locked ? ImGuiColorEditFlags_NoPicker : ImGuiColorEditFlags_None)); color = headerColor; ImGui::SameLine(); @@ -156,7 +156,7 @@ namespace hex { ImGui::InputText("##nameInput", name.data(), 64); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.bookmarks.header.comment"_lang); + ImGui::TextUnformatted("hex.builtin.view.bookmarks.header.comment"_lang); ImGui::Separator(); if (locked) diff --git a/source/views/view_command_palette.cpp b/plugins/builtin/source/content/views/view_command_palette.cpp similarity index 94% rename from source/views/view_command_palette.cpp rename to plugins/builtin/source/content/views/view_command_palette.cpp index a6173462f..765a94c9b 100644 --- a/source/views/view_command_palette.cpp +++ b/plugins/builtin/source/content/views/view_command_palette.cpp @@ -1,10 +1,10 @@ -#include "views/view_command_palette.hpp" +#include "content/views/view_command_palette.hpp" #include -namespace hex { +namespace hex::plugin::builtin { - ViewCommandPalette::ViewCommandPalette() : View("hex.view.command_palette.name") { + ViewCommandPalette::ViewCommandPalette() : View("hex.builtin.view.command_palette.name") { this->m_commandBuffer.resize(1024, 0x00); } @@ -17,7 +17,7 @@ namespace hex { if (!this->m_commandPaletteOpen) return; ImGui::SetNextWindowPos(ImVec2(SharedData::windowPos.x + SharedData::windowSize.x * 0.5F, SharedData::windowPos.y), ImGuiCond_Always, ImVec2(0.5F,0.0F)); - if (ImGui::BeginPopup("hex.view.command_palette.name"_lang)) { + if (ImGui::BeginPopup("hex.builtin.view.command_palette.name"_lang)) { if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_Escape))) ImGui::CloseCurrentPopup(); @@ -75,7 +75,7 @@ namespace hex { bool ViewCommandPalette::handleShortcut(bool keys[512], bool ctrl, bool shift, bool alt) { if (ctrl && shift && keys['P']) { View::doLater([this] { - ImGui::OpenPopup("hex.view.command_palette.name"_lang); + ImGui::OpenPopup("hex.builtin.view.command_palette.name"_lang); this->m_commandPaletteOpen = true; this->m_justOpened = true; }); diff --git a/source/views/view_constants.cpp b/plugins/builtin/source/content/views/view_constants.cpp similarity index 89% rename from source/views/view_constants.cpp rename to plugins/builtin/source/content/views/view_constants.cpp index 4e0f2a681..16872493d 100644 --- a/source/views/view_constants.cpp +++ b/plugins/builtin/source/content/views/view_constants.cpp @@ -1,4 +1,4 @@ -#include "views/view_constants.hpp" +#include "content/views/view_constants.hpp" #include #include @@ -8,9 +8,9 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { - ViewConstants::ViewConstants() : View("hex.view.constants.name") { + ViewConstants::ViewConstants() : View("hex.builtin.view.constants.name") { this->reloadConstants(); this->m_filter.reserve(0xFFFF); @@ -65,7 +65,7 @@ namespace hex { } void ViewConstants::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.constants.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.constants.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { ImGui::InputText("##search", this->m_filter.data(), this->m_filter.capacity(), ImGuiInputTextFlags_CallbackEdit, [](ImGuiInputTextCallbackData *data) { auto &view = *static_cast(data->UserData); @@ -88,10 +88,10 @@ namespace hex { ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY)) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.constants.row.category"_lang, 0, -1, ImGui::GetID("category")); - ImGui::TableSetupColumn("hex.view.constants.row.name"_lang, 0, -1, ImGui::GetID("name")); - ImGui::TableSetupColumn("hex.view.constants.row.desc"_lang, 0, -1, ImGui::GetID("desc")); - ImGui::TableSetupColumn("hex.view.constants.row.value"_lang, 0, -1, ImGui::GetID("value")); + ImGui::TableSetupColumn("hex.builtin.view.constants.row.category"_lang, 0, -1, ImGui::GetID("category")); + ImGui::TableSetupColumn("hex.builtin.view.constants.row.name"_lang, 0, -1, ImGui::GetID("name")); + ImGui::TableSetupColumn("hex.builtin.view.constants.row.desc"_lang, 0, -1, ImGui::GetID("desc")); + ImGui::TableSetupColumn("hex.builtin.view.constants.row.value"_lang, 0, -1, ImGui::GetID("value")); auto sortSpecs = ImGui::TableGetSortSpecs(); diff --git a/source/views/view_data_inspector.cpp b/plugins/builtin/source/content/views/view_data_inspector.cpp similarity index 88% rename from source/views/view_data_inspector.cpp rename to plugins/builtin/source/content/views/view_data_inspector.cpp index 652040ce9..d4755fd96 100644 --- a/source/views/view_data_inspector.cpp +++ b/plugins/builtin/source/content/views/view_data_inspector.cpp @@ -1,4 +1,4 @@ -#include "views/view_data_inspector.hpp" +#include "content/views/view_data_inspector.hpp" #include @@ -6,11 +6,11 @@ extern int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); -namespace hex { +namespace hex::plugin::builtin { using NumberDisplayStyle = ContentRegistry::DataInspector::NumberDisplayStyle; - ViewDataInspector::ViewDataInspector() : View("hex.view.data_inspector.name") { + ViewDataInspector::ViewDataInspector() : View("hex.builtin.view.data_inspector.name") { EventManager::subscribe(this, [this](Region region) { auto provider = ImHexApi::Provider::get(); @@ -47,7 +47,7 @@ namespace hex { } - if (ImGui::Begin(View::toWindowName("hex.view.data_inspector.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.data_inspector.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { auto provider = ImHexApi::Provider::get(); if (ImHexApi::Provider::isValid() && provider->isReadable() && this->m_validBytes > 0) { @@ -55,8 +55,8 @@ namespace hex { ImGuiTableFlags_ScrollY | ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_RowBg, ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * (this->m_cachedData.size() + 1)))) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.data_inspector.table.name"_lang); - ImGui::TableSetupColumn("hex.view.data_inspector.table.value"_lang); + ImGui::TableSetupColumn("hex.builtin.view.data_inspector.table.name"_lang); + ImGui::TableSetupColumn("hex.builtin.view.data_inspector.table.value"_lang); ImGui::TableHeadersRow(); @@ -107,7 +107,7 @@ namespace hex { this->m_shouldInvalidate = true; } } else { - std::string text = "hex.view.data_inspector.no_data"_lang; + std::string text = "hex.builtin.view.data_inspector.no_data"_lang; auto textSize = ImGui::CalcTextSize(text.c_str()); auto availableSpace = ImGui::GetContentRegionAvail(); diff --git a/source/views/view_data_processor.cpp b/plugins/builtin/source/content/views/view_data_processor.cpp similarity index 96% rename from source/views/view_data_processor.cpp rename to plugins/builtin/source/content/views/view_data_processor.cpp index a973c53ae..92a62636c 100644 --- a/source/views/view_data_processor.cpp +++ b/plugins/builtin/source/content/views/view_data_processor.cpp @@ -1,14 +1,14 @@ -#include "views/view_data_processor.hpp" +#include "content/views/view_data_processor.hpp" #include -#include +#include #include #include -namespace hex { +namespace hex::plugin::builtin { - ViewDataProcessor::ViewDataProcessor() : View("hex.view.data_processor.name") { + ViewDataProcessor::ViewDataProcessor() : View("hex.builtin.view.data_processor.name") { EventManager::subscribe(this, [](u32 theme) { switch (theme) { default: @@ -138,7 +138,7 @@ namespace hex { } void ViewDataProcessor::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.data_processor.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.data_processor.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) { ImNodes::ClearNodeSelection(); @@ -158,7 +158,7 @@ namespace hex { dp::Node *node = nullptr; if (ImNodes::NumSelectedNodes() > 0 || ImNodes::NumSelectedLinks() > 0) { - if (ImGui::MenuItem("hex.view.data_processor.name"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.data_processor.name"_lang)) { std::vector ids; ids.resize(ImNodes::NumSelectedNodes()); ImNodes::GetSelectedNodes(ids.data()); @@ -217,14 +217,14 @@ namespace hex { } if (ImGui::BeginPopup("Node Menu")) { - if (ImGui::MenuItem("hex.view.data_processor.menu.remove_node"_lang)) + if (ImGui::MenuItem("hex.builtin.view.data_processor.menu.remove_node"_lang)) this->eraseNodes({ this->m_rightClickedId }); ImGui::EndPopup(); } if (ImGui::BeginPopup("Link Menu")) { - if (ImGui::MenuItem("hex.view.data_processor.menu.remove_link"_lang)) + if (ImGui::MenuItem("hex.builtin.view.data_processor.menu.remove_link"_lang)) this->eraseLink(this->m_rightClickedId); ImGui::EndPopup(); diff --git a/source/views/view_diff.cpp b/plugins/builtin/source/content/views/view_diff.cpp similarity index 96% rename from source/views/view_diff.cpp rename to plugins/builtin/source/content/views/view_diff.cpp index b4216e631..f6eea2bec 100644 --- a/source/views/view_diff.cpp +++ b/plugins/builtin/source/content/views/view_diff.cpp @@ -1,4 +1,4 @@ -#include "views/view_diff.hpp" +#include "content/views/view_diff.hpp" #include #include @@ -8,9 +8,9 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { - ViewDiff::ViewDiff() : View("hex.view.diff.name") { + ViewDiff::ViewDiff() : View("hex.builtin.view.diff.name") { EventManager::subscribe(this, [this]{ { @@ -169,7 +169,7 @@ namespace hex { } void ViewDiff::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.diff.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.diff.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { ImGui::SameLine(); ImGui::PushID(1); diff --git a/source/views/view_disassembler.cpp b/plugins/builtin/source/content/views/view_disassembler.cpp similarity index 75% rename from source/views/view_disassembler.cpp rename to plugins/builtin/source/content/views/view_disassembler.cpp index 90cbb1649..8c10f53ab 100644 --- a/source/views/view_disassembler.cpp +++ b/plugins/builtin/source/content/views/view_disassembler.cpp @@ -1,4 +1,4 @@ -#include "views/view_disassembler.hpp" +#include "content/views/view_disassembler.hpp" #include #include @@ -10,9 +10,9 @@ using namespace std::literals::string_literals; -namespace hex { +namespace hex::plugin::builtin { - ViewDisassembler::ViewDisassembler() : View("hex.view.disassembler.name") { + ViewDisassembler::ViewDisassembler() : View("hex.builtin.view.disassembler.name") { EventManager::subscribe(this, [this]() { this->disassemble(); }); @@ -109,15 +109,15 @@ namespace hex { void ViewDisassembler::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.disassembler.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.disassembler.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { auto provider = ImHexApi::Provider::get(); if (ImHexApi::Provider::isValid() && provider->isReadable()) { - ImGui::TextUnformatted("hex.view.disassembler.position"_lang); + ImGui::TextUnformatted("hex.builtin.view.disassembler.position"_lang); ImGui::Separator(); - ImGui::InputScalar("hex.view.disassembler.base"_lang, ImGuiDataType_U64, &this->m_baseAddress, nullptr, nullptr, "%08llX", ImGuiInputTextFlags_CharsHexadecimal); - ImGui::InputScalarN("hex.view.disassembler.region"_lang, ImGuiDataType_U64, this->m_codeRegion, 2, nullptr, nullptr, "%08llX", ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputScalar("hex.builtin.view.disassembler.base"_lang, ImGuiDataType_U64, &this->m_baseAddress, nullptr, nullptr, "%08llX", ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputScalarN("hex.builtin.view.disassembler.region"_lang, ImGuiDataType_U64, this->m_codeRegion, 2, nullptr, nullptr, "%08llX", ImGuiInputTextFlags_CharsHexadecimal); ImGui::Checkbox("hex.common.match_selection"_lang, &this->m_shouldMatchSelection); if (ImGui::IsItemEdited()) { @@ -126,10 +126,10 @@ namespace hex { } ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.disassembler.settings.header"_lang); + ImGui::TextUnformatted("hex.builtin.view.disassembler.settings.header"_lang); ImGui::Separator(); - ImGui::Combo("hex.view.disassembler.arch"_lang, reinterpret_cast(&this->m_architecture), Disassembler::ArchitectureNames, Disassembler::getArchitectureSupportedCount()); + ImGui::Combo("hex.builtin.view.disassembler.arch"_lang, reinterpret_cast(&this->m_architecture), Disassembler::ArchitectureNames, Disassembler::getArchitectureSupportedCount()); if (ImGui::BeginChild("modes", ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 6), true, ImGuiWindowFlags_AlwaysAutoResize)) { @@ -153,19 +153,19 @@ namespace hex { if (this->m_modeBasicARM == cs_mode(0)) this->m_modeBasicARM = CS_MODE_ARM; - if (ImGui::RadioButton("hex.view.disassembler.arm.arm"_lang, this->m_modeBasicARM == CS_MODE_ARM)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.arm.arm"_lang, this->m_modeBasicARM == CS_MODE_ARM)) this->m_modeBasicARM = CS_MODE_ARM; ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.arm.thumb"_lang, this->m_modeBasicARM == CS_MODE_THUMB)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.arm.thumb"_lang, this->m_modeBasicARM == CS_MODE_THUMB)) this->m_modeBasicARM = CS_MODE_THUMB; - if (ImGui::RadioButton("hex.view.disassembler.arm.default"_lang, (this->m_modeExtraARM & (CS_MODE_MCLASS | CS_MODE_V8)) == 0)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.arm.default"_lang, (this->m_modeExtraARM & (CS_MODE_MCLASS | CS_MODE_V8)) == 0)) this->m_modeExtraARM = cs_mode(0); ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.arm.cortex_m"_lang, (this->m_modeExtraARM & (CS_MODE_MCLASS | CS_MODE_V8)) == CS_MODE_MCLASS)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.arm.cortex_m"_lang, (this->m_modeExtraARM & (CS_MODE_MCLASS | CS_MODE_V8)) == CS_MODE_MCLASS)) this->m_modeExtraARM = CS_MODE_MCLASS; ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.arm.armv8"_lang, (this->m_modeExtraARM & (CS_MODE_MCLASS | CS_MODE_V8)) == CS_MODE_V8)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.arm.armv8"_lang, (this->m_modeExtraARM & (CS_MODE_MCLASS | CS_MODE_V8)) == CS_MODE_V8)) this->m_modeExtraARM = CS_MODE_V8; break; case Architecture::MIPS: @@ -178,16 +178,16 @@ namespace hex { if (this->m_modeBasicMIPS == cs_mode(0)) this->m_modeBasicMIPS = CS_MODE_MIPS32; - if (ImGui::RadioButton("hex.view.disassembler.mips.mips32"_lang, this->m_modeBasicMIPS == CS_MODE_MIPS32)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.mips.mips32"_lang, this->m_modeBasicMIPS == CS_MODE_MIPS32)) this->m_modeBasicMIPS = CS_MODE_MIPS32; ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.mips.mips64"_lang, this->m_modeBasicMIPS == CS_MODE_MIPS64)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.mips.mips64"_lang, this->m_modeBasicMIPS == CS_MODE_MIPS64)) this->m_modeBasicMIPS = CS_MODE_MIPS64; ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.mips.mips32R6"_lang, this->m_modeBasicMIPS == CS_MODE_MIPS32R6)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.mips.mips32R6"_lang, this->m_modeBasicMIPS == CS_MODE_MIPS32R6)) this->m_modeBasicMIPS = CS_MODE_MIPS32R6; - ImGui::Checkbox("hex.view.disassembler.mips.micro"_lang, &this->m_micoMode); + ImGui::Checkbox("hex.builtin.view.disassembler.mips.micro"_lang, &this->m_micoMode); break; case Architecture::X86: this->m_modeBasicARM = cs_mode(0); @@ -200,13 +200,13 @@ namespace hex { if (this->m_modeBasicX86 == cs_mode(0)) this->m_modeBasicX86 = CS_MODE_16; - if (ImGui::RadioButton("hex.view.disassembler.x86.16bit"_lang, this->m_modeBasicX86 == CS_MODE_16)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.x86.16bit"_lang, this->m_modeBasicX86 == CS_MODE_16)) this->m_modeBasicX86 = CS_MODE_16; ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.x86.32bit"_lang, this->m_modeBasicX86 == CS_MODE_32)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.x86.32bit"_lang, this->m_modeBasicX86 == CS_MODE_32)) this->m_modeBasicX86 = CS_MODE_32; ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.x86.64bit"_lang, this->m_modeBasicX86 == CS_MODE_64)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.x86.64bit"_lang, this->m_modeBasicX86 == CS_MODE_64)) this->m_modeBasicX86 = CS_MODE_64; break; case Architecture::PPC: @@ -220,10 +220,10 @@ namespace hex { if (m_modeBasicPPC == cs_mode(0)) this->m_modeBasicPPC = CS_MODE_32; - if (ImGui::RadioButton("hex.view.disassembler.ppc.32bit"_lang, this->m_modeBasicPPC == CS_MODE_32)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.ppc.32bit"_lang, this->m_modeBasicPPC == CS_MODE_32)) this->m_modeBasicPPC = CS_MODE_32; ImGui::SameLine(); - if (ImGui::RadioButton("hex.view.disassembler.ppc.64bit"_lang, this->m_modeBasicPPC == CS_MODE_64)) + if (ImGui::RadioButton("hex.builtin.view.disassembler.ppc.64bit"_lang, this->m_modeBasicPPC == CS_MODE_64)) this->m_modeBasicPPC = CS_MODE_64; break; case Architecture::SPARC: @@ -234,7 +234,7 @@ namespace hex { this->m_modeBasicPPC = cs_mode(0); this->m_micoMode = false; - ImGui::Checkbox("hex.view.disassembler.sparc.v9"_lang, &this->m_sparcV9Mode); + ImGui::Checkbox("hex.builtin.view.disassembler.sparc.v9"_lang, &this->m_sparcV9Mode); break; case Architecture::ARM64: case Architecture::SYSZ: @@ -257,26 +257,26 @@ namespace hex { ImGui::EndChild(); ImGui::Disabled([this] { - if (ImGui::Button("hex.view.disassembler.disassemble"_lang)) + if (ImGui::Button("hex.builtin.view.disassembler.disassemble"_lang)) this->disassemble(); }, this->m_disassembling); if (this->m_disassembling) { ImGui::SameLine(); - ImGui::TextSpinner("hex.view.disassembler.disassembling"_lang); + ImGui::TextSpinner("hex.builtin.view.disassembler.disassembling"_lang); } ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.disassembler.disassembly.title"_lang); + ImGui::TextUnformatted("hex.builtin.view.disassembler.disassembly.title"_lang); ImGui::Separator(); if (ImGui::BeginTable("##disassembly", 4, ImGuiTableFlags_ScrollY | ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_RowBg | ImGuiTableFlags_Reorderable)) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.disassembler.disassembly.address"_lang); - ImGui::TableSetupColumn("hex.view.disassembler.disassembly.offset"_lang); - ImGui::TableSetupColumn("hex.view.disassembler.disassembly.bytes"_lang); - ImGui::TableSetupColumn("hex.view.disassembler.disassembly.title"_lang); + ImGui::TableSetupColumn("hex.builtin.view.disassembler.disassembly.address"_lang); + ImGui::TableSetupColumn("hex.builtin.view.disassembler.disassembly.offset"_lang); + ImGui::TableSetupColumn("hex.builtin.view.disassembler.disassembly.bytes"_lang); + ImGui::TableSetupColumn("hex.builtin.view.disassembler.disassembly.title"_lang); ImGuiListClipper clipper; clipper.Begin(this->m_disassembly.size()); diff --git a/source/views/view_hashes.cpp b/plugins/builtin/source/content/views/view_hashes.cpp similarity index 83% rename from source/views/view_hashes.cpp rename to plugins/builtin/source/content/views/view_hashes.cpp index f2558bc03..929cbcdcc 100644 --- a/source/views/view_hashes.cpp +++ b/plugins/builtin/source/content/views/view_hashes.cpp @@ -1,4 +1,4 @@ -#include "views/view_hashes.hpp" +#include "content/views/view_hashes.hpp" #include #include @@ -6,9 +6,9 @@ #include -namespace hex { +namespace hex::plugin::builtin { - ViewHashes::ViewHashes() : View("hex.view.hashes.name") { + ViewHashes::ViewHashes() : View("hex.builtin.view.hashes.name") { EventManager::subscribe(this, [this]() { this->m_shouldInvalidate = true; }); @@ -39,7 +39,7 @@ namespace hex { } void ViewHashes::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.hashes.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.hashes.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { if (ImGui::BeginChild("##scrolling", ImVec2(0, 0), false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNav)) { @@ -60,10 +60,10 @@ namespace hex { } ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hashes.settings"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.settings"_lang); ImGui::Separator(); - if (ImGui::BeginCombo("hex.view.hashes.function"_lang, hashFunctionNames[this->m_currHashFunction].second, 0)) + if (ImGui::BeginCombo("hex.builtin.view.hashes.function"_lang, hashFunctionNames[this->m_currHashFunction].second, 0)) { for (int i = 0; i < hashFunctionNames.size(); i++) { @@ -88,10 +88,10 @@ namespace hex { static int polynomial = 0x07, init = 0x0000, xorout = 0x0000; static bool reflectIn = false, reflectOut = false; - ImGui::InputInt("hex.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; - ImGui::InputInt("hex.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; ImGui::Checkbox("hex.common.reflectIn"_lang, &reflectIn); @@ -100,7 +100,7 @@ namespace hex { ImGui::Checkbox("hex.common.reflectOut"_lang, &reflectOut); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; - ImGui::InputInt("hex.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; ImGui::NewLine(); @@ -114,7 +114,7 @@ namespace hex { char buffer[sizeof(result) * 2 + 1]; snprintf(buffer, sizeof(buffer), "%02X", result); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -124,10 +124,10 @@ namespace hex { static int polynomial = 0x8005, init = 0x0000, xorout = 0x0000; static bool reflectIn = false, reflectOut = false; - ImGui::InputInt("hex.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; - ImGui::InputInt("hex.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; ImGui::Checkbox("hex.common.reflectIn"_lang, &reflectIn); @@ -136,7 +136,7 @@ namespace hex { ImGui::Checkbox("hex.common.reflectOut"_lang, &reflectOut); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; - ImGui::InputInt("hex.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; ImGui::NewLine(); @@ -150,7 +150,7 @@ namespace hex { char buffer[sizeof(result) * 2 + 1]; snprintf(buffer, sizeof(buffer), "%04X", result); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -162,10 +162,10 @@ namespace hex { - ImGui::InputInt("hex.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.iv"_lang, &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; - ImGui::InputInt("hex.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.xorout"_lang, &xorout, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; ImGui::Checkbox("hex.common.reflectIn"_lang, &reflectIn); @@ -174,7 +174,7 @@ namespace hex { ImGui::Checkbox("hex.common.reflectOut"_lang, &reflectOut); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; - ImGui::InputInt("hex.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); + ImGui::InputInt("hex.builtin.view.hashes.poly"_lang, &polynomial, 0, 0, ImGuiInputTextFlags_CharsHexadecimal); if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true; ImGui::NewLine(); @@ -188,7 +188,7 @@ namespace hex { char buffer[sizeof(result) * 2 + 1]; snprintf(buffer, sizeof(buffer), "%08X", result); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -204,7 +204,7 @@ namespace hex { formatBigHexInt(result, buffer, sizeof(buffer)); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -220,7 +220,7 @@ namespace hex { formatBigHexInt(result, buffer, sizeof(buffer)); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -236,7 +236,7 @@ namespace hex { formatBigHexInt(result, buffer, sizeof(buffer)); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -252,7 +252,7 @@ namespace hex { formatBigHexInt(result, buffer, sizeof(buffer)); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -268,7 +268,7 @@ namespace hex { formatBigHexInt(result, buffer, sizeof(buffer)); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } @@ -284,7 +284,7 @@ namespace hex { formatBigHexInt(result, buffer, sizeof(buffer)); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hashes.result"_lang); + ImGui::TextUnformatted("hex.builtin.view.hashes.result"_lang); ImGui::Separator(); ImGui::InputText("##nolabel", buffer, ImGuiInputTextFlags_ReadOnly); } diff --git a/source/views/view_help.cpp b/plugins/builtin/source/content/views/view_help.cpp similarity index 93% rename from source/views/view_help.cpp rename to plugins/builtin/source/content/views/view_help.cpp index d33ecb5f4..3e23cf617 100644 --- a/source/views/view_help.cpp +++ b/plugins/builtin/source/content/views/view_help.cpp @@ -1,4 +1,4 @@ -#include "views/view_help.hpp" +#include "content/views/view_help.hpp" #include #include @@ -6,9 +6,9 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { - ViewHelp::ViewHelp() : View("hex.view.help.about.name") { + ViewHelp::ViewHelp() : View("hex.builtin.view.help.about.name") { } ViewHelp::~ViewHelp() { @@ -57,27 +57,27 @@ namespace hex { } void ViewHelp::drawAboutPopup() { - if (ImGui::BeginPopupModal(View::toWindowName("hex.view.help.about.name").c_str(), &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal(View::toWindowName("hex.builtin.view.help.about.name").c_str(), &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::Text("ImHex Hex Editor v%s by WerWolv - " ICON_FA_CODE_BRANCH, IMHEX_VERSION); #if defined(GIT_BRANCH) && defined(GIT_COMMIT_HASH) ImGui::SameLine(); if (ImGui::Hyperlink(hex::format("{0}@{1}", GIT_BRANCH, GIT_COMMIT_HASH).c_str())) hex::openWebpage("https://github.com/WerWolv/ImHex/commit/" GIT_COMMIT_HASH); #endif - ImGui::TextUnformatted("hex.view.help.about.translator"_lang); + ImGui::TextUnformatted("hex.builtin.view.help.about.translator"_lang); - ImGui::TextUnformatted("hex.view.help.about.source"_lang); ImGui::SameLine(); + ImGui::TextUnformatted("hex.builtin.view.help.about.source"_lang); ImGui::SameLine(); if (ImGui::Hyperlink("WerWolv/ImHex")) hex::openWebpage("https://github.com/WerWolv/ImHex"); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.help.about.donations"_lang); + ImGui::TextUnformatted("hex.builtin.view.help.about.donations"_lang); ImGui::Separator(); constexpr const char* Links[] = { "https://werwolv.net/donate", "https://www.patreon.com/werwolv", "https://github.com/sponsors/WerWolv" }; - ImGui::TextWrapped("%s", static_cast("hex.view.help.about.thanks"_lang)); + ImGui::TextWrapped("%s", static_cast("hex.builtin.view.help.about.thanks"_lang)); ImGui::NewLine(); @@ -92,7 +92,7 @@ namespace hex { hex::openWebpage(url.data()); }; - ImGui::TextUnformatted("hex.view.help.about.libs"_lang); + ImGui::TextUnformatted("hex.builtin.view.help.about.libs"_lang); ImGui::Separator(); ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.2F, 0.2F, 0.2F, 0.3F)); Link("ImGui by ocornut", "https://github.com/ocornut/imgui"); @@ -118,7 +118,7 @@ namespace hex { ImGui::CloseCurrentPopup(); ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.help.about.paths"_lang); + ImGui::TextUnformatted("hex.builtin.view.help.about.paths"_lang); ImGui::Separator(); if (ImGui::BeginTable("##imhex_paths", 2, ImGuiTableFlags_ScrollY | ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg)) { @@ -159,7 +159,7 @@ namespace hex { if (!this->m_patternHelpWindowOpen) return; ImGui::SetNextWindowSizeConstraints(ImVec2(450, 300), ImVec2(2000, 1000)); - if (ImGui::Begin(View::toWindowName("hex.view.help.pattern_cheat_sheet").c_str(), &this->m_patternHelpWindowOpen)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.help.pattern_cheat_sheet").c_str(), &this->m_patternHelpWindowOpen)) { ImGui::Text("ImHex Pattern Language Cheat Sheet"); ImGui::Separator(); ImGui::NewLine(); @@ -365,7 +365,7 @@ namespace hex { if (!this->m_mathHelpWindowOpen) return; ImGui::SetNextWindowSizeConstraints(ImVec2(450, 300), ImVec2(2000, 1000)); - if (ImGui::Begin(View::toWindowName("hex.view.help.calc_cheat_sheet").c_str(), &this->m_mathHelpWindowOpen)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.help.calc_cheat_sheet").c_str(), &this->m_mathHelpWindowOpen)) { ImGui::Text("ImHex Math Evaluator Cheat Sheet"); ImGui::Separator(); ImGui::NewLine(); @@ -447,20 +447,20 @@ namespace hex { void ViewHelp::drawMenu() { if (ImGui::BeginMenu("hex.menu.help"_lang)) { - if (ImGui::MenuItem("hex.view.help.about.name"_lang, "")) { - View::doLater([] { ImGui::OpenPopup(View::toWindowName("hex.view.help.about.name").c_str()); }); + if (ImGui::MenuItem("hex.builtin.view.help.about.name"_lang, "")) { + View::doLater([] { ImGui::OpenPopup(View::toWindowName("hex.builtin.view.help.about.name").c_str()); }); this->m_aboutWindowOpen = true; this->getWindowOpenState() = true; } - if (ImGui::MenuItem("hex.view.help.documentation"_lang, "")) { + if (ImGui::MenuItem("hex.builtin.view.help.documentation"_lang, "")) { hex::openWebpage("https://imhex.werwolv.net/docs"); } ImGui::Separator(); - if (ImGui::MenuItem("hex.view.help.pattern_cheat_sheet"_lang, "")) { + if (ImGui::MenuItem("hex.builtin.view.help.pattern_cheat_sheet"_lang, "")) { this->m_patternHelpWindowOpen = true; this->getWindowOpenState() = true; } - if (ImGui::MenuItem("hex.view.help.calc_cheat_sheet"_lang, "")) { + if (ImGui::MenuItem("hex.builtin.view.help.calc_cheat_sheet"_lang, "")) { this->m_mathHelpWindowOpen = true; this->getWindowOpenState() = true; } diff --git a/source/views/view_hexeditor.cpp b/plugins/builtin/source/content/views/view_hexeditor.cpp similarity index 80% rename from source/views/view_hexeditor.cpp rename to plugins/builtin/source/content/views/view_hexeditor.cpp index 2308aa91b..7e19c29b7 100644 --- a/source/views/view_hexeditor.cpp +++ b/plugins/builtin/source/content/views/view_hexeditor.cpp @@ -1,4 +1,4 @@ -#include "views/view_hexeditor.hpp" +#include "content/views/view_hexeditor.hpp" #include #include @@ -6,10 +6,11 @@ #include #include -#include "providers/file_provider.hpp" -#include "helpers/patches.hpp" -#include "helpers/project_file_handler.hpp" -#include "helpers/loader_script_handler.hpp" +#include "content/providers/file_provider.hpp" + +#include +#include +#include #include @@ -27,9 +28,9 @@ #include #endif -namespace hex { +namespace hex::plugin::builtin { - ViewHexEditor::ViewHexEditor() : View("hex.view.hexeditor.name"_lang) { + ViewHexEditor::ViewHexEditor() : View("hex.builtin.view.hexeditor.name"_lang) { this->m_searchStringBuffer.resize(0xFFF, 0x00); this->m_searchHexBuffer.resize(0xFFF, 0x00); @@ -166,7 +167,7 @@ namespace hex { EventManager::subscribe(this, [](GLFWwindow *window) { if (ProjectFile::hasUnsavedChanges()) { glfwSetWindowShouldClose(window, GLFW_FALSE); - View::doLater([] { ImGui::OpenPopup("hex.view.hexeditor.exit_application.title"_lang); }); + View::doLater([] { ImGui::OpenPopup("hex.builtin.view.hexeditor.exit_application.title"_lang); }); } }); @@ -180,9 +181,9 @@ namespace hex { EventManager::subscribe(this, [this](std::string name) { if (name == "Create File") { - hex::openFileBrowser("hex.view.hexeditor.create_file"_lang, DialogMode::Save, { }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.create_file"_lang, DialogMode::Save, { }, [this](auto path) { if (!this->createFile(path)) { - View::showErrorPopup("hex.view.hexeditor.error.create"_lang); + View::showErrorPopup("hex.builtin.view.hexeditor.error.create"_lang); return; } @@ -190,12 +191,12 @@ namespace hex { this->getWindowOpenState() = true; }); } else if (name == "Open File") { - hex::openFileBrowser("hex.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { EventManager::post(path); this->getWindowOpenState() = true; }); } else if (name == "Open Project") { - hex::openFileBrowser("hex.view.hexeditor.open_project"_lang, DialogMode::Open, { { "Project File", "hexproj" } }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.open_project"_lang, DialogMode::Open, { { "Project File", "hexproj" } }, [this](auto path) { ProjectFile::load(path); this->getWindowOpenState() = true; }); @@ -283,10 +284,10 @@ namespace hex { size_t dataSize = (!ImHexApi::Provider::isValid() || !provider->isReadable()) ? 0x00 : provider->getSize(); - this->m_memoryEditor.DrawWindow(View::toWindowName("hex.view.hexeditor.name").c_str(), &this->getWindowOpenState(), this, dataSize, dataSize == 0 ? 0x00 : provider->getBaseAddress()); + this->m_memoryEditor.DrawWindow(View::toWindowName("hex.builtin.view.hexeditor.name").c_str(), &this->getWindowOpenState(), this, dataSize, dataSize == 0 ? 0x00 : provider->getBaseAddress()); if (dataSize != 0x00) { - if (ImGui::Begin(View::toWindowName("hex.view.hexeditor.name").c_str())) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.hexeditor.name").c_str())) { if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) ImGui::OpenPopup("hex.menu.edit"_lang); @@ -297,7 +298,9 @@ namespace hex { } if (provider->getPageCount() > 1) { - ImGui::TextUnformatted(hex::format("hex.view.hexeditor.page"_lang, provider->getCurrentPage() + 1, provider->getPageCount()).c_str()); + ImGui::SameLine(); + + ImGui::TextUnformatted(hex::format("hex.builtin.view.hexeditor.page"_lang, provider->getCurrentPage() + 1, provider->getPageCount()).c_str()); ImGui::SameLine(); @@ -329,7 +332,7 @@ namespace hex { } static void saveAs() { - hex::openFileBrowser("hex.view.hexeditor.save_as"_lang, DialogMode::Save, { }, [](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.save_as"_lang, DialogMode::Save, { }, [](auto path) { ImHexApi::Provider::get()->saveAs(path); }); } @@ -337,9 +340,9 @@ namespace hex { void ViewHexEditor::drawAlwaysVisible() { auto provider = ImHexApi::Provider::get(); - if (ImGui::BeginPopupModal("hex.view.hexeditor.exit_application.title"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal("hex.builtin.view.hexeditor.exit_application.title"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.hexeditor.exit_application.desc"_lang); + ImGui::TextUnformatted("hex.builtin.view.hexeditor.exit_application.desc"_lang); ImGui::NewLine(); confirmButtons("hex.common.yes"_lang, "hex.common.no"_lang, [] { @@ -355,22 +358,22 @@ namespace hex { ImGui::EndPopup(); } - if (ImGui::BeginPopupModal("hex.view.hexeditor.script.title"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal("hex.builtin.view.hexeditor.script.title"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::SetCursorPosX(10); - ImGui::TextWrapped("%s", static_cast("hex.view.hexeditor.script.desc"_lang)); + ImGui::TextWrapped("%s", static_cast("hex.builtin.view.hexeditor.script.desc"_lang)); ImGui::NewLine(); ImGui::InputText("##nolabel", this->m_loaderScriptScriptPath.data(), this->m_loaderScriptScriptPath.length(), ImGuiInputTextFlags_ReadOnly); ImGui::SameLine(); - if (ImGui::Button("hex.view.hexeditor.script.script"_lang)) { - hex::openFileBrowser("hex.view.hexeditor.script.script.title"_lang, DialogMode::Open, { { "Python Script", "py" } }, [this](auto path) { + if (ImGui::Button("hex.builtin.view.hexeditor.script.script"_lang)) { + hex::openFileBrowser("hex.builtin.view.hexeditor.script.script.title"_lang, DialogMode::Open, { { "Python Script", "py" } }, [this](auto path) { this->m_loaderScriptScriptPath = path; }); } ImGui::InputText("##nolabel", this->m_loaderScriptFilePath.data(), this->m_loaderScriptFilePath.length(), ImGuiInputTextFlags_ReadOnly); ImGui::SameLine(); - if (ImGui::Button("hex.view.hexeditor.script.file"_lang)) { - hex::openFileBrowser("hex.view.hexeditor.script.file.title"_lang, DialogMode::Open, { }, [this](auto path) { + if (ImGui::Button("hex.builtin.view.hexeditor.script.file"_lang)) { + hex::openFileBrowser("hex.builtin.view.hexeditor.script.file.title"_lang, DialogMode::Open, { }, [this](auto path) { this->m_loaderScriptFilePath = path; }); } @@ -398,7 +401,7 @@ namespace hex { } - if (ImGui::BeginPopupModal("hex.view.hexeditor.menu.edit.set_base"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal("hex.builtin.view.hexeditor.menu.edit.set_base"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::InputText("hex.common.address"_lang, this->m_baseAddressBuffer, 16, ImGuiInputTextFlags_CharsHexadecimal); ImGui::NewLine(); @@ -416,7 +419,7 @@ namespace hex { ImGui::EndPopup(); } - if (ImGui::BeginPopupModal("hex.view.hexeditor.menu.edit.resize"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal("hex.builtin.view.hexeditor.menu.edit.resize"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::InputScalar("hex.common.size"_lang, ImGuiDataType_U64, &this->m_resizeSize, nullptr, nullptr, "0x%016llx", ImGuiInputTextFlags_CharsHexadecimal); ImGui::NewLine(); @@ -440,14 +443,14 @@ namespace hex { bool providerValid = ImHexApi::Provider::isValid(); if (ImGui::BeginMenu("hex.menu.file"_lang)) { - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.open_file"_lang, "CTRL + O")) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.open_file"_lang, "CTRL + O")) { - hex::openFileBrowser("hex.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { EventManager::post(path); }); } - if (ImGui::BeginMenu("hex.view.hexeditor.menu.file.open_recent"_lang, !SharedData::recentFilePaths.empty())) { + if (ImGui::BeginMenu("hex.builtin.view.hexeditor.menu.file.open_recent"_lang, !SharedData::recentFilePaths.empty())) { for (auto &path : SharedData::recentFilePaths) { if (ImGui::MenuItem(std::filesystem::path(path).filename().string().c_str())) { EventManager::post(path); @@ -457,35 +460,35 @@ namespace hex { ImGui::EndMenu(); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.save"_lang, "CTRL + S", false, providerValid && provider->isWritable())) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.save"_lang, "CTRL + S", false, providerValid && provider->isWritable())) { save(); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.save_as"_lang, "CTRL + SHIFT + S", false, providerValid && provider->isWritable())) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.save_as"_lang, "CTRL + SHIFT + S", false, providerValid && provider->isWritable())) { saveAs(); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.close"_lang, "", false, providerValid && provider->isAvailable())) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.close"_lang, "", false, providerValid && provider->isAvailable())) { EventManager::post(); ImHexApi::Provider::remove(ImHexApi::Provider::get()); providerValid = false; } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.quit"_lang, "", false)) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.quit"_lang, "", false)) { ImHexApi::Common::closeImHex(); } ImGui::Separator(); - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.open_project"_lang, "")) { - hex::openFileBrowser("hex.view.hexeditor.menu.file.open_project"_lang, DialogMode::Open, { { "Project File", "hexproj" } }, [this](auto path) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.open_project"_lang, "")) { + hex::openFileBrowser("hex.builtin.view.hexeditor.menu.file.open_project"_lang, DialogMode::Open, { { "Project File", "hexproj" } }, [this](auto path) { ProjectFile::load(path); }); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.save_project"_lang, "", false, providerValid && provider->isWritable())) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.save_project"_lang, "", false, providerValid && provider->isWritable())) { if (ProjectFile::getProjectFilePath() == "") { - hex::openFileBrowser("hex.view.hexeditor.save_project"_lang, DialogMode::Save, { { "Project File", "hexproj" } }, [](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.save_project"_lang, DialogMode::Save, { { "Project File", "hexproj" } }, [](auto path) { if (path.ends_with(".hexproj")) { ProjectFile::store(path); } @@ -498,18 +501,18 @@ namespace hex { ProjectFile::store(); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.load_encoding_file"_lang)) { - hex::openFileBrowser("hex.view.hexeditor.load_enconding_file"_lang, DialogMode::Open, { }, [this](auto path) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.load_encoding_file"_lang)) { + hex::openFileBrowser("hex.builtin.view.hexeditor.load_enconding_file"_lang, DialogMode::Open, { }, [this](auto path) { this->m_currEncodingFile = EncodingFile(EncodingFile::Type::Thingy, path); }); } ImGui::Separator(); - if (ImGui::BeginMenu("hex.view.hexeditor.menu.file.import"_lang)) { - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.import.base64"_lang)) { + if (ImGui::BeginMenu("hex.builtin.view.hexeditor.menu.file.import"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.import.base64"_lang)) { - hex::openFileBrowser("hex.view.hexeditor.menu.file.import.base64"_lang, DialogMode::Open, { }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.menu.file.import.base64"_lang, DialogMode::Open, { }, [this](auto path) { std::vector base64; this->loadFromFile(path, base64); @@ -517,19 +520,19 @@ namespace hex { this->m_dataToSave = crypt::decode64(base64); if (this->m_dataToSave.empty()) - View::showErrorPopup("hex.view.hexeditor.base64.import_error"_lang); + View::showErrorPopup("hex.builtin.view.hexeditor.base64.import_error"_lang); else - ImGui::OpenPopup("hex.view.hexeditor.save_data"_lang); + ImGui::OpenPopup("hex.builtin.view.hexeditor.save_data"_lang); this->getWindowOpenState() = true; - } else View::showErrorPopup("hex.view.hexeditor.file_open_error"_lang); + } else View::showErrorPopup("hex.builtin.view.hexeditor.file_open_error"_lang); }); } ImGui::Separator(); - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.import.ips"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.import.ips"_lang)) { - hex::openFileBrowser("hex.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { auto patchData = File(path, File::Mode::Read).readBytes(); auto patch = hex::loadIPSPatch(patchData); @@ -543,8 +546,8 @@ namespace hex { } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.import.ips32"_lang)) { - hex::openFileBrowser("hex.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.import.ips32"_lang)) { + hex::openFileBrowser("hex.builtin.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [this](auto path) { auto patchData = File(path, File::Mode::Read).readBytes(); auto patch = hex::loadIPS32Patch(patchData); @@ -556,17 +559,17 @@ namespace hex { }); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.import.script"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.import.script"_lang)) { this->m_loaderScriptFilePath.clear(); this->m_loaderScriptScriptPath.clear(); - View::doLater([]{ ImGui::OpenPopup("hex.view.hexeditor.script.title"_lang); }); + View::doLater([]{ ImGui::OpenPopup("hex.builtin.view.hexeditor.script.title"_lang); }); } ImGui::EndMenu(); } - if (ImGui::BeginMenu("hex.view.hexeditor.menu.file.export"_lang, providerValid && provider->isWritable())) { - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.export.ips"_lang)) { + if (ImGui::BeginMenu("hex.builtin.view.hexeditor.menu.file.export"_lang, providerValid && provider->isWritable())) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.export.ips"_lang)) { Patches patches = provider->getPatches(); if (!patches.contains(0x00454F45) && patches.contains(0x00454F46)) { u8 value = 0; @@ -575,11 +578,11 @@ namespace hex { } this->m_dataToSave = generateIPSPatch(patches); - hex::openFileBrowser("hex.view.hexeditor.menu.file.export.title"_lang, DialogMode::Save, { }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.menu.file.export.title"_lang, DialogMode::Save, { }, [this](auto path) { this->saveToFile(path, this->m_dataToSave); }); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.export.ips32"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.export.ips32"_lang)) { Patches patches = provider->getPatches(); if (!patches.contains(0x00454F45) && patches.contains(0x45454F46)) { u8 value = 0; @@ -588,7 +591,7 @@ namespace hex { } this->m_dataToSave = generateIPS32Patch(patches); - hex::openFileBrowser("hex.view.hexeditor.menu.file.export.title"_lang, DialogMode::Save, { }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.menu.file.export.title"_lang, DialogMode::Save, { }, [this](auto path) { this->saveToFile(path, this->m_dataToSave); }); } @@ -600,14 +603,14 @@ namespace hex { ImGui::Separator(); - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.search"_lang, "CTRL + F")) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.search"_lang, "CTRL + F")) { this->getWindowOpenState() = true; - ImGui::OpenPopupInWindow(View::toWindowName("hex.view.hexeditor.name").c_str(), "hex.view.hexeditor.menu.file.search"_lang); + ImGui::OpenPopupInWindow(View::toWindowName("hex.builtin.view.hexeditor.name").c_str(), "hex.builtin.view.hexeditor.menu.file.search"_lang); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.file.goto"_lang, "CTRL + G")) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.file.goto"_lang, "CTRL + G")) { this->getWindowOpenState() = true; - ImGui::OpenPopupInWindow(View::toWindowName("hex.view.hexeditor.name").c_str(), "hex.view.hexeditor.menu.file.goto"_lang); + ImGui::OpenPopupInWindow(View::toWindowName("hex.builtin.view.hexeditor.name").c_str(), "hex.builtin.view.hexeditor.menu.file.goto"_lang); } ImGui::EndMenu(); @@ -629,7 +632,7 @@ namespace hex { } ON_SCOPE_EXIT { ImGui::End(); }; - if (ImGui::Begin(View::toWindowName("hex.view.hexeditor.name").c_str())) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.hexeditor.name").c_str())) { if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) { if (ctrl && keys['Z']) { @@ -640,13 +643,13 @@ namespace hex { if (ImHexApi::Provider::isValid()) ImHexApi::Provider::get()->redo(); } else if (ctrl && keys['F']) { - ImGui::OpenPopupInWindow(View::toWindowName("hex.view.hexeditor.name").c_str(), "hex.view.hexeditor.menu.file.search"_lang); + ImGui::OpenPopupInWindow(View::toWindowName("hex.builtin.view.hexeditor.name").c_str(), "hex.builtin.view.hexeditor.menu.file.search"_lang); return true; } else if (ctrl && keys['G']) { - ImGui::OpenPopupInWindow(View::toWindowName("hex.view.hexeditor.name").c_str(), "hex.view.hexeditor.menu.file.goto"_lang); + ImGui::OpenPopupInWindow(View::toWindowName("hex.builtin.view.hexeditor.name").c_str(), "hex.builtin.view.hexeditor.menu.file.goto"_lang); return true; } else if (ctrl && keys['O']) { - hex::openFileBrowser("hex.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [](auto path) { + hex::openFileBrowser("hex.builtin.view.hexeditor.open_file"_lang, DialogMode::Open, { }, [](auto path) { EventManager::post(path); }); return true; @@ -705,18 +708,21 @@ namespace hex { } void ViewHexEditor::openFile(const std::string &path) { - ImHexApi::Provider::add(path); - auto provider = ImHexApi::Provider::get(); + hex::prv::Provider *provider = nullptr; + EventManager::post("hex.builtin.provider.file", &provider); + + if (auto fileProvider = dynamic_cast(provider)) + fileProvider->open(path); if (!provider->isWritable()) { this->m_memoryEditor.ReadOnly = true; - View::showErrorPopup("hex.view.hexeditor.error.read_only"_lang); + View::showErrorPopup("hex.builtin.view.hexeditor.error.read_only"_lang); } else { this->m_memoryEditor.ReadOnly = false; } if (!provider->isAvailable()) { - View::showErrorPopup("hex.view.hexeditor.error.open"_lang); + View::showErrorPopup("hex.builtin.view.hexeditor.error.open"_lang); ImHexApi::Provider::remove(provider); return; @@ -1033,7 +1039,7 @@ R"( ImGui::SetClipboardText(str.c_str()); } - static std::vector> findString(prv::Provider* &provider, std::string string) { + static std::vector> findString(hex::prv::Provider* &provider, std::string string) { std::vector> results; u32 foundCharacters = 0; @@ -1060,7 +1066,7 @@ R"( return results; } - static std::vector> findHex(prv::Provider* &provider, std::string string) { + static std::vector> findHex(hex::prv::Provider* &provider, std::string string) { std::vector> results; if ((string.size() % 2) == 1) @@ -1147,10 +1153,10 @@ R"( ImGui::SetNextWindowPos(ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin() - ImGui::GetStyle().WindowPadding); - if (ImGui::BeginPopup("hex.view.hexeditor.menu.file.search"_lang)) { + if (ImGui::BeginPopup("hex.builtin.view.hexeditor.menu.file.search"_lang)) { if (ImGui::BeginTabBar("searchTabs")) { std::vector *currBuffer = nullptr; - if (ImGui::BeginTabItem("hex.view.hexeditor.search.string"_lang)) { + if (ImGui::BeginTabItem("hex.builtin.view.hexeditor.search.string"_lang)) { this->m_searchFunction = findString; this->m_lastSearchBuffer = &this->m_lastStringSearch; currBuffer = &this->m_searchStringBuffer; @@ -1160,7 +1166,7 @@ R"( ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("hex.view.hexeditor.search.hex"_lang)) { + if (ImGui::BeginTabItem("hex.builtin.view.hexeditor.search.hex"_lang)) { this->m_searchFunction = findHex; this->m_lastSearchBuffer = &this->m_lastHexSearch; currBuffer = &this->m_searchHexBuffer; @@ -1172,16 +1178,16 @@ R"( } if (currBuffer != nullptr) { - if (ImGui::Button("hex.view.hexeditor.search.find"_lang)) + if (ImGui::Button("hex.builtin.view.hexeditor.search.find"_lang)) Find(currBuffer->data()); if (!this->m_lastSearchBuffer->empty()) { - if ((ImGui::Button("hex.view.hexeditor.search.find_next"_lang))) + if ((ImGui::Button("hex.builtin.view.hexeditor.search.find_next"_lang))) FindNext(); ImGui::SameLine(); - if ((ImGui::Button("hex.view.hexeditor.search.find_prev"_lang))) + if ((ImGui::Button("hex.builtin.view.hexeditor.search.find_prev"_lang))) FindPrevious(); } } @@ -1199,10 +1205,10 @@ R"( auto dataSize = provider->getActualSize(); ImGui::SetNextWindowPos(ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin() - ImGui::GetStyle().WindowPadding); - if (ImGui::BeginPopup("hex.view.hexeditor.menu.file.goto"_lang)) { + if (ImGui::BeginPopup("hex.builtin.view.hexeditor.menu.file.goto"_lang)) { if (ImGui::BeginTabBar("gotoTabs")) { u64 newOffset = 0; - if (ImGui::BeginTabItem("hex.view.hexeditor.goto.offset.absolute"_lang)) { + if (ImGui::BeginTabItem("hex.builtin.view.hexeditor.goto.offset.absolute"_lang)) { ImGui::InputScalar("hex", ImGuiDataType_U64, &this->m_gotoAddress, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal); if (this->m_gotoAddress < baseAddress || this->m_gotoAddress > baseAddress + dataSize) @@ -1212,7 +1218,7 @@ R"( ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("hex.view.hexeditor.goto.offset.begin"_lang)) { + if (ImGui::BeginTabItem("hex.builtin.view.hexeditor.goto.offset.begin"_lang)) { ImGui::InputScalar("hex", ImGuiDataType_U64, &this->m_gotoAddress, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal); if (this->m_gotoAddress < 0 || this->m_gotoAddress > dataSize) @@ -1222,7 +1228,7 @@ R"( ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("hex.view.hexeditor.goto.offset.current"_lang)) { + if (ImGui::BeginTabItem("hex.builtin.view.hexeditor.goto.offset.current"_lang)) { ImGui::InputScalar("dec", ImGuiDataType_S64, &this->m_gotoAddress, nullptr, nullptr, "%lld", ImGuiInputTextFlags_CharsDecimal); s64 currSelectionOffset = std::min(this->m_memoryEditor.DataPreviewAddr, this->m_memoryEditor.DataPreviewAddrEnd); @@ -1236,7 +1242,7 @@ R"( ImGui::EndTabItem(); } - if (ImGui::BeginTabItem("hex.view.hexeditor.goto.offset.end"_lang)) { + if (ImGui::BeginTabItem("hex.builtin.view.hexeditor.goto.offset.end"_lang)) { ImGui::InputScalar("hex", ImGuiDataType_U64, &this->m_gotoAddress, nullptr, nullptr, "%llx", ImGuiInputTextFlags_CharsHexadecimal); if (this->m_gotoAddress < 0 || this->m_gotoAddress > dataSize) @@ -1247,8 +1253,8 @@ R"( ImGui::EndTabItem(); } - if (ImGui::Button("hex.view.hexeditor.menu.file.goto"_lang)) { - provider->setCurrentPage(std::floor(double(newOffset - baseAddress) / prv::Provider::PageSize)); + if (ImGui::Button("hex.builtin.view.hexeditor.menu.file.goto"_lang)) { + provider->setCurrentPage(std::floor(double(newOffset - baseAddress) / hex::prv::Provider::PageSize)); EventManager::post(Region { newOffset, 1 }); } @@ -1262,58 +1268,58 @@ R"( void ViewHexEditor::drawEditPopup() { auto provider = ImHexApi::Provider::get(); bool providerValid = ImHexApi::Provider::isValid(); - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.undo"_lang, "CTRL + Z", false, providerValid)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.undo"_lang, "CTRL + Z", false, providerValid)) provider->undo(); - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.redo"_lang, "CTRL + Y", false, providerValid)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.redo"_lang, "CTRL + Y", false, providerValid)) provider->redo(); ImGui::Separator(); bool bytesSelected = this->m_memoryEditor.DataPreviewAddr != -1 && this->m_memoryEditor.DataPreviewAddrEnd != -1; - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.copy"_lang, "CTRL + C", false, bytesSelected)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.copy"_lang, "CTRL + C", false, bytesSelected)) this->copyBytes(); - if (ImGui::BeginMenu("hex.view.hexeditor.menu.edit.copy_as"_lang, bytesSelected)) { - if (ImGui::MenuItem("hex.view.hexeditor.copy.hex"_lang, "CTRL + SHIFT + C")) + if (ImGui::BeginMenu("hex.builtin.view.hexeditor.menu.edit.copy_as"_lang, bytesSelected)) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.hex"_lang, "CTRL + SHIFT + C")) this->copyString(); ImGui::Separator(); - if (ImGui::MenuItem("hex.view.hexeditor.copy.c"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.c"_lang)) this->copyLanguageArray(Language::C); - if (ImGui::MenuItem("hex.view.hexeditor.copy.cpp"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.cpp"_lang)) this->copyLanguageArray(Language::Cpp); - if (ImGui::MenuItem("hex.view.hexeditor.copy.csharp"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.csharp"_lang)) this->copyLanguageArray(Language::CSharp); - if (ImGui::MenuItem("hex.view.hexeditor.copy.rust"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.rust"_lang)) this->copyLanguageArray(Language::Rust); - if (ImGui::MenuItem("hex.view.hexeditor.copy.python"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.python"_lang)) this->copyLanguageArray(Language::Python); - if (ImGui::MenuItem("hex.view.hexeditor.copy.java"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.java"_lang)) this->copyLanguageArray(Language::Java); - if (ImGui::MenuItem("hex.view.hexeditor.copy.js"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.js"_lang)) this->copyLanguageArray(Language::JavaScript); ImGui::Separator(); - if (ImGui::MenuItem("hex.view.hexeditor.copy.ascii"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.ascii"_lang)) this->copyHexView(); - if (ImGui::MenuItem("hex.view.hexeditor.copy.html"_lang)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.copy.html"_lang)) this->copyHexViewHTML(); ImGui::EndMenu(); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.paste"_lang, "CTRL + V", false, bytesSelected)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.paste"_lang, "CTRL + V", false, bytesSelected)) this->pasteBytes(); - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.select_all"_lang, "CTRL + A", false, providerValid)) + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.select_all"_lang, "CTRL + A", false, providerValid)) EventManager::post(Region { provider->getBaseAddress(), provider->getActualSize() }); ImGui::Separator(); - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.bookmark"_lang, nullptr, false, this->m_memoryEditor.DataPreviewAddr != -1 && this->m_memoryEditor.DataPreviewAddrEnd != -1)) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.bookmark"_lang, nullptr, false, this->m_memoryEditor.DataPreviewAddr != -1 && this->m_memoryEditor.DataPreviewAddrEnd != -1)) { auto base = ImHexApi::Provider::get()->getBaseAddress(); size_t start = base + std::min(this->m_memoryEditor.DataPreviewAddr, this->m_memoryEditor.DataPreviewAddrEnd); @@ -1322,15 +1328,15 @@ R"( ImHexApi::Bookmarks::add(start, end - start + 1, { }, { }); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.set_base"_lang, nullptr, false, providerValid && provider->isReadable())) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.set_base"_lang, nullptr, false, providerValid && provider->isReadable())) { std::memset(this->m_baseAddressBuffer, 0x00, sizeof(this->m_baseAddressBuffer)); - View::doLater([]{ ImGui::OpenPopup("hex.view.hexeditor.menu.edit.set_base"_lang); }); + View::doLater([]{ ImGui::OpenPopup("hex.builtin.view.hexeditor.menu.edit.set_base"_lang); }); } - if (ImGui::MenuItem("hex.view.hexeditor.menu.edit.resize"_lang, nullptr, false, providerValid && provider->isResizable())) { + if (ImGui::MenuItem("hex.builtin.view.hexeditor.menu.edit.resize"_lang, nullptr, false, providerValid && provider->isResizable())) { View::doLater([this]{ this->m_resizeSize = ImHexApi::Provider::get()->getActualSize(); - ImGui::OpenPopup("hex.view.hexeditor.menu.edit.resize"_lang); + ImGui::OpenPopup("hex.builtin.view.hexeditor.menu.edit.resize"_lang); }); } } diff --git a/source/views/view_information.cpp b/plugins/builtin/source/content/views/view_information.cpp similarity index 79% rename from source/views/view_information.cpp rename to plugins/builtin/source/content/views/view_information.cpp index adadee07f..79496b185 100644 --- a/source/views/view_information.cpp +++ b/plugins/builtin/source/content/views/view_information.cpp @@ -1,4 +1,4 @@ -#include "views/view_information.hpp" +#include "content/views/view_information.hpp" #include #include @@ -18,11 +18,11 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { using namespace hex::literals; - ViewInformation::ViewInformation() : View("hex.view.information.name") { + ViewInformation::ViewInformation() : View("hex.builtin.view.information.name") { EventManager::subscribe(this, [this]() { this->m_dataValid = false; this->m_highestBlockEntropy = 0; @@ -113,62 +113,62 @@ namespace hex { } void ViewInformation::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.information.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.information.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { if (ImGui::BeginChild("##scrolling", ImVec2(0, 0), false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNav)) { auto provider = ImHexApi::Provider::get(); if (ImHexApi::Provider::isValid() && provider->isReadable()) { - ImGui::TextUnformatted("hex.view.information.control"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.control"_lang); ImGui::Separator(); ImGui::Disabled([this] { - if (ImGui::Button("hex.view.information.analyze"_lang)) + if (ImGui::Button("hex.builtin.view.information.analyze"_lang)) this->analyze(); }, this->m_analyzing); if (this->m_analyzing) { ImGui::SameLine(); - ImGui::TextSpinner("hex.view.information.analyzing"_lang); + ImGui::TextSpinner("hex.builtin.view.information.analyzing"_lang); } if (this->m_dataValid) { ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.information.region"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.region"_lang); ImGui::Separator(); for (auto &[name, value] : provider->getDataInformation()) { ImGui::LabelText(name.c_str(), "%s", value.c_str()); } - ImGui::LabelText("hex.view.information.region"_lang, "0x%llx - 0x%llx", this->m_analyzedRegion.first, this->m_analyzedRegion.second); + ImGui::LabelText("hex.builtin.view.information.region"_lang, "0x%llx - 0x%llx", this->m_analyzedRegion.first, this->m_analyzedRegion.second); ImGui::NewLine(); if (!this->m_fileDescription.empty() || !this->m_mimeType.empty()) { - ImGui::TextUnformatted("hex.view.information.magic"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.magic"_lang); ImGui::Separator(); } if (!this->m_fileDescription.empty()) { - ImGui::TextUnformatted("hex.view.information.description"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.description"_lang); ImGui::TextWrapped("%s", this->m_fileDescription.c_str()); ImGui::NewLine(); } if (!this->m_mimeType.empty()) { - ImGui::TextUnformatted("hex.view.information.mime"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.mime"_lang); ImGui::TextWrapped("%s", this->m_mimeType.c_str()); ImGui::NewLine(); } - ImGui::TextUnformatted("hex.view.information.info_analysis"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.info_analysis"_lang); ImGui::Separator(); ImGui::PushStyleColor(ImGuiCol_FrameBg, ImGui::GetColorU32(ImGuiCol_WindowBg)); - ImGui::TextUnformatted("hex.view.information.distribution"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.distribution"_lang); ImPlot::SetNextPlotLimits(0, 256, 0, float(*std::max_element(this->m_valueCounts.begin(), this->m_valueCounts.end())) * 1.1F, ImGuiCond_Always); if (ImPlot::BeginPlot("##distribution", "Address", "Count", ImVec2(-1,0), ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect, ImPlotAxisFlags_Lock, ImPlotAxisFlags_Lock)) { static auto x = []{ @@ -185,7 +185,7 @@ namespace hex { ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.information.entropy"_lang); + ImGui::TextUnformatted("hex.builtin.view.information.entropy"_lang); ImPlot::SetNextPlotLimits(0, this->m_blockEntropy.size(), -0.1, 1.1, ImGuiCond_Always); if (ImPlot::BeginPlot("##entropy", "Address", "Entropy", ImVec2(-1,0), ImPlotFlags_CanvasOnly, ImPlotAxisFlags_Lock | ImPlotAxisFlags_NoTickLabels, ImPlotAxisFlags_Lock)) { @@ -204,13 +204,13 @@ namespace hex { ImGui::NewLine(); - ImGui::LabelText("hex.view.information.block_size"_lang, "%s", hex::format("hex.view.information.block_size.desc"_lang, this->m_blockEntropy.size(), this->m_blockSize).c_str()); - ImGui::LabelText("hex.view.information.file_entropy"_lang, "%.8f", this->m_averageEntropy); - ImGui::LabelText("hex.view.information.highest_entropy"_lang, "%.8f", this->m_highestBlockEntropy); + ImGui::LabelText("hex.builtin.view.information.block_size"_lang, "%s", hex::format("hex.builtin.view.information.block_size.desc"_lang, this->m_blockEntropy.size(), this->m_blockSize).c_str()); + ImGui::LabelText("hex.builtin.view.information.file_entropy"_lang, "%.8f", this->m_averageEntropy); + ImGui::LabelText("hex.builtin.view.information.highest_entropy"_lang, "%.8f", this->m_highestBlockEntropy); if (this->m_averageEntropy > 0.83 && this->m_highestBlockEntropy > 0.9) { ImGui::NewLine(); - ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "%s", static_cast("hex.view.information.encrypted"_lang)); + ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "%s", static_cast("hex.builtin.view.information.encrypted"_lang)); } } diff --git a/source/views/view_patches.cpp b/plugins/builtin/source/content/views/view_patches.cpp similarity index 81% rename from source/views/view_patches.cpp rename to plugins/builtin/source/content/views/view_patches.cpp index 1bfd3d47e..302259607 100644 --- a/source/views/view_patches.cpp +++ b/plugins/builtin/source/content/views/view_patches.cpp @@ -1,16 +1,16 @@ -#include "views/view_patches.hpp" +#include "content/views/view_patches.hpp" #include -#include "helpers/project_file_handler.hpp" +#include #include using namespace std::literals::string_literals; -namespace hex { +namespace hex::plugin::builtin { - ViewPatches::ViewPatches() : View("hex.view.patches.name") { + ViewPatches::ViewPatches() : View("hex.builtin.view.patches.name") { EventManager::subscribe(this, []{ auto provider = ImHexApi::Provider::get(); if (ImHexApi::Provider::isValid()) @@ -30,7 +30,7 @@ namespace hex { } void ViewPatches::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.patches.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.patches.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { auto provider = ImHexApi::Provider::get(); if (ImHexApi::Provider::isValid() && provider->isReadable()) { @@ -38,9 +38,9 @@ namespace hex { if (ImGui::BeginTable("##patchesTable", 3, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY)) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.patches.offset"_lang); - ImGui::TableSetupColumn("hex.view.patches.orig"_lang); - ImGui::TableSetupColumn("hex.view.patches.patch"_lang); + ImGui::TableSetupColumn("hex.builtin.view.patches.offset"_lang); + ImGui::TableSetupColumn("hex.builtin.view.patches.orig"_lang); + ImGui::TableSetupColumn("hex.builtin.view.patches.patch"_lang); ImGui::TableHeadersRow(); @@ -71,7 +71,7 @@ namespace hex { } if (ImGui::BeginPopup("PatchContextMenu")) { - if (ImGui::MenuItem("hex.view.patches.remove"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.patches.remove"_lang)) { patches.erase(this->m_selectedPatch); ProjectFile::markDirty(); } diff --git a/source/views/view_pattern_data.cpp b/plugins/builtin/source/content/views/view_pattern_data.cpp similarity index 68% rename from source/views/view_pattern_data.cpp rename to plugins/builtin/source/content/views/view_pattern_data.cpp index 14c004c82..ae4f4d5a2 100644 --- a/source/views/view_pattern_data.cpp +++ b/plugins/builtin/source/content/views/view_pattern_data.cpp @@ -1,11 +1,11 @@ -#include "views/view_pattern_data.hpp" +#include "content/views/view_pattern_data.hpp" #include #include -namespace hex { +namespace hex::plugin::builtin { - ViewPatternData::ViewPatternData() : View("hex.view.pattern_data.name") { + ViewPatternData::ViewPatternData() : View("hex.builtin.view.pattern_data.name") { EventManager::subscribe(this, [this]() { this->m_sortedPatternData.clear(); @@ -19,12 +19,12 @@ namespace hex { static bool beginPatternDataTable(prv::Provider* &provider, const std::vector &patterns, std::vector &sortedPatterns) { if (ImGui::BeginTable("##patterndatatable", 6, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY)) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.pattern_data.var_name"_lang, 0, -1, ImGui::GetID("name")); - ImGui::TableSetupColumn("hex.view.pattern_data.color"_lang, 0, -1, ImGui::GetID("color")); - ImGui::TableSetupColumn("hex.view.pattern_data.offset"_lang, 0, -1, ImGui::GetID("offset")); - ImGui::TableSetupColumn("hex.view.pattern_data.size"_lang, 0, -1, ImGui::GetID("size")); - ImGui::TableSetupColumn("hex.view.pattern_data.type"_lang, 0, -1, ImGui::GetID("type")); - ImGui::TableSetupColumn("hex.view.pattern_data.value"_lang, 0, -1, ImGui::GetID("value")); + ImGui::TableSetupColumn("hex.builtin.view.pattern_data.var_name"_lang, 0, -1, ImGui::GetID("name")); + ImGui::TableSetupColumn("hex.builtin.view.pattern_data.color"_lang, 0, -1, ImGui::GetID("color")); + ImGui::TableSetupColumn("hex.builtin.view.pattern_data.offset"_lang, 0, -1, ImGui::GetID("offset")); + ImGui::TableSetupColumn("hex.builtin.view.pattern_data.size"_lang, 0, -1, ImGui::GetID("size")); + ImGui::TableSetupColumn("hex.builtin.view.pattern_data.type"_lang, 0, -1, ImGui::GetID("type")); + ImGui::TableSetupColumn("hex.builtin.view.pattern_data.value"_lang, 0, -1, ImGui::GetID("value")); auto sortSpecs = ImGui::TableGetSortSpecs(); @@ -48,7 +48,7 @@ namespace hex { } void ViewPatternData::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.pattern_data.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.pattern_data.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { auto provider = ImHexApi::Provider::get(); if (ImHexApi::Provider::isValid() && provider->isReadable()) { diff --git a/source/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp similarity index 90% rename from source/views/view_pattern_editor.cpp rename to plugins/builtin/source/content/views/view_pattern_editor.cpp index 26cfdeb69..8360dc787 100644 --- a/source/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -1,6 +1,6 @@ -#include "views/view_pattern_editor.hpp" +#include "content/views/view_pattern_editor.hpp" -#include "helpers/project_file_handler.hpp" +#include #include #include #include @@ -14,7 +14,7 @@ #include -namespace hex { +namespace hex::plugin::builtin { using namespace hex::literals; namespace fs = std::filesystem; @@ -82,7 +82,7 @@ namespace hex { } - ViewPatternEditor::ViewPatternEditor() : View("hex.view.pattern.name") { + ViewPatternEditor::ViewPatternEditor() : View("hex.builtin.view.pattern.name") { this->m_patternLanguageRuntime = new pl::PatternLanguage(); this->m_textEditor.SetLanguageDefinition(PatternLanguage()); @@ -147,7 +147,7 @@ namespace hex { if (!this->m_possiblePatternFiles.empty()) { this->m_selectedPatternFile = 0; - EventManager::post("hex.view.pattern.accept_pattern"_lang); + EventManager::post("hex.builtin.view.pattern.accept_pattern"_lang); this->m_acceptPatternWindowOpen = true; } }); @@ -191,7 +191,7 @@ namespace hex { void ViewPatternEditor::drawMenu() { if (ImGui::BeginMenu("hex.menu.file"_lang)) { - if (ImGui::MenuItem("hex.view.pattern.menu.file.load_pattern"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.pattern.menu.file.load_pattern"_lang)) { this->m_selectedPatternFile = 0; this->m_possiblePatternFiles.clear(); @@ -206,21 +206,21 @@ namespace hex { } } - View::doLater([]{ ImGui::OpenPopup("hex.view.pattern.menu.file.load_pattern"_lang); }); + View::doLater([]{ ImGui::OpenPopup("hex.builtin.view.pattern.menu.file.load_pattern"_lang); }); } ImGui::EndMenu(); } } void ViewPatternEditor::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.pattern.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_None | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.pattern.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_None | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse)) { auto provider = ImHexApi::Provider::get(); if (ImHexApi::Provider::isValid() && provider->isAvailable()) { auto textEditorSize = ImGui::GetContentRegionAvail(); textEditorSize.y *= 4.0/5.0; textEditorSize.y -= ImGui::GetTextLineHeightWithSpacing(); - this->m_textEditor.Render("hex.view.pattern.name"_lang, textEditorSize, true); + this->m_textEditor.Render("hex.builtin.view.pattern.name"_lang, textEditorSize, true); auto consoleSize = ImGui::GetContentRegionAvail(); consoleSize.y -= ImGui::GetTextLineHeightWithSpacing(); @@ -268,9 +268,9 @@ namespace hex { ImGui::SameLine(); if (this->m_evaluatorRunning) - ImGui::TextSpinner("hex.view.pattern.evaluating"_lang); + ImGui::TextSpinner("hex.builtin.view.pattern.evaluating"_lang); else { - if (ImGui::Checkbox("hex.view.pattern.auto"_lang, &this->m_runAutomatically)) { + if (ImGui::Checkbox("hex.builtin.view.pattern.auto"_lang, &this->m_runAutomatically)) { if (this->m_runAutomatically) this->m_hasUnevaluatedChanges = true; } @@ -305,8 +305,8 @@ namespace hex { } void ViewPatternEditor::drawAlwaysVisible() { - if (ImGui::BeginPopupModal("hex.view.pattern.accept_pattern"_lang, &this->m_acceptPatternWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::TextWrapped("%s", static_cast("hex.view.pattern.accept_pattern.desc"_lang)); + if (ImGui::BeginPopupModal("hex.builtin.view.pattern.accept_pattern"_lang, &this->m_acceptPatternWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::TextWrapped("%s", static_cast("hex.builtin.view.pattern.accept_pattern.desc"_lang)); std::vector entries; entries.resize(this->m_possiblePatternFiles.size()); @@ -328,7 +328,7 @@ namespace hex { } ImGui::NewLine(); - ImGui::Text("%s", static_cast("hex.view.pattern.accept_pattern.question"_lang)); + ImGui::Text("%s", static_cast("hex.builtin.view.pattern.accept_pattern.question"_lang)); confirmButtons("hex.common.yes"_lang, "hex.common.no"_lang, [this]{ this->loadPatternFile(this->m_possiblePatternFiles[this->m_selectedPatternFile].string()); @@ -344,7 +344,7 @@ namespace hex { } bool opened = true; - if (ImGui::BeginPopupModal("hex.view.pattern.menu.file.load_pattern"_lang, &opened, ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal("hex.builtin.view.pattern.menu.file.load_pattern"_lang, &opened, ImGuiWindowFlags_AlwaysAutoResize)) { if (ImGui::BeginListBox("##patterns", ImVec2(-FLT_MIN, 0))) { @@ -366,7 +366,7 @@ namespace hex { ImGui::SameLine(); if (ImGui::Button("hex.common.browse"_lang)) { - hex::openFileBrowser("hex.view.pattern.open_pattern"_lang, DialogMode::Open, { { "Pattern File", "hexpat" } }, [this](auto path) { + hex::openFileBrowser("hex.builtin.view.pattern.open_pattern"_lang, DialogMode::Open, { { "Pattern File", "hexpat" } }, [this](auto path) { this->loadPatternFile(path); ImGui::CloseCurrentPopup(); }); diff --git a/source/views/view_settings.cpp b/plugins/builtin/source/content/views/view_settings.cpp similarity index 77% rename from source/views/view_settings.cpp rename to plugins/builtin/source/content/views/view_settings.cpp index 4a546239e..939851a58 100644 --- a/source/views/view_settings.cpp +++ b/plugins/builtin/source/content/views/view_settings.cpp @@ -1,15 +1,15 @@ -#include "views/view_settings.hpp" +#include "content/views/view_settings.hpp" #include #include -namespace hex { +namespace hex::plugin::builtin { - ViewSettings::ViewSettings() : View("hex.view.settings.name") { + ViewSettings::ViewSettings() : View("hex.builtin.view.settings.name") { EventManager::subscribe(this, [this](const std::string &name) { if (name == "Settings") { - View::doLater([]{ ImGui::OpenPopup(View::toWindowName("hex.view.settings.name").c_str()); }); + View::doLater([]{ ImGui::OpenPopup(View::toWindowName("hex.builtin.view.settings.name").c_str()); }); this->getWindowOpenState() = true; } }); @@ -23,7 +23,7 @@ namespace hex { ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX)); - if (ImGui::BeginPopupModal(View::toWindowName("hex.view.settings.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal(View::toWindowName("hex.builtin.view.settings.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_AlwaysAutoResize)) { if (ImGui::BeginTabBar("settings")) { for (auto &[category, entries] : ContentRegistry::Settings::getEntries()) { if (ImGui::BeginTabItem(LangEntry(category))) { @@ -49,8 +49,8 @@ namespace hex { void ViewSettings::drawMenu() { if (ImGui::BeginMenu("hex.menu.help"_lang)) { - if (ImGui::MenuItem("hex.view.settings.name"_lang)) { - View::doLater([]{ ImGui::OpenPopup(View::toWindowName("hex.view.settings.name").c_str()); }); + if (ImGui::MenuItem("hex.builtin.view.settings.name"_lang)) { + View::doLater([]{ ImGui::OpenPopup(View::toWindowName("hex.builtin.view.settings.name").c_str()); }); this->getWindowOpenState() = true; } diff --git a/source/views/view_store.cpp b/plugins/builtin/source/content/views/view_store.cpp similarity index 86% rename from source/views/view_store.cpp rename to plugins/builtin/source/content/views/view_store.cpp index 73f661f65..2eb9828a8 100644 --- a/source/views/view_store.cpp +++ b/plugins/builtin/source/content/views/view_store.cpp @@ -1,4 +1,4 @@ -#include "views/view_store.hpp" +#include "content/views/view_store.hpp" #include #define IMGUI_DEFINE_MATH_OPERATORS @@ -16,23 +16,23 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { using namespace std::literals::string_literals; using namespace std::literals::chrono_literals; namespace fs = std::filesystem; - ViewStore::ViewStore() : View("hex.view.store.name") { + ViewStore::ViewStore() : View("hex.builtin.view.store.name") { this->refresh(); } ViewStore::~ViewStore() { } void ViewStore::drawStore() { - ImGui::Header("hex.view.store.desc"_lang, true); + ImGui::Header("hex.builtin.view.store.desc"_lang, true); - if (ImGui::Button("hex.view.store.reload"_lang)) { + if (ImGui::Button("hex.builtin.view.store.reload"_lang)) { this->refresh(); } @@ -40,8 +40,8 @@ namespace hex { if (ImGui::BeginTabItem(title)) { if (ImGui::BeginTable("##pattern_language", 3, ImGuiTableFlags_ScrollY | ImGuiTableFlags_Borders | ImGuiTableFlags_SizingStretchSame | ImGuiTableFlags_RowBg)) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.store.row.name"_lang, ImGuiTableColumnFlags_WidthFixed); - ImGui::TableSetupColumn("hex.view.store.row.description"_lang, ImGuiTableColumnFlags_None); + ImGui::TableSetupColumn("hex.builtin.view.store.row.name"_lang, ImGuiTableColumnFlags_WidthFixed); + ImGui::TableSetupColumn("hex.builtin.view.store.row.description"_lang, ImGuiTableColumnFlags_None); ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthFixed); ImGui::TableHeadersRow(); @@ -109,17 +109,17 @@ namespace hex { } } else if (entry.hasUpdate) { - if (ImGui::Button("hex.view.store.update"_lang)) { + if (ImGui::Button("hex.builtin.view.store.update"_lang)) { this->download(pathType, entry.fileName, entry.link, true); entry.downloading = true; } } else if (!entry.installed) { - if (ImGui::Button("hex.view.store.download"_lang)) { + if (ImGui::Button("hex.builtin.view.store.download"_lang)) { this->download(pathType, entry.fileName, entry.link, false); entry.downloading = true; } } else { - if (ImGui::Button("hex.view.store.remove"_lang)) { + if (ImGui::Button("hex.builtin.view.store.remove"_lang)) { this->remove(pathType, entry.fileName); entry.installed = false; } @@ -141,13 +141,13 @@ namespace hex { }; - drawTab("hex.view.store.tab.patterns"_lang, ImHexPath::Patterns, this->m_patterns, [](auto){}); - drawTab("hex.view.store.tab.libraries"_lang, ImHexPath::PatternsInclude, this->m_includes, [](auto){}); - drawTab("hex.view.store.tab.magics"_lang, ImHexPath::Magic, this->m_magics, [](auto){ + drawTab("hex.builtin.view.store.tab.patterns"_lang, ImHexPath::Patterns, this->m_patterns, [](auto){}); + drawTab("hex.builtin.view.store.tab.libraries"_lang, ImHexPath::PatternsInclude, this->m_includes, [](auto){}); + drawTab("hex.builtin.view.store.tab.magics"_lang, ImHexPath::Magic, this->m_magics, [](auto){ magic::compile(); }); - drawTab("hex.view.store.tab.constants"_lang, ImHexPath::Constants, this->m_constants, [](auto){}); - drawTab("hex.view.store.tab.yara"_lang, ImHexPath::Yara, this->m_yara, [](auto){}); + drawTab("hex.builtin.view.store.tab.constants"_lang, ImHexPath::Constants, this->m_constants, [](auto){}); + drawTab("hex.builtin.view.store.tab.yara"_lang, ImHexPath::Yara, this->m_yara, [](auto){}); ImGui::EndTabBar(); } @@ -219,10 +219,10 @@ namespace hex { void ViewStore::drawContent() { ImGui::SetNextWindowSizeConstraints(ImVec2(600, 400) * SharedData::globalScale, ImVec2(FLT_MAX, FLT_MAX)); - if (ImGui::BeginPopupModal(View::toWindowName("hex.view.store.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_AlwaysAutoResize)) { + if (ImGui::BeginPopupModal(View::toWindowName("hex.builtin.view.store.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_AlwaysAutoResize)) { if (this->m_apiRequest.valid()) { if (this->m_apiRequest.wait_for(0s) != std::future_status::ready) - ImGui::TextSpinner("hex.view.store.loading"_lang); + ImGui::TextSpinner("hex.builtin.view.store.loading"_lang); else this->parseResponse(); } @@ -237,8 +237,8 @@ namespace hex { void ViewStore::drawMenu() { if (ImGui::BeginMenu("hex.menu.help"_lang)) { - if (ImGui::MenuItem("hex.view.store.name"_lang)) { - View::doLater([]{ ImGui::OpenPopup(View::toWindowName("hex.view.store.name").c_str()); }); + if (ImGui::MenuItem("hex.builtin.view.store.name"_lang)) { + View::doLater([]{ ImGui::OpenPopup(View::toWindowName("hex.builtin.view.store.name").c_str()); }); this->getWindowOpenState() = true; } diff --git a/source/views/view_strings.cpp b/plugins/builtin/source/content/views/view_strings.cpp similarity index 84% rename from source/views/view_strings.cpp rename to plugins/builtin/source/content/views/view_strings.cpp index 20f6af9ca..945e9364c 100644 --- a/source/views/view_strings.cpp +++ b/plugins/builtin/source/content/views/view_strings.cpp @@ -1,4 +1,4 @@ -#include "views/view_strings.hpp" +#include "content/views/view_strings.hpp" #include #include @@ -12,9 +12,9 @@ using namespace std::literals::string_literals; -namespace hex { +namespace hex::plugin::builtin { - ViewStrings::ViewStrings() : View("hex.view.strings.name") { + ViewStrings::ViewStrings() : View("hex.builtin.view.strings.name") { EventManager::subscribe(this, [this]() { this->m_foundStrings.clear(); }); @@ -45,14 +45,14 @@ namespace hex { this->m_selectedString = readString(foundString); } if (ImGui::BeginPopup("StringContextMenu")) { - if (ImGui::MenuItem("hex.view.strings.copy"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.strings.copy"_lang)) { ImGui::SetClipboardText(this->m_selectedString.c_str()); } ImGui::Separator(); - if (ImGui::MenuItem("hex.view.strings.demangle"_lang)) { + if (ImGui::MenuItem("hex.builtin.view.strings.demangle"_lang)) { this->m_demangledName = llvm::demangle(this->m_selectedString); if (!this->m_demangledName.empty()) - View::doLater([]{ ImGui::OpenPopup("hex.view.strings.demangle.name"_lang); }); + View::doLater([]{ ImGui::OpenPopup("hex.builtin.view.strings.demangle.name"_lang); }); } ImGui::EndPopup(); } @@ -100,15 +100,15 @@ namespace hex { void ViewStrings::drawContent() { auto provider = ImHexApi::Provider::get(); - if (ImGui::Begin(View::toWindowName("hex.view.strings.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.strings.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { if (ImHexApi::Provider::isValid() && provider->isReadable()) { ImGui::Disabled([this]{ - if (ImGui::InputInt("hex.view.strings.min_length"_lang, &this->m_minimumLength, 1, 0)) + if (ImGui::InputInt("hex.builtin.view.strings.min_length"_lang, &this->m_minimumLength, 1, 0)) this->m_foundStrings.clear(); ImGui::Checkbox("Regex", &this->m_regex); - ImGui::InputText("hex.view.strings.filter"_lang, this->m_filter.data(), this->m_filter.capacity(), ImGuiInputTextFlags_CallbackEdit, [](ImGuiInputTextCallbackData *data) { + ImGui::InputText("hex.builtin.view.strings.filter"_lang, this->m_filter.data(), this->m_filter.capacity(), ImGuiInputTextFlags_CallbackEdit, [](ImGuiInputTextCallbackData *data) { auto &view = *static_cast(data->UserData); view.m_filter.resize(data->BufTextLen); view.m_filterIndices.clear(); @@ -133,20 +133,20 @@ namespace hex { return 0; }, this); if (this->m_regex && !this->m_pattern_parsed) { - ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "hex.view.strings.regex_error"_lang); + ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "hex.builtin.view.strings.regex_error"_lang); } - if (ImGui::Button("hex.view.strings.extract"_lang)) + if (ImGui::Button("hex.builtin.view.strings.extract"_lang)) this->searchStrings(); }, this->m_searching); if (this->m_searching) { ImGui::SameLine(); - ImGui::TextSpinner("hex.view.strings.searching"_lang); + ImGui::TextSpinner("hex.builtin.view.strings.searching"_lang); } else if (this->m_foundStrings.size() > 0) { ImGui::SameLine(); - ImGui::TextUnformatted(hex::format("hex.view.strings.results"_lang, this->m_filterIndices.size()).c_str()); + ImGui::TextUnformatted(hex::format("hex.builtin.view.strings.results"_lang, this->m_filterIndices.size()).c_str()); } @@ -157,9 +157,9 @@ namespace hex { ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY)) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.strings.offset"_lang, 0, -1, ImGui::GetID("offset")); - ImGui::TableSetupColumn("hex.view.strings.size"_lang, 0, -1, ImGui::GetID("size")); - ImGui::TableSetupColumn("hex.view.strings.string"_lang, 0, -1, ImGui::GetID("string")); + ImGui::TableSetupColumn("hex.builtin.view.strings.offset"_lang, 0, -1, ImGui::GetID("offset")); + ImGui::TableSetupColumn("hex.builtin.view.strings.size"_lang, 0, -1, ImGui::GetID("size")); + ImGui::TableSetupColumn("hex.builtin.view.strings.string"_lang, 0, -1, ImGui::GetID("string")); auto sortSpecs = ImGui::TableGetSortSpecs(); @@ -224,13 +224,13 @@ namespace hex { } ImGui::End(); - if (ImGui::BeginPopup("hex.view.strings.demangle.title"_lang)) { + if (ImGui::BeginPopup("hex.builtin.view.strings.demangle.title"_lang)) { if (ImGui::BeginChild("##scrolling", ImVec2(500, 150))) { - ImGui::TextUnformatted("hex.view.strings.demangle.title"_lang); + ImGui::TextUnformatted("hex.builtin.view.strings.demangle.title"_lang); ImGui::Separator(); ImGui::TextWrapped("%s", this->m_demangledName.c_str()); ImGui::NewLine(); - if (ImGui::Button("hex.view.strings.demangle.copy"_lang)) + if (ImGui::Button("hex.builtin.view.strings.demangle.copy"_lang)) ImGui::SetClipboardText(this->m_demangledName.c_str()); } diff --git a/source/views/view_tools.cpp b/plugins/builtin/source/content/views/view_tools.cpp similarity index 58% rename from source/views/view_tools.cpp rename to plugins/builtin/source/content/views/view_tools.cpp index e62129b55..096df0404 100644 --- a/source/views/view_tools.cpp +++ b/plugins/builtin/source/content/views/view_tools.cpp @@ -1,15 +1,15 @@ -#include "views/view_tools.hpp" +#include "content/views/view_tools.hpp" #include -namespace hex { +namespace hex::plugin::builtin { - ViewTools::ViewTools() : View("hex.view.tools.name") { } + ViewTools::ViewTools() : View("hex.builtin.view.tools.name") { } ViewTools::~ViewTools() { } void ViewTools::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.tools.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.tools.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { for (const auto& [name, function] : ContentRegistry::Tools::getEntries()) { if (ImGui::CollapsingHeader(LangEntry(name))) { function(); diff --git a/source/views/view_yara.cpp b/plugins/builtin/source/content/views/view_yara.cpp similarity index 87% rename from source/views/view_yara.cpp rename to plugins/builtin/source/content/views/view_yara.cpp index 16ef7f410..42fb49b64 100644 --- a/source/views/view_yara.cpp +++ b/plugins/builtin/source/content/views/view_yara.cpp @@ -1,4 +1,4 @@ -#include "views/view_yara.hpp" +#include "content/views/view_yara.hpp" #include #include @@ -12,11 +12,11 @@ #include #include -namespace hex { +namespace hex::plugin::builtin { namespace fs = std::filesystem; - ViewYara::ViewYara() : View("hex.view.yara.name") { + ViewYara::ViewYara() : View("hex.builtin.view.yara.name") { yr_initialize(); this->reloadRules(); @@ -27,23 +27,23 @@ namespace hex { } void ViewYara::drawContent() { - if (ImGui::Begin(View::toWindowName("hex.view.yara.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { + if (ImGui::Begin(View::toWindowName("hex.builtin.view.yara.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) { if (!this->m_matching && !this->m_errorMessage.empty()) { - View::showErrorPopup("hex.view.yara.error"_lang + this->m_errorMessage.data()); + View::showErrorPopup("hex.builtin.view.yara.error"_lang + this->m_errorMessage.data()); this->m_errorMessage.clear(); } - ImGui::TextUnformatted("hex.view.yara.header.rules"_lang); + ImGui::TextUnformatted("hex.builtin.view.yara.header.rules"_lang); ImGui::Separator(); if (this->m_rules.empty()) { - ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "%s", static_cast("hex.view.yara.no_rules"_lang)); + ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "%s", static_cast("hex.builtin.view.yara.no_rules"_lang)); - if (ImGui::Button("hex.view.yara.reload"_lang)) this->reloadRules(); + if (ImGui::Button("hex.builtin.view.yara.reload"_lang)) this->reloadRules(); } else { ImGui::Disabled([this]{ - if (ImGui::BeginCombo("hex.view.yara.header.rules"_lang, this->m_rules[this->m_selectedRule].first.c_str())) { + if (ImGui::BeginCombo("hex.builtin.view.yara.header.rules"_lang, this->m_rules[this->m_selectedRule].first.c_str())) { for (u32 i = 0; i < this->m_rules.size(); i++) { const bool selected = (this->m_selectedRule == i); if (ImGui::Selectable(this->m_rules[i].first.c_str(), selected)) @@ -55,24 +55,24 @@ namespace hex { ImGui::EndCombo(); } ImGui::SameLine(); - if (ImGui::Button("hex.view.yara.reload"_lang)) this->reloadRules(); - if (ImGui::Button("hex.view.yara.match"_lang)) this->applyRules(); + if (ImGui::Button("hex.builtin.view.yara.reload"_lang)) this->reloadRules(); + if (ImGui::Button("hex.builtin.view.yara.match"_lang)) this->applyRules(); }, this->m_matching); if (this->m_matching) { ImGui::SameLine(); - ImGui::TextSpinner("hex.view.yara.matching"_lang); + ImGui::TextSpinner("hex.builtin.view.yara.matching"_lang); } } ImGui::NewLine(); - ImGui::TextUnformatted("hex.view.yara.header.matches"_lang); + ImGui::TextUnformatted("hex.builtin.view.yara.header.matches"_lang); ImGui::Separator(); if (ImGui::BeginTable("matches", 4, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY)) { ImGui::TableSetupScrollFreeze(0, 1); - ImGui::TableSetupColumn("hex.view.yara.matches.identifier"_lang); - ImGui::TableSetupColumn("hex.view.yara.matches.variable"_lang); + ImGui::TableSetupColumn("hex.builtin.view.yara.matches.identifier"_lang); + ImGui::TableSetupColumn("hex.builtin.view.yara.matches.variable"_lang); ImGui::TableSetupColumn("hex.common.address"_lang); ImGui::TableSetupColumn("hex.common.size"_lang); @@ -103,7 +103,7 @@ namespace hex { ImGui::Text("0x%lX", size); } else { ImGui::TableNextColumn(); - ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "%s", static_cast("hex.view.yara.whole_data"_lang)); + ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "%s", static_cast("hex.builtin.view.yara.whole_data"_lang)); ImGui::TableNextColumn(); ImGui::TextUnformatted(""); } diff --git a/plugins/builtin/source/lang/de_DE.cpp b/plugins/builtin/source/lang/de_DE.cpp index 90f5e1b16..f5fae6e36 100644 --- a/plugins/builtin/source/lang/de_DE.cpp +++ b/plugins/builtin/source/lang/de_DE.cpp @@ -23,6 +23,7 @@ namespace hex::plugin::builtin { { "hex.welcome.start.open_file", "Datei Öffnen" }, { "hex.welcome.start.open_project", "Projekt Öffnen" }, { "hex.welcome.start.recent", "Kürzlich geöffnet" }, + { "hex.welcome.start.open_other", "Andere Provider" }, { "hex.welcome.header.help", "Hilfe" }, { "hex.welcome.help.repo", "GitHub Repository" }, { "hex.welcome.help.repo.link", "https://github.com/WerWolv/ImHex" }, @@ -86,250 +87,257 @@ namespace hex::plugin::builtin { { "hex.message.yara_rule_added", "Yara Regel hinzugefügt!" }, { "hex.message.magic_db_added", "Magic Datenbank hinzugefügt!" }, - { "hex.view.bookmarks.name", "Lesezeichen" }, - { "hex.view.bookmarks.default_title", "Lesezeichen [0x{0:X} - 0x{1:X}]" }, - { "hex.view.bookmarks.no_bookmarks", "Noch kein Lesezeichen erstellt. Füge eines hinzu mit Bearbeiten -> Lesezeichen erstellen" }, - { "hex.view.bookmarks.title.info", "Informationen" }, - { "hex.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} bytes)" }, - { "hex.view.bookmarks.button.jump", "Springen" }, - { "hex.view.bookmarks.button.remove", "Entfernen" }, - { "hex.view.bookmarks.header.name", "Name" }, - { "hex.view.bookmarks.header.color", "Farbe" }, - { "hex.view.bookmarks.header.comment", "Kommentar" }, + /* Builtin plugin features */ - { "hex.view.command_palette.name", "Befehlspalette" }, + { "hex.builtin.view.bookmarks.name", "Lesezeichen" }, + { "hex.builtin.view.bookmarks.default_title", "Lesezeichen [0x{0:X} - 0x{1:X}]" }, + { "hex.builtin.view.bookmarks.no_bookmarks", "Noch kein Lesezeichen erstellt. Füge eines hinzu mit Bearbeiten -> Lesezeichen erstellen" }, + { "hex.builtin.view.bookmarks.title.info", "Informationen" }, + { "hex.builtin.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} bytes)" }, + { "hex.builtin.view.bookmarks.button.jump", "Springen" }, + { "hex.builtin.view.bookmarks.button.remove", "Entfernen" }, + { "hex.builtin.view.bookmarks.header.name", "Name" }, + { "hex.builtin.view.bookmarks.header.color", "Farbe" }, + { "hex.builtin.view.bookmarks.header.comment", "Kommentar" }, - { "hex.view.data_inspector.name", "Dateninspektor" }, - { "hex.view.data_inspector.table.name", "Name" }, - { "hex.view.data_inspector.table.value", "Wert" }, - { "hex.view.data_inspector.no_data", "Keine bytes angewählt"}, + { "hex.builtin.view.command_palette.name", "Befehlspalette" }, - { "hex.view.data_processor.name", "Datenprozessor" }, - { "hex.view.data_processor.menu.remove_selection", "Auswahl entfernen" }, - { "hex.view.data_processor.menu.remove_node", "Knoten entfernen" }, - { "hex.view.data_processor.menu.remove_link", "Link entfernen" }, + { "hex.builtin.view.data_inspector.name", "Dateninspektor" }, + { "hex.builtin.view.data_inspector.table.name", "Name" }, + { "hex.builtin.view.data_inspector.table.value", "Wert" }, + { "hex.builtin.view.data_inspector.no_data", "Keine bytes angewählt"}, - { "hex.view.disassembler.name", "Disassembler" }, - { "hex.view.disassembler.position", "Position" }, - { "hex.view.disassembler.base", "Basisadresse" }, - { "hex.view.disassembler.region", "Code Region" }, - { "hex.view.disassembler.settings.header", "Einstellungen" }, - { "hex.view.disassembler.arch", "Architektur" }, - { "hex.view.disassembler.arm.arm", "ARM Modus" }, - { "hex.view.disassembler.arm.thumb", "Thumb Modus" }, - { "hex.view.disassembler.arm.default", "Standard Modus" }, - { "hex.view.disassembler.arm.cortex_m", "Cortex-M Modus" }, - { "hex.view.disassembler.arm.armv8", "ARMv8 Modus" }, + { "hex.builtin.view.data_processor.name", "Datenprozessor" }, + { "hex.builtin.view.data_processor.menu.remove_selection", "Auswahl entfernen" }, + { "hex.builtin.view.data_processor.menu.remove_node", "Knoten entfernen" }, + { "hex.builtin.view.data_processor.menu.remove_link", "Link entfernen" }, - { "hex.view.disassembler.mips.mips32", "MIPS32 Modus" }, - { "hex.view.disassembler.mips.mips64", "MIPS64 Modus" }, - { "hex.view.disassembler.mips.mips32R6", "MIPS32R6 Modus" }, - { "hex.view.disassembler.mips.micro", "Micro Modus" }, + { "hex.builtin.view.disassembler.name", "Disassembler" }, + { "hex.builtin.view.disassembler.position", "Position" }, + { "hex.builtin.view.disassembler.base", "Basisadresse" }, + { "hex.builtin.view.disassembler.region", "Code Region" }, + { "hex.builtin.view.disassembler.settings.header", "Einstellungen" }, + { "hex.builtin.view.disassembler.arch", "Architektur" }, + { "hex.builtin.view.disassembler.arm.arm", "ARM Modus" }, + { "hex.builtin.view.disassembler.arm.thumb", "Thumb Modus" }, + { "hex.builtin.view.disassembler.arm.default", "Standard Modus" }, + { "hex.builtin.view.disassembler.arm.cortex_m", "Cortex-M Modus" }, + { "hex.builtin.view.disassembler.arm.armv8", "ARMv8 Modus" }, - { "hex.view.disassembler.x86.16bit", "16-bit Modus" }, - { "hex.view.disassembler.x86.32bit", "32-bit Modus" }, - { "hex.view.disassembler.x86.64bit", "64-bit Modus" }, + { "hex.builtin.view.disassembler.mips.mips32", "MIPS32 Modus" }, + { "hex.builtin.view.disassembler.mips.mips64", "MIPS64 Modus" }, + { "hex.builtin.view.disassembler.mips.mips32R6", "MIPS32R6 Modus" }, + { "hex.builtin.view.disassembler.mips.micro", "Micro Modus" }, - { "hex.view.disassembler.ppc.32bit", "32-bit Modus" }, - { "hex.view.disassembler.ppc.64bit", "64-bit Modus" }, + { "hex.builtin.view.disassembler.x86.16bit", "16-bit Modus" }, + { "hex.builtin.view.disassembler.x86.32bit", "32-bit Modus" }, + { "hex.builtin.view.disassembler.x86.64bit", "64-bit Modus" }, - { "hex.view.disassembler.sparc.v9", "Sparc V9 Modus" }, + { "hex.builtin.view.disassembler.ppc.32bit", "32-bit Modus" }, + { "hex.builtin.view.disassembler.ppc.64bit", "64-bit Modus" }, - { "hex.view.disassembler.disassemble", "Disassemble" }, - { "hex.view.disassembler.disassembling", "Disassemblen..." }, - { "hex.view.disassembler.disassembly.title", "Disassembly" }, - { "hex.view.disassembler.disassembly.address", "Adresse" }, - { "hex.view.disassembler.disassembly.offset", "Offset" }, - { "hex.view.disassembler.disassembly.bytes", "Byte" }, + { "hex.builtin.view.disassembler.sparc.v9", "Sparc V9 Modus" }, - { "hex.view.hashes.name", "Hashes" }, - { "hex.view.hashes.settings", "Einstellungen" }, - { "hex.view.hashes.function", "Hash Funktion" }, - { "hex.view.hashes.iv", "Startwert" }, - { "hex.view.hashes.poly", "Polynomial" }, - { "hex.view.hashes.result", "Resultat" }, + { "hex.builtin.view.disassembler.disassemble", "Disassemble" }, + { "hex.builtin.view.disassembler.disassembling", "Disassemblen..." }, + { "hex.builtin.view.disassembler.disassembly.title", "Disassembly" }, + { "hex.builtin.view.disassembler.disassembly.address", "Adresse" }, + { "hex.builtin.view.disassembler.disassembly.offset", "Offset" }, + { "hex.builtin.view.disassembler.disassembly.bytes", "Byte" }, - { "hex.view.help.name", "Hilfe" }, - { "hex.view.help.about.name", "Über ImHex" }, - { "hex.view.help.about.translator", "Von WerWolv übersetzt" }, - { "hex.view.help.about.source", "Quellcode auf GitHub verfügbar:" }, - { "hex.view.help.about.donations", "Spenden" }, - { "hex.view.help.about.thanks", "Wenn dir meine Arbeit gefällt, bitte ziehe eine Spende in Betracht, um das Projekt am Laufen zu halten. Vielen Dank <3" }, - { "hex.view.help.about.libs", "Benutzte Libraries" }, - { "hex.view.help.about.paths", "ImHex Ordner" }, - { "hex.view.help.documentation", "ImHex Dokumentation" }, - { "hex.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"}, - { "hex.view.help.calc_cheat_sheet", "Rechner Cheat Sheet" }, + { "hex.builtin.view.hashes.name", "Hashes" }, + { "hex.builtin.view.hashes.settings", "Einstellungen" }, + { "hex.builtin.view.hashes.function", "Hash Funktion" }, + { "hex.builtin.view.hashes.iv", "Startwert" }, + { "hex.builtin.view.hashes.poly", "Polynomial" }, + { "hex.builtin.view.hashes.result", "Resultat" }, - { "hex.view.hexeditor.name", "Hex editor" }, - { "hex.view.hexeditor.create_file", "Neu" }, - { "hex.view.hexeditor.open_file", "Öffnen" }, - { "hex.view.hexeditor.open_project", "Projekt öffnen" }, - { "hex.view.hexeditor.save_project", "Projekt speichern" }, - { "hex.view.hexeditor.save_data", "Daten speichern" }, - { "hex.view.hexeditor.open_base64", "Base64 Datei öffnen" }, - { "hex.view.hexeditor.load_enconding_file", "Custom encoding Datei laden" }, - { "hex.view.hexeditor.page", "Seite {0} / {1}" }, - { "hex.view.hexeditor.save_as", "Speichern unter" }, - { "hex.view.hexeditor.exit_application.title", "Applikation verlassen?" }, - { "hex.view.hexeditor.exit_application.desc", "Es wurden ungespeicherte Änderungen an diesem Projekt vorgenommen\nBist du sicher, dass du ImHex schliessen willst?" }, - { "hex.view.hexeditor.script.title", "Datei mit Loader Skript laden" }, - { "hex.view.hexeditor.script.desc", "Lade eine Datei mit Hilfe eines Python Skriptes" }, - { "hex.view.hexeditor.script.script", "Skript" }, - { "hex.view.hexeditor.script.script.title", "Loader Script: Skript öffnen" }, - { "hex.view.hexeditor.script.file", "Datei" }, - { "hex.view.hexeditor.script.file.title", "Loader Script: Datei öffnen" }, + { "hex.builtin.view.help.name", "Hilfe" }, + { "hex.builtin.view.help.about.name", "Über ImHex" }, + { "hex.builtin.view.help.about.translator", "Von WerWolv übersetzt" }, + { "hex.builtin.view.help.about.source", "Quellcode auf GitHub verfügbar:" }, + { "hex.builtin.view.help.about.donations", "Spenden" }, + { "hex.builtin.view.help.about.thanks", "Wenn dir meine Arbeit gefällt, bitte ziehe eine Spende in Betracht, um das Projekt am Laufen zu halten. Vielen Dank <3" }, + { "hex.builtin.view.help.about.libs", "Benutzte Libraries" }, + { "hex.builtin.view.help.about.paths", "ImHex Ordner" }, + { "hex.builtin.view.help.documentation", "ImHex Dokumentation" }, + { "hex.builtin.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"}, + { "hex.builtin.view.help.calc_cheat_sheet", "Rechner Cheat Sheet" }, - { "hex.view.hexeditor.menu.file.open_file", "Datei öffnen..." }, - { "hex.view.hexeditor.menu.file.open_recent", "Kürzlich geöffnete Dateien"}, - { "hex.view.hexeditor.menu.file.save", "Speichern" }, - { "hex.view.hexeditor.menu.file.save_as", "Speichern unter..." }, - { "hex.view.hexeditor.menu.file.close", "Schliessen" }, - { "hex.view.hexeditor.menu.file.quit", "ImHex Beenden" }, - { "hex.view.hexeditor.menu.file.open_project", "Projekt öffnen..." }, - { "hex.view.hexeditor.menu.file.save_project", "Projekt speichern..." }, - { "hex.view.hexeditor.menu.file.load_encoding_file", "Custom encoding laden..." }, - { "hex.view.hexeditor.menu.file.import", "Importieren..." }, - { "hex.view.hexeditor.menu.file.import.base64", "Base64 Datei" }, - { "hex.view.hexeditor.base64.import_error", "Datei ist nicht in einem korrekten Base64 Format!" }, - { "hex.view.hexeditor.file_open_error", "Öffnen der Datei fehlgeschlagen!" }, - { "hex.view.hexeditor.menu.file.import.ips", "IPS Patch" }, - { "hex.view.hexeditor.menu.file.import.ips32", "IPS32 Patch" }, - { "hex.view.hexeditor.menu.file.import.script", "Datei mit Loader Script" }, + { "hex.builtin.view.hexeditor.name", "Hex editor" }, + { "hex.builtin.view.hexeditor.create_file", "Neu" }, + { "hex.builtin.view.hexeditor.open_file", "Öffnen" }, + { "hex.builtin.view.hexeditor.open_project", "Projekt öffnen" }, + { "hex.builtin.view.hexeditor.save_project", "Projekt speichern" }, + { "hex.builtin.view.hexeditor.save_data", "Daten speichern" }, + { "hex.builtin.view.hexeditor.open_base64", "Base64 Datei öffnen" }, + { "hex.builtin.view.hexeditor.load_enconding_file", "Custom encoding Datei laden" }, + { "hex.builtin.view.hexeditor.page", "Seite {0} / {1}" }, + { "hex.builtin.view.hexeditor.save_as", "Speichern unter" }, + { "hex.builtin.view.hexeditor.exit_application.title", "Applikation verlassen?" }, + { "hex.builtin.view.hexeditor.exit_application.desc", "Es wurden ungespeicherte Änderungen an diesem Projekt vorgenommen\nBist du sicher, dass du ImHex schliessen willst?" }, + { "hex.builtin.view.hexeditor.script.title", "Datei mit Loader Skript laden" }, + { "hex.builtin.view.hexeditor.script.desc", "Lade eine Datei mit Hilfe eines Python Skriptes" }, + { "hex.builtin.view.hexeditor.script.script", "Skript" }, + { "hex.builtin.view.hexeditor.script.script.title", "Loader Script: Skript öffnen" }, + { "hex.builtin.view.hexeditor.script.file", "Datei" }, + { "hex.builtin.view.hexeditor.script.file.title", "Loader Script: Datei öffnen" }, - { "hex.view.hexeditor.menu.file.export", "Exportieren..." }, - { "hex.view.hexeditor.menu.file.export.title", "Datei exportieren" }, - { "hex.view.hexeditor.menu.file.export.ips", "IPS Patch" }, - { "hex.view.hexeditor.menu.file.export.ips32", "IPS32 Patch" }, - { "hex.view.hexeditor.menu.file.search", "Suchen" }, - { "hex.view.hexeditor.search.string", "String" }, - { "hex.view.hexeditor.search.hex", "Hex" }, - { "hex.view.hexeditor.search.find", "Suchen" }, - { "hex.view.hexeditor.search.find_next", "Nächstes" }, - { "hex.view.hexeditor.search.find_prev", "Vorheriges" }, - { "hex.view.hexeditor.menu.file.goto", "Sprung" }, - { "hex.view.hexeditor.goto.offset.absolute", "Absolut" }, - { "hex.view.hexeditor.goto.offset.current", "Momentan" }, - { "hex.view.hexeditor.goto.offset.begin", "Beginn" }, - { "hex.view.hexeditor.goto.offset.end", "Ende" }, - { "hex.view.hexeditor.error.read_only", "Schreibzugriff konnte nicht erlangt werden. Datei wurde im Lesemodus geöffnet." }, - { "hex.view.hexeditor.error.open", "Öffnen der Datei fehlgeschlagen!" }, - { "hex.view.hexeditor.error.create", "Erstellen der neuen Datei fehlgeschlagen!" }, - { "hex.view.hexeditor.menu.edit.undo", "Rückgängig" }, - { "hex.view.hexeditor.menu.edit.redo", "Wiederholen" }, - { "hex.view.hexeditor.menu.edit.copy", "Kopieren" }, - { "hex.view.hexeditor.menu.edit.copy_as", "Kopieren als..." }, - { "hex.view.hexeditor.copy.hex", "String" }, - { "hex.view.hexeditor.copy.c", "C Array" }, - { "hex.view.hexeditor.copy.cpp", "C++ Array" }, - { "hex.view.hexeditor.copy.csharp", "C# Array" }, - { "hex.view.hexeditor.copy.rust", "Rust Array" }, - { "hex.view.hexeditor.copy.python", "Python Array" }, - { "hex.view.hexeditor.copy.java", "Java Array" }, - { "hex.view.hexeditor.copy.js", "JavaScript Array" }, - { "hex.view.hexeditor.copy.ascii", "ASCII Art" }, - { "hex.view.hexeditor.copy.html", "HTML" }, - { "hex.view.hexeditor.menu.edit.paste", "Einfügen" }, - { "hex.view.hexeditor.menu.edit.select_all", "Alles auswählen" }, - { "hex.view.hexeditor.menu.edit.bookmark", "Lesezeichen erstellen" }, - { "hex.view.hexeditor.menu.edit.set_base", "Basisadresse setzen" }, - { "hex.view.hexeditor.menu.edit.resize", "Grösse ändern" }, + { "hex.builtin.view.hexeditor.menu.file.open_file", "Datei öffnen..." }, + { "hex.builtin.view.hexeditor.menu.file.open_recent", "Kürzlich geöffnete Dateien"}, + { "hex.builtin.view.hexeditor.menu.file.save", "Speichern" }, + { "hex.builtin.view.hexeditor.menu.file.save_as", "Speichern unter..." }, + { "hex.builtin.view.hexeditor.menu.file.close", "Schliessen" }, + { "hex.builtin.view.hexeditor.menu.file.quit", "ImHex Beenden" }, + { "hex.builtin.view.hexeditor.menu.file.open_project", "Projekt öffnen..." }, + { "hex.builtin.view.hexeditor.menu.file.save_project", "Projekt speichern..." }, + { "hex.builtin.view.hexeditor.menu.file.load_encoding_file", "Custom encoding laden..." }, + { "hex.builtin.view.hexeditor.menu.file.import", "Importieren..." }, + { "hex.builtin.view.hexeditor.menu.file.import.base64", "Base64 Datei" }, + { "hex.builtin.view.hexeditor.base64.import_error", "Datei ist nicht in einem korrekten Base64 Format!" }, + { "hex.builtin.view.hexeditor.file_open_error", "Öffnen der Datei fehlgeschlagen!" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips", "IPS Patch" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips32", "IPS32 Patch" }, + { "hex.builtin.view.hexeditor.menu.file.import.script", "Datei mit Loader Script" }, - { "hex.view.information.name", "Dateninformationen" }, - { "hex.view.information.control", "Einstellungen" }, - { "hex.view.information.analyze", "Seite analysieren" }, - { "hex.view.information.analyzing", "Analysieren..." }, - { "hex.view.information.region", "Analysierte Region" }, - { "hex.view.information.magic", "Magic Informationen" }, - { "hex.view.information.description", "Beschreibung:" }, - { "hex.view.information.mime", "MIME Typ:" }, - { "hex.view.information.info_analysis", "Informationsanalysis" }, - { "hex.view.information.distribution", "Byte Verteilung" }, - { "hex.view.information.entropy", "Entropie" }, - { "hex.view.information.block_size", "Blockgrösse" }, - { "hex.view.information.block_size.desc", "{0} Blöcke min {1} bytes" }, - { "hex.view.information.file_entropy", "Dateientropie" }, - { "hex.view.information.highest_entropy", "Höchste Blockentropie" }, - { "hex.view.information.encrypted", "Diese Daten sind vermutlich verschlüsselt oder komprimiert!" }, + { "hex.builtin.view.hexeditor.menu.file.export", "Exportieren..." }, + { "hex.builtin.view.hexeditor.menu.file.export.title", "Datei exportieren" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips", "IPS Patch" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips32", "IPS32 Patch" }, + { "hex.builtin.view.hexeditor.menu.file.search", "Suchen" }, + { "hex.builtin.view.hexeditor.search.string", "String" }, + { "hex.builtin.view.hexeditor.search.hex", "Hex" }, + { "hex.builtin.view.hexeditor.search.find", "Suchen" }, + { "hex.builtin.view.hexeditor.search.find_next", "Nächstes" }, + { "hex.builtin.view.hexeditor.search.find_prev", "Vorheriges" }, + { "hex.builtin.view.hexeditor.menu.file.goto", "Sprung" }, + { "hex.builtin.view.hexeditor.goto.offset.absolute", "Absolut" }, + { "hex.builtin.view.hexeditor.goto.offset.current", "Momentan" }, + { "hex.builtin.view.hexeditor.goto.offset.begin", "Beginn" }, + { "hex.builtin.view.hexeditor.goto.offset.end", "Ende" }, + { "hex.builtin.view.hexeditor.error.read_only", "Schreibzugriff konnte nicht erlangt werden. Datei wurde im Lesemodus geöffnet." }, + { "hex.builtin.view.hexeditor.error.open", "Öffnen der Datei fehlgeschlagen!" }, + { "hex.builtin.view.hexeditor.error.create", "Erstellen der neuen Datei fehlgeschlagen!" }, + { "hex.builtin.view.hexeditor.menu.edit.undo", "Rückgängig" }, + { "hex.builtin.view.hexeditor.menu.edit.redo", "Wiederholen" }, + { "hex.builtin.view.hexeditor.menu.edit.copy", "Kopieren" }, + { "hex.builtin.view.hexeditor.menu.edit.copy_as", "Kopieren als..." }, + { "hex.builtin.view.hexeditor.copy.hex", "String" }, + { "hex.builtin.view.hexeditor.copy.c", "C Array" }, + { "hex.builtin.view.hexeditor.copy.cpp", "C++ Array" }, + { "hex.builtin.view.hexeditor.copy.csharp", "C# Array" }, + { "hex.builtin.view.hexeditor.copy.rust", "Rust Array" }, + { "hex.builtin.view.hexeditor.copy.python", "Python Array" }, + { "hex.builtin.view.hexeditor.copy.java", "Java Array" }, + { "hex.builtin.view.hexeditor.copy.js", "JavaScript Array" }, + { "hex.builtin.view.hexeditor.copy.ascii", "ASCII Art" }, + { "hex.builtin.view.hexeditor.copy.html", "HTML" }, + { "hex.builtin.view.hexeditor.menu.edit.paste", "Einfügen" }, + { "hex.builtin.view.hexeditor.menu.edit.select_all", "Alles auswählen" }, + { "hex.builtin.view.hexeditor.menu.edit.bookmark", "Lesezeichen erstellen" }, + { "hex.builtin.view.hexeditor.menu.edit.set_base", "Basisadresse setzen" }, + { "hex.builtin.view.hexeditor.menu.edit.resize", "Grösse ändern" }, - { "hex.view.patches.name", "Patches" }, - { "hex.view.patches.offset", "Offset" }, - { "hex.view.patches.orig", "Originalwert" }, - { "hex.view.patches.patch", "Patchwert"}, - { "hex.view.patches.remove", "Patch entfernen" }, + { "hex.builtin.view.information.name", "Dateninformationen" }, + { "hex.builtin.view.information.control", "Einstellungen" }, + { "hex.builtin.view.information.analyze", "Seite analysieren" }, + { "hex.builtin.view.information.analyzing", "Analysieren..." }, + { "hex.builtin.view.information.region", "Analysierte Region" }, + { "hex.builtin.view.information.magic", "Magic Informationen" }, + { "hex.builtin.view.information.description", "Beschreibung:" }, + { "hex.builtin.view.information.mime", "MIME Typ:" }, + { "hex.builtin.view.information.info_analysis", "Informationsanalysis" }, + { "hex.builtin.view.information.distribution", "Byte Verteilung" }, + { "hex.builtin.view.information.entropy", "Entropie" }, + { "hex.builtin.view.information.block_size", "Blockgrösse" }, + { "hex.builtin.view.information.block_size.desc", "{0} Blöcke min {1} bytes" }, + { "hex.builtin.view.information.file_entropy", "Dateientropie" }, + { "hex.builtin.view.information.highest_entropy", "Höchste Blockentropie" }, + { "hex.builtin.view.information.encrypted", "Diese Daten sind vermutlich verschlüsselt oder komprimiert!" }, - { "hex.view.pattern.name", "Pattern Editor" }, - { "hex.view.pattern.accept_pattern", "Pattern akzeptieren" }, - { "hex.view.pattern.accept_pattern.desc", "Ein oder mehrere kompatible Pattern wurden für diesen Dateityp gefunden" }, - { "hex.view.pattern.accept_pattern.pattern_language", "Pattern" }, - { "hex.view.pattern.accept_pattern.question", "Ausgewähltes Pattern anwenden?" }, - { "hex.view.pattern.menu.file.load_pattern", "Pattern laden..." }, - { "hex.view.pattern.open_pattern", "Pattern öffnen" }, - { "hex.view.pattern.evaluating", "Evaluieren..." }, - { "hex.view.pattern.auto", "Auto evaluieren" }, + { "hex.builtin.view.patches.name", "Patches" }, + { "hex.builtin.view.patches.offset", "Offset" }, + { "hex.builtin.view.patches.orig", "Originalwert" }, + { "hex.builtin.view.patches.patch", "Patchwert"}, + { "hex.builtin.view.patches.remove", "Patch entfernen" }, - { "hex.view.pattern_data.name", "Pattern Daten" }, - { "hex.view.pattern_data.var_name", "Name" }, - { "hex.view.pattern_data.color", "Farbe" }, - { "hex.view.pattern_data.offset", "Offset" }, - { "hex.view.pattern_data.size", "Grösse" }, - { "hex.view.pattern_data.type", "Typ" }, - { "hex.view.pattern_data.value", "Wert" }, + { "hex.builtin.view.pattern.name", "Pattern Editor" }, + { "hex.builtin.view.pattern.accept_pattern", "Pattern akzeptieren" }, + { "hex.builtin.view.pattern.accept_pattern.desc", "Ein oder mehrere kompatible Pattern wurden für diesen Dateityp gefunden" }, + { "hex.builtin.view.pattern.accept_pattern.pattern_language", "Pattern" }, + { "hex.builtin.view.pattern.accept_pattern.question", "Ausgewähltes Pattern anwenden?" }, + { "hex.builtin.view.pattern.menu.file.load_pattern", "Pattern laden..." }, + { "hex.builtin.view.pattern.open_pattern", "Pattern öffnen" }, + { "hex.builtin.view.pattern.evaluating", "Evaluieren..." }, + { "hex.builtin.view.pattern.auto", "Auto evaluieren" }, - { "hex.view.settings.name", "Einstellungen" }, + { "hex.builtin.view.pattern_data.name", "Pattern Daten" }, + { "hex.builtin.view.pattern_data.var_name", "Name" }, + { "hex.builtin.view.pattern_data.color", "Farbe" }, + { "hex.builtin.view.pattern_data.offset", "Offset" }, + { "hex.builtin.view.pattern_data.size", "Grösse" }, + { "hex.builtin.view.pattern_data.type", "Typ" }, + { "hex.builtin.view.pattern_data.value", "Wert" }, - { "hex.view.strings.name", "Strings" }, - { "hex.view.strings.copy", "String kopieren" }, - { "hex.view.strings.demangle", "Demangle" }, - { "hex.view.strings.min_length", "Minimallänge" }, - { "hex.view.strings.filter", "Filter" }, - { "hex.view.strings.extract", "Extrahieren" }, - { "hex.view.strings.regex_error", "Ungültiges Regex" }, - { "hex.view.strings.results", "{0} Ergebnisse" }, - { "hex.view.strings.searching", "Suchen..." }, - { "hex.view.strings.offset", "Offset" }, - { "hex.view.strings.size", "Grösse" }, - { "hex.view.strings.string", "String" }, - { "hex.view.strings.demangle.title", "Demangled Namen" }, - { "hex.view.strings.demangle.copy", "Kopieren" }, + { "hex.builtin.view.settings.name", "Einstellungen" }, - { "hex.view.tools.name", "Werkzeuge" }, + { "hex.builtin.view.strings.name", "Strings" }, + { "hex.builtin.view.strings.copy", "String kopieren" }, + { "hex.builtin.view.strings.demangle", "Demangle" }, + { "hex.builtin.view.strings.min_length", "Minimallänge" }, + { "hex.builtin.view.strings.filter", "Filter" }, + { "hex.builtin.view.strings.extract", "Extrahieren" }, + { "hex.builtin.view.strings.regex_error", "Ungültiges Regex" }, + { "hex.builtin.view.strings.results", "{0} Ergebnisse" }, + { "hex.builtin.view.strings.searching", "Suchen..." }, + { "hex.builtin.view.strings.offset", "Offset" }, + { "hex.builtin.view.strings.size", "Grösse" }, + { "hex.builtin.view.strings.string", "String" }, + { "hex.builtin.view.strings.demangle.title", "Demangled Namen" }, + { "hex.builtin.view.strings.demangle.copy", "Kopieren" }, - { "hex.view.yara.name", "Yara Regeln" }, - { "hex.view.yara.header.rules", "Regeln" }, - { "hex.view.yara.reload", "Neu laden" }, - { "hex.view.yara.match", "Regeln anwenden" }, - { "hex.view.yara.matching", "Anwenden..." }, - { "hex.view.yara.error", "Yara Kompilerfehler: " }, - { "hex.view.yara.header.matches", "Funde" }, - { "hex.view.yara.matches.identifier", "Kennung" }, - { "hex.view.yara.matches.variable", "Variabel" }, - { "hex.view.yara.whole_data", "Gesammte Daten Übereinstimmung!" }, - { "hex.view.yara.no_rules", "Keine Yara Regeln gefunden. Platziere sie in ImHex's 'yara' Ordner" }, + { "hex.builtin.view.tools.name", "Werkzeuge" }, - { "hex.view.constants.name", "Konstanten" }, - { "hex.view.constants.row.category", "Kategorie" }, - { "hex.view.constants.row.name", "Name" }, - { "hex.view.constants.row.desc", "Beschreibung" }, - { "hex.view.constants.row.value", "Wert" }, + { "hex.builtin.view.yara.name", "Yara Regeln" }, + { "hex.builtin.view.yara.header.rules", "Regeln" }, + { "hex.builtin.view.yara.reload", "Neu laden" }, + { "hex.builtin.view.yara.match", "Regeln anwenden" }, + { "hex.builtin.view.yara.matching", "Anwenden..." }, + { "hex.builtin.view.yara.error", "Yara Kompilerfehler: " }, + { "hex.builtin.view.yara.header.matches", "Funde" }, + { "hex.builtin.view.yara.matches.identifier", "Kennung" }, + { "hex.builtin.view.yara.matches.variable", "Variabel" }, + { "hex.builtin.view.yara.whole_data", "Gesammte Daten Übereinstimmung!" }, + { "hex.builtin.view.yara.no_rules", "Keine Yara Regeln gefunden. Platziere sie in ImHex's 'yara' Ordner" }, - { "hex.view.store.name", "Content Store" }, - { "hex.view.store.desc", "Downloade zusätzlichen Content von ImHex's online Datenbank" }, - { "hex.view.store.reload", "Neu laden" }, - { "hex.view.store.row.name", "Name" }, - { "hex.view.store.row.description", "Beschreibung" }, - { "hex.view.store.download", "Download" }, - { "hex.view.store.update", "Update" }, - { "hex.view.store.remove", "Entfernen" }, - { "hex.view.store.tab.patterns", "Patterns" }, - { "hex.view.store.tab.libraries", "Libraries" }, - { "hex.view.store.tab.magics", "Magic Files" }, - { "hex.view.store.tab.constants", "Konstanten" }, - { "hex.view.store.tab.yara", "Yara Rules" }, - { "hex.view.store.loading", "Store inhalt wird geladen..." }, - { "hex.view.diff.name", "Diffing" }, + { "hex.builtin.view.constants.name", "Konstanten" }, + { "hex.builtin.view.constants.row.category", "Kategorie" }, + { "hex.builtin.view.constants.row.name", "Name" }, + { "hex.builtin.view.constants.row.desc", "Beschreibung" }, + { "hex.builtin.view.constants.row.value", "Wert" }, - /* Builtin plugin features */ + { "hex.builtin.view.store.name", "Content Store" }, + { "hex.builtin.view.store.desc", "Downloade zusätzlichen Content von ImHex's online Datenbank" }, + { "hex.builtin.view.store.reload", "Neu laden" }, + { "hex.builtin.view.store.row.name", "Name" }, + { "hex.builtin.view.store.row.description", "Beschreibung" }, + { "hex.builtin.view.store.download", "Download" }, + { "hex.builtin.view.store.update", "Update" }, + { "hex.builtin.view.store.remove", "Entfernen" }, + { "hex.builtin.view.store.tab.patterns", "Patterns" }, + { "hex.builtin.view.store.tab.libraries", "Libraries" }, + { "hex.builtin.view.store.tab.magics", "Magic Files" }, + { "hex.builtin.view.store.tab.constants", "Konstanten" }, + { "hex.builtin.view.store.tab.yara", "Yara Rules" }, + { "hex.builtin.view.store.loading", "Store inhalt wird geladen..." }, + { "hex.builtin.view.diff.name", "Diffing" }, + + { "hex.builtin.view.gdb.name", "GDB Provider" }, + { "hex.builtin.view.gdb.settings", "Einstellungen" }, + { "hex.builtin.view.gdb.ip", "IP Adresse" }, + { "hex.builtin.view.gdb.port", "Port" }, + { "hex.builtin.view.gdb.connect", "Verbinden" }, + { "hex.builtin.view.gdb.disconnect", "Trennen" }, { "hex.builtin.command.calc.desc", "Rechner" }, { "hex.builtin.command.cmd.desc", "Command" }, @@ -665,6 +673,10 @@ namespace hex::plugin::builtin { { "hex.builtin.provider.file.creation", "Erstellungszeit" }, { "hex.builtin.provider.file.access", "Letzte Zugriffszeit" }, { "hex.builtin.provider.file.modification", "Letzte Modifikationszeit" }, + + { "hex.builtin.provider.file", "Datei Provider" }, + { "hex.builtin.provider.gdb", "GDB Server Provider" }, + { "hex.builtin.provider.gdb.name", "GDB Server <{0}:{1}>" }, }); } diff --git a/plugins/builtin/source/lang/en_US.cpp b/plugins/builtin/source/lang/en_US.cpp index b7cf4eb2d..dede1a470 100644 --- a/plugins/builtin/source/lang/en_US.cpp +++ b/plugins/builtin/source/lang/en_US.cpp @@ -23,6 +23,7 @@ namespace hex::plugin::builtin { { "hex.welcome.start.open_file", "Open File" }, { "hex.welcome.start.open_project", "Open Project" }, { "hex.welcome.start.recent", "Recent Files" }, + { "hex.welcome.start.open_other", "Other Providers" }, { "hex.welcome.header.help", "Help" }, { "hex.welcome.help.repo", "GitHub Repository" }, { "hex.welcome.help.repo.link", "https://github.com/WerWolv/ImHex" }, @@ -86,254 +87,260 @@ namespace hex::plugin::builtin { { "hex.message.yara_rule_added", "Yara rule added!" }, { "hex.message.magic_db_added", "Magic database added!" }, - { "hex.view.bookmarks.name", "Bookmarks" }, - { "hex.view.bookmarks.default_title", "Bookmark [0x{0:X} - 0x{1:X}]" }, - { "hex.view.bookmarks.no_bookmarks", "No bookmarks created yet. Add one with Edit -> Create Bookmark" }, - { "hex.view.bookmarks.title.info", "Information" }, - { "hex.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} bytes)" }, - { "hex.view.bookmarks.button.jump", "Jump to" }, - { "hex.view.bookmarks.button.remove", "Remove" }, - { "hex.view.bookmarks.header.name", "Name" }, - { "hex.view.bookmarks.header.color", "Color" }, - { "hex.view.bookmarks.header.comment", "Comment" }, + /* Builtin plugin features */ - { "hex.view.command_palette.name", "Command Palette" }, + { "hex.builtin.view.bookmarks.name", "Bookmarks" }, + { "hex.builtin.view.bookmarks.default_title", "Bookmark [0x{0:X} - 0x{1:X}]" }, + { "hex.builtin.view.bookmarks.no_bookmarks", "No bookmarks created yet. Add one with Edit -> Create Bookmark" }, + { "hex.builtin.view.bookmarks.title.info", "Information" }, + { "hex.builtin.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} bytes)" }, + { "hex.builtin.view.bookmarks.button.jump", "Jump to" }, + { "hex.builtin.view.bookmarks.button.remove", "Remove" }, + { "hex.builtin.view.bookmarks.header.name", "Name" }, + { "hex.builtin.view.bookmarks.header.color", "Color" }, + { "hex.builtin.view.bookmarks.header.comment", "Comment" }, - { "hex.view.data_inspector.name", "Data Inspector" }, - { "hex.view.data_inspector.table.name", "Name" }, - { "hex.view.data_inspector.table.value", "Value" }, - { "hex.view.data_inspector.no_data", "No bytes selected"}, + { "hex.builtin.view.command_palette.name", "Command Palette" }, - { "hex.view.data_processor.name", "Data Processor" }, - { "hex.view.data_processor.menu.remove_selection", "Remove Selected" }, - { "hex.view.data_processor.menu.remove_node", "Remove Node" }, - { "hex.view.data_processor.menu.remove_link", "Remove Link" }, + { "hex.builtin.view.data_inspector.name", "Data Inspector" }, + { "hex.builtin.view.data_inspector.table.name", "Name" }, + { "hex.builtin.view.data_inspector.table.value", "Value" }, + { "hex.builtin.view.data_inspector.no_data", "No bytes selected"}, - { "hex.view.disassembler.name", "Disassembler" }, - { "hex.view.disassembler.position", "Position" }, - { "hex.view.disassembler.base", "Base address" }, - { "hex.view.disassembler.region", "Code region" }, - { "hex.view.disassembler.settings.header", "Settings" }, - { "hex.view.disassembler.arch", "Architecture" }, - { "hex.view.disassembler.arm.arm", "ARM mode" }, - { "hex.view.disassembler.arm.thumb", "Thumb mode" }, - { "hex.view.disassembler.arm.default", "Default mode" }, - { "hex.view.disassembler.arm.cortex_m", "Cortex-M mode" }, - { "hex.view.disassembler.arm.armv8", "ARMv8 mode" }, + { "hex.builtin.view.data_processor.name", "Data Processor" }, + { "hex.builtin.view.data_processor.menu.remove_selection", "Remove Selected" }, + { "hex.builtin.view.data_processor.menu.remove_node", "Remove Node" }, + { "hex.builtin.view.data_processor.menu.remove_link", "Remove Link" }, - { "hex.view.disassembler.mips.mips32", "MIPS32 mode" }, - { "hex.view.disassembler.mips.mips64", "MIPS64 mode" }, - { "hex.view.disassembler.mips.mips32R6", "MIPS32R6 mode" }, - { "hex.view.disassembler.mips.micro", "Micro mode" }, + { "hex.builtin.view.disassembler.name", "Disassembler" }, + { "hex.builtin.view.disassembler.position", "Position" }, + { "hex.builtin.view.disassembler.base", "Base address" }, + { "hex.builtin.view.disassembler.region", "Code region" }, + { "hex.builtin.view.disassembler.settings.header", "Settings" }, + { "hex.builtin.view.disassembler.arch", "Architecture" }, + { "hex.builtin.view.disassembler.arm.arm", "ARM mode" }, + { "hex.builtin.view.disassembler.arm.thumb", "Thumb mode" }, + { "hex.builtin.view.disassembler.arm.default", "Default mode" }, + { "hex.builtin.view.disassembler.arm.cortex_m", "Cortex-M mode" }, + { "hex.builtin.view.disassembler.arm.armv8", "ARMv8 mode" }, - { "hex.view.disassembler.x86.16bit", "16-bit mode" }, - { "hex.view.disassembler.x86.32bit", "32-bit mode" }, - { "hex.view.disassembler.x86.64bit", "64-bit mode" }, + { "hex.builtin.view.disassembler.mips.mips32", "MIPS32 mode" }, + { "hex.builtin.view.disassembler.mips.mips64", "MIPS64 mode" }, + { "hex.builtin.view.disassembler.mips.mips32R6", "MIPS32R6 mode" }, + { "hex.builtin.view.disassembler.mips.micro", "Micro mode" }, - { "hex.view.disassembler.ppc.32bit", "32-bit mode" }, - { "hex.view.disassembler.ppc.64bit", "64-bit mode" }, + { "hex.builtin.view.disassembler.x86.16bit", "16-bit mode" }, + { "hex.builtin.view.disassembler.x86.32bit", "32-bit mode" }, + { "hex.builtin.view.disassembler.x86.64bit", "64-bit mode" }, - { "hex.view.disassembler.sparc.v9", "Sparc V9 mode" }, + { "hex.builtin.view.disassembler.ppc.32bit", "32-bit mode" }, + { "hex.builtin.view.disassembler.ppc.64bit", "64-bit mode" }, - { "hex.view.disassembler.disassemble", "Disassemble" }, - { "hex.view.disassembler.disassembling", "Disassembling..." }, - { "hex.view.disassembler.disassembly.title", "Disassembly" }, - { "hex.view.disassembler.disassembly.address", "Address" }, - { "hex.view.disassembler.disassembly.offset", "Offset" }, - { "hex.view.disassembler.disassembly.bytes", "Byte" }, + { "hex.builtin.view.disassembler.sparc.v9", "Sparc V9 mode" }, - { "hex.view.hashes.name", "Hashes" }, - { "hex.view.hashes.settings", "Settings" }, - { "hex.view.hashes.function", "Hash function" }, - { "hex.view.hashes.iv", "Initial value" }, - { "hex.view.hashes.xorout", "Final XOR value" }, + { "hex.builtin.view.disassembler.disassemble", "Disassemble" }, + { "hex.builtin.view.disassembler.disassembling", "Disassembling..." }, + { "hex.builtin.view.disassembler.disassembly.title", "Disassembly" }, + { "hex.builtin.view.disassembler.disassembly.address", "Address" }, + { "hex.builtin.view.disassembler.disassembly.offset", "Offset" }, + { "hex.builtin.view.disassembler.disassembly.bytes", "Byte" }, + + { "hex.builtin.view.hashes.name", "Hashes" }, + { "hex.builtin.view.hashes.settings", "Settings" }, + { "hex.builtin.view.hashes.function", "Hash function" }, + { "hex.builtin.view.hashes.iv", "Initial value" }, + { "hex.builtin.view.hashes.xorout", "Final XOR value" }, { "hex.common.reflectIn", "Reflect input" }, { "hex.common.reflectOut", "Reflect output" }, - { "hex.view.hashes.poly", "Polynomial" }, - { "hex.view.hashes.result", "Result" }, + { "hex.builtin.view.hashes.poly", "Polynomial" }, + { "hex.builtin.view.hashes.result", "Result" }, - { "hex.view.help.name", "Help" }, - { "hex.view.help.about.name", "About" }, - { "hex.view.help.about.translator", "Translated by WerWolv" }, - { "hex.view.help.about.source", "Source code available on GitHub:" }, - { "hex.view.help.about.donations", "Donations" }, - { "hex.view.help.about.thanks", "If you like my work, please consider donating to keep the project going. Thanks a lot <3" }, - { "hex.view.help.about.libs", "Libraries used" }, - { "hex.view.help.about.paths", "ImHex Directories" }, - { "hex.view.help.documentation", "ImHex Documentation" }, - { "hex.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"}, - { "hex.view.help.calc_cheat_sheet", "Calculator Cheat Sheet" }, + { "hex.builtin.view.help.name", "Help" }, + { "hex.builtin.view.help.about.name", "About" }, + { "hex.builtin.view.help.about.translator", "Translated by WerWolv" }, + { "hex.builtin.view.help.about.source", "Source code available on GitHub:" }, + { "hex.builtin.view.help.about.donations", "Donations" }, + { "hex.builtin.view.help.about.thanks", "If you like my work, please consider donating to keep the project going. Thanks a lot <3" }, + { "hex.builtin.view.help.about.libs", "Libraries used" }, + { "hex.builtin.view.help.about.paths", "ImHex Directories" }, + { "hex.builtin.view.help.documentation", "ImHex Documentation" }, + { "hex.builtin.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"}, + { "hex.builtin.view.help.calc_cheat_sheet", "Calculator Cheat Sheet" }, - { "hex.view.hexeditor.name", "Hex editor" }, - { "hex.view.hexeditor.create_file", "New" }, - { "hex.view.hexeditor.open_file", "Open" }, - { "hex.view.hexeditor.open_project", "Open Project" }, - { "hex.view.hexeditor.save_project", "Save Project" }, - { "hex.view.hexeditor.save_data", "Save Data" }, - { "hex.view.hexeditor.open_base64", "Open Base64 File" }, - { "hex.view.hexeditor.load_enconding_file", "Load custom encoding File" }, - { "hex.view.hexeditor.page", "Page {0} / {1}" }, - { "hex.view.hexeditor.save_as", "Save As" }, - { "hex.view.hexeditor.exit_application.title", "Exit Application?" }, - { "hex.view.hexeditor.exit_application.desc", "You have unsaved changes made to your Project.\nAre you sure you want to exit?" }, - { "hex.view.hexeditor.script.title", "Load File with Loader Script" }, - { "hex.view.hexeditor.script.desc", "Load a file using a Python loader script." }, - { "hex.view.hexeditor.script.script", "Script" }, - { "hex.view.hexeditor.script.script.title", "Loader Script: Open Script" }, - { "hex.view.hexeditor.script.file", "File" }, - { "hex.view.hexeditor.script.file.title", "Loader Script: Open File" }, + { "hex.builtin.view.hexeditor.name", "Hex editor" }, + { "hex.builtin.view.hexeditor.create_file", "New" }, + { "hex.builtin.view.hexeditor.open_file", "Open" }, + { "hex.builtin.view.hexeditor.open_project", "Open Project" }, + { "hex.builtin.view.hexeditor.save_project", "Save Project" }, + { "hex.builtin.view.hexeditor.save_data", "Save Data" }, + { "hex.builtin.view.hexeditor.open_base64", "Open Base64 File" }, + { "hex.builtin.view.hexeditor.load_enconding_file", "Load custom encoding File" }, + { "hex.builtin.view.hexeditor.page", "Page {0} / {1}" }, + { "hex.builtin.view.hexeditor.save_as", "Save As" }, + { "hex.builtin.view.hexeditor.exit_application.title", "Exit Application?" }, + { "hex.builtin.view.hexeditor.exit_application.desc", "You have unsaved changes made to your Project.\nAre you sure you want to exit?" }, + { "hex.builtin.view.hexeditor.script.title", "Load File with Loader Script" }, + { "hex.builtin.view.hexeditor.script.desc", "Load a file using a Python loader script." }, + { "hex.builtin.view.hexeditor.script.script", "Script" }, + { "hex.builtin.view.hexeditor.script.script.title", "Loader Script: Open Script" }, + { "hex.builtin.view.hexeditor.script.file", "File" }, + { "hex.builtin.view.hexeditor.script.file.title", "Loader Script: Open File" }, - { "hex.view.hexeditor.menu.file.open_file", "Open File..." }, - { "hex.view.hexeditor.menu.file.open_recent", "Open Recent"}, - { "hex.view.hexeditor.menu.file.save", "Save" }, - { "hex.view.hexeditor.menu.file.save_as", "Save As..." }, - { "hex.view.hexeditor.menu.file.close", "Close" }, - { "hex.view.hexeditor.menu.file.quit", "Quit ImHex" }, - { "hex.view.hexeditor.menu.file.open_project", "Open Project..." }, - { "hex.view.hexeditor.menu.file.save_project", "Save Project..." }, - { "hex.view.hexeditor.menu.file.load_encoding_file", "Load custom encoding..." }, - { "hex.view.hexeditor.menu.file.import", "Import..." }, - { "hex.view.hexeditor.menu.file.import.base64", "Base64 File" }, - { "hex.view.hexeditor.base64.import_error", "File is not in a valid Base64 format!" }, - { "hex.view.hexeditor.file_open_error", "Failed to open file!" }, - { "hex.view.hexeditor.menu.file.import.ips", "IPS Patch" }, - { "hex.view.hexeditor.menu.file.import.ips32", "IPS32 Patch" }, - { "hex.view.hexeditor.menu.file.import.script", "File with Loader Script" }, + { "hex.builtin.view.hexeditor.menu.file.open_file", "Open File..." }, + { "hex.builtin.view.hexeditor.menu.file.open_recent", "Open Recent"}, + { "hex.builtin.view.hexeditor.menu.file.save", "Save" }, + { "hex.builtin.view.hexeditor.menu.file.save_as", "Save As..." }, + { "hex.builtin.view.hexeditor.menu.file.close", "Close" }, + { "hex.builtin.view.hexeditor.menu.file.quit", "Quit ImHex" }, + { "hex.builtin.view.hexeditor.menu.file.open_project", "Open Project..." }, + { "hex.builtin.view.hexeditor.menu.file.save_project", "Save Project..." }, + { "hex.builtin.view.hexeditor.menu.file.load_encoding_file", "Load custom encoding..." }, + { "hex.builtin.view.hexeditor.menu.file.import", "Import..." }, + { "hex.builtin.view.hexeditor.menu.file.import.base64", "Base64 File" }, + { "hex.builtin.view.hexeditor.base64.import_error", "File is not in a valid Base64 format!" }, + { "hex.builtin.view.hexeditor.file_open_error", "Failed to open file!" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips", "IPS Patch" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips32", "IPS32 Patch" }, + { "hex.builtin.view.hexeditor.menu.file.import.script", "File with Loader Script" }, - { "hex.view.hexeditor.menu.file.export", "Export..." }, - { "hex.view.hexeditor.menu.file.export.title", "Export File" }, - { "hex.view.hexeditor.menu.file.export.ips", "IPS Patch" }, - { "hex.view.hexeditor.menu.file.export.ips32", "IPS32 Patch" }, - { "hex.view.hexeditor.menu.file.search", "Search" }, - { "hex.view.hexeditor.search.string", "String" }, - { "hex.view.hexeditor.search.hex", "Hex" }, - { "hex.view.hexeditor.search.find", "Find" }, - { "hex.view.hexeditor.search.find_next", "Find next" }, - { "hex.view.hexeditor.search.find_prev", "Find previous" }, - { "hex.view.hexeditor.menu.file.goto", "Goto" }, - { "hex.view.hexeditor.goto.offset.absolute", "Absolute" }, - { "hex.view.hexeditor.goto.offset.current", "Current" }, - { "hex.view.hexeditor.goto.offset.begin", "Begin" }, - { "hex.view.hexeditor.goto.offset.end", "End" }, - { "hex.view.hexeditor.error.read_only", "Couldn't get write access. File opened in read-only mode." }, - { "hex.view.hexeditor.error.open", "Failed to open file!" }, - { "hex.view.hexeditor.error.create", "Failed to create new file!" }, - { "hex.view.hexeditor.menu.edit.undo", "Undo" }, - { "hex.view.hexeditor.menu.edit.redo", "Redo" }, - { "hex.view.hexeditor.menu.edit.copy", "Copy" }, - { "hex.view.hexeditor.menu.edit.copy_as", "Copy as..." }, - { "hex.view.hexeditor.copy.hex", "String" }, - { "hex.view.hexeditor.copy.c", "C Array" }, - { "hex.view.hexeditor.copy.cpp", "C++ Array" }, - { "hex.view.hexeditor.copy.csharp", "C# Array" }, - { "hex.view.hexeditor.copy.rust", "Rust Array" }, - { "hex.view.hexeditor.copy.python", "Python Array" }, - { "hex.view.hexeditor.copy.java", "Java Array" }, - { "hex.view.hexeditor.copy.js", "JavaScript Array" }, - { "hex.view.hexeditor.copy.ascii", "ASCII Art" }, - { "hex.view.hexeditor.copy.html", "HTML" }, - { "hex.view.hexeditor.menu.edit.paste", "Paste" }, - { "hex.view.hexeditor.menu.edit.select_all", "Select all" }, - { "hex.view.hexeditor.menu.edit.bookmark", "Create bookmark" }, - { "hex.view.hexeditor.menu.edit.set_base", "Set base address" }, - { "hex.view.hexeditor.menu.edit.resize", "Resize" }, + { "hex.builtin.view.hexeditor.menu.file.export", "Export..." }, + { "hex.builtin.view.hexeditor.menu.file.export.title", "Export File" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips", "IPS Patch" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips32", "IPS32 Patch" }, + { "hex.builtin.view.hexeditor.menu.file.search", "Search" }, + { "hex.builtin.view.hexeditor.search.string", "String" }, + { "hex.builtin.view.hexeditor.search.hex", "Hex" }, + { "hex.builtin.view.hexeditor.search.find", "Find" }, + { "hex.builtin.view.hexeditor.search.find_next", "Find next" }, + { "hex.builtin.view.hexeditor.search.find_prev", "Find previous" }, + { "hex.builtin.view.hexeditor.menu.file.goto", "Goto" }, + { "hex.builtin.view.hexeditor.goto.offset.absolute", "Absolute" }, + { "hex.builtin.view.hexeditor.goto.offset.current", "Current" }, + { "hex.builtin.view.hexeditor.goto.offset.begin", "Begin" }, + { "hex.builtin.view.hexeditor.goto.offset.end", "End" }, + { "hex.builtin.view.hexeditor.error.read_only", "Couldn't get write access. File opened in read-only mode." }, + { "hex.builtin.view.hexeditor.error.open", "Failed to open file!" }, + { "hex.builtin.view.hexeditor.error.create", "Failed to create new file!" }, + { "hex.builtin.view.hexeditor.menu.edit.undo", "Undo" }, + { "hex.builtin.view.hexeditor.menu.edit.redo", "Redo" }, + { "hex.builtin.view.hexeditor.menu.edit.copy", "Copy" }, + { "hex.builtin.view.hexeditor.menu.edit.copy_as", "Copy as..." }, + { "hex.builtin.view.hexeditor.copy.hex", "String" }, + { "hex.builtin.view.hexeditor.copy.c", "C Array" }, + { "hex.builtin.view.hexeditor.copy.cpp", "C++ Array" }, + { "hex.builtin.view.hexeditor.copy.csharp", "C# Array" }, + { "hex.builtin.view.hexeditor.copy.rust", "Rust Array" }, + { "hex.builtin.view.hexeditor.copy.python", "Python Array" }, + { "hex.builtin.view.hexeditor.copy.java", "Java Array" }, + { "hex.builtin.view.hexeditor.copy.js", "JavaScript Array" }, + { "hex.builtin.view.hexeditor.copy.ascii", "ASCII Art" }, + { "hex.builtin.view.hexeditor.copy.html", "HTML" }, + { "hex.builtin.view.hexeditor.menu.edit.paste", "Paste" }, + { "hex.builtin.view.hexeditor.menu.edit.select_all", "Select all" }, + { "hex.builtin.view.hexeditor.menu.edit.bookmark", "Create bookmark" }, + { "hex.builtin.view.hexeditor.menu.edit.set_base", "Set base address" }, + { "hex.builtin.view.hexeditor.menu.edit.resize", "Resize" }, - { "hex.view.information.name", "Data Information" }, - { "hex.view.information.control", "Control" }, - { "hex.view.information.analyze", "Analyze page" }, - { "hex.view.information.analyzing", "Analyzing..." }, - { "hex.view.information.region", "Analyzed region" }, - { "hex.view.information.magic", "Magic information" }, - { "hex.view.information.description", "Description:" }, - { "hex.view.information.mime", "MIME Type:" }, - { "hex.view.information.info_analysis", "Information analysis" }, - { "hex.view.information.distribution", "Byte distribution" }, - { "hex.view.information.entropy", "Entropy" }, - { "hex.view.information.block_size", "Block size" }, - { "hex.view.information.block_size.desc", "{0} blocks of {1} bytes" }, - { "hex.view.information.file_entropy", "File entropy" }, - { "hex.view.information.highest_entropy", "Highest entropy block" }, - { "hex.view.information.encrypted", "This data is most likely encrypted or compressed!" }, + { "hex.builtin.view.information.name", "Data Information" }, + { "hex.builtin.view.information.control", "Control" }, + { "hex.builtin.view.information.analyze", "Analyze page" }, + { "hex.builtin.view.information.analyzing", "Analyzing..." }, + { "hex.builtin.view.information.region", "Analyzed region" }, + { "hex.builtin.view.information.magic", "Magic information" }, + { "hex.builtin.view.information.description", "Description:" }, + { "hex.builtin.view.information.mime", "MIME Type:" }, + { "hex.builtin.view.information.info_analysis", "Information analysis" }, + { "hex.builtin.view.information.distribution", "Byte distribution" }, + { "hex.builtin.view.information.entropy", "Entropy" }, + { "hex.builtin.view.information.block_size", "Block size" }, + { "hex.builtin.view.information.block_size.desc", "{0} blocks of {1} bytes" }, + { "hex.builtin.view.information.file_entropy", "File entropy" }, + { "hex.builtin.view.information.highest_entropy", "Highest entropy block" }, + { "hex.builtin.view.information.encrypted", "This data is most likely encrypted or compressed!" }, - { "hex.view.patches.name", "Patches" }, - { "hex.view.patches.offset", "Offset" }, - { "hex.view.patches.orig", "Original value" }, - { "hex.view.patches.patch", "Patched value"}, - { "hex.view.patches.remove", "Remove patch" }, + { "hex.builtin.view.patches.name", "Patches" }, + { "hex.builtin.view.patches.offset", "Offset" }, + { "hex.builtin.view.patches.orig", "Original value" }, + { "hex.builtin.view.patches.patch", "Patched value"}, + { "hex.builtin.view.patches.remove", "Remove patch" }, - { "hex.view.pattern.name", "Pattern editor" }, - { "hex.view.pattern.accept_pattern", "Accept pattern" }, - { "hex.view.pattern.accept_pattern.desc", "One or more pattern_language compatible with this data type has been found" }, - { "hex.view.pattern.accept_pattern.pattern_language", "Patterns" }, - { "hex.view.pattern.accept_pattern.question", "Do you want to apply the selected pattern?" }, - { "hex.view.pattern.menu.file.load_pattern", "Load pattern..." }, - { "hex.view.pattern.open_pattern", "Open pattern" }, - { "hex.view.pattern.evaluating", "Evaluating..." }, - { "hex.view.pattern.auto", "Auto evaluate" }, + { "hex.builtin.view.pattern.name", "Pattern editor" }, + { "hex.builtin.view.pattern.accept_pattern", "Accept pattern" }, + { "hex.builtin.view.pattern.accept_pattern.desc", "One or more pattern_language compatible with this data type has been found" }, + { "hex.builtin.view.pattern.accept_pattern.pattern_language", "Patterns" }, + { "hex.builtin.view.pattern.accept_pattern.question", "Do you want to apply the selected pattern?" }, + { "hex.builtin.view.pattern.menu.file.load_pattern", "Load pattern..." }, + { "hex.builtin.view.pattern.open_pattern", "Open pattern" }, + { "hex.builtin.view.pattern.evaluating", "Evaluating..." }, + { "hex.builtin.view.pattern.auto", "Auto evaluate" }, - { "hex.view.pattern_data.name", "Pattern Data" }, - { "hex.view.pattern_data.var_name", "Name" }, - { "hex.view.pattern_data.color", "Color" }, - { "hex.view.pattern_data.offset", "Offset" }, - { "hex.view.pattern_data.size", "Size" }, - { "hex.view.pattern_data.type", "Type" }, - { "hex.view.pattern_data.value", "Value" }, + { "hex.builtin.view.pattern_data.name", "Pattern Data" }, + { "hex.builtin.view.pattern_data.var_name", "Name" }, + { "hex.builtin.view.pattern_data.color", "Color" }, + { "hex.builtin.view.pattern_data.offset", "Offset" }, + { "hex.builtin.view.pattern_data.size", "Size" }, + { "hex.builtin.view.pattern_data.type", "Type" }, + { "hex.builtin.view.pattern_data.value", "Value" }, - { "hex.view.settings.name", "Settings" }, + { "hex.builtin.view.settings.name", "Settings" }, - { "hex.view.strings.name", "Strings" }, - { "hex.view.strings.copy", "Copy string" }, - { "hex.view.strings.demangle", "Demangle" }, - { "hex.view.strings.min_length", "Minimum length" }, - { "hex.view.strings.filter", "Filter" }, - { "hex.view.strings.extract", "Extract" }, - { "hex.view.strings.regex_error", "Invalid regex" }, - { "hex.view.strings.results", "Found {0} occurrences" }, - { "hex.view.strings.searching", "Searching..." }, - { "hex.view.strings.offset", "Offset" }, - { "hex.view.strings.size", "Size" }, - { "hex.view.strings.string", "String" }, - { "hex.view.strings.demangle.title", "Demangled name" }, - { "hex.view.strings.demangle.copy", "Copy" }, + { "hex.builtin.view.strings.name", "Strings" }, + { "hex.builtin.view.strings.copy", "Copy string" }, + { "hex.builtin.view.strings.demangle", "Demangle" }, + { "hex.builtin.view.strings.min_length", "Minimum length" }, + { "hex.builtin.view.strings.filter", "Filter" }, + { "hex.builtin.view.strings.extract", "Extract" }, + { "hex.builtin.view.strings.regex_error", "Invalid regex" }, + { "hex.builtin.view.strings.results", "Found {0} occurrences" }, + { "hex.builtin.view.strings.searching", "Searching..." }, + { "hex.builtin.view.strings.offset", "Offset" }, + { "hex.builtin.view.strings.size", "Size" }, + { "hex.builtin.view.strings.string", "String" }, + { "hex.builtin.view.strings.demangle.title", "Demangled name" }, + { "hex.builtin.view.strings.demangle.copy", "Copy" }, - { "hex.view.tools.name", "Tools" }, + { "hex.builtin.view.tools.name", "Tools" }, - { "hex.view.yara.name", "Yara Rules" }, - { "hex.view.yara.header.rules", "Rules" }, - { "hex.view.yara.reload", "Reload" }, - { "hex.view.yara.match", "Match Rules" }, - { "hex.view.yara.matching", "Matching..." }, - { "hex.view.yara.error", "Yara Compiler error: " }, - { "hex.view.yara.header.matches", "Matches" }, - { "hex.view.yara.matches.identifier", "Identifier" }, - { "hex.view.yara.matches.variable", "Variable" }, - { "hex.view.yara.whole_data", "Whole file matches!" }, - { "hex.view.yara.no_rules", "No YARA rules found. Put them in ImHex's 'yara' folder" }, + { "hex.builtin.view.yara.name", "Yara Rules" }, + { "hex.builtin.view.yara.header.rules", "Rules" }, + { "hex.builtin.view.yara.reload", "Reload" }, + { "hex.builtin.view.yara.match", "Match Rules" }, + { "hex.builtin.view.yara.matching", "Matching..." }, + { "hex.builtin.view.yara.error", "Yara Compiler error: " }, + { "hex.builtin.view.yara.header.matches", "Matches" }, + { "hex.builtin.view.yara.matches.identifier", "Identifier" }, + { "hex.builtin.view.yara.matches.variable", "Variable" }, + { "hex.builtin.view.yara.whole_data", "Whole file matches!" }, + { "hex.builtin.view.yara.no_rules", "No YARA rules found. Put them in ImHex's 'yara' folder" }, - { "hex.view.constants.name", "Constants" }, - { "hex.view.constants.row.category", "Category" }, - { "hex.view.constants.row.name", "Name" }, - { "hex.view.constants.row.desc", "Description" }, - { "hex.view.constants.row.value", "Value" }, + { "hex.builtin.view.constants.name", "Constants" }, + { "hex.builtin.view.constants.row.category", "Category" }, + { "hex.builtin.view.constants.row.name", "Name" }, + { "hex.builtin.view.constants.row.desc", "Description" }, + { "hex.builtin.view.constants.row.value", "Value" }, - { "hex.view.store.name", "Content Store" }, - { "hex.view.store.desc", "Download new content from ImHex's online database" }, - { "hex.view.store.reload", "Reload" }, - { "hex.view.store.row.name", "Name" }, - { "hex.view.store.row.description", "Description" }, - { "hex.view.store.download", "Download" }, - { "hex.view.store.update", "Update" }, - { "hex.view.store.remove", "Remove" }, - { "hex.view.store.tab.patterns", "Patterns" }, - { "hex.view.store.tab.libraries", "Libraries" }, - { "hex.view.store.tab.magics", "Magic Files" }, - { "hex.view.store.tab.constants", "Constants" }, - { "hex.view.store.tab.yara", "Yara Rules" }, - { "hex.view.store.loading", "Loading store content..." }, - { "hex.view.diff.name", "Diffing" }, + { "hex.builtin.view.store.name", "Content Store" }, + { "hex.builtin.view.store.desc", "Download new content from ImHex's online database" }, + { "hex.builtin.view.store.reload", "Reload" }, + { "hex.builtin.view.store.row.name", "Name" }, + { "hex.builtin.view.store.row.description", "Description" }, + { "hex.builtin.view.store.download", "Download" }, + { "hex.builtin.view.store.update", "Update" }, + { "hex.builtin.view.store.remove", "Remove" }, + { "hex.builtin.view.store.tab.patterns", "Patterns" }, + { "hex.builtin.view.store.tab.libraries", "Libraries" }, + { "hex.builtin.view.store.tab.magics", "Magic Files" }, + { "hex.builtin.view.store.tab.constants", "Constants" }, + { "hex.builtin.view.store.tab.yara", "Yara Rules" }, + { "hex.builtin.view.store.loading", "Loading store content..." }, + { "hex.builtin.view.diff.name", "Diffing" }, - - /* Builtin plugin features */ + { "hex.builtin.view.gdb.name", "GDB Provider" }, + { "hex.builtin.view.gdb.settings", "Settings" }, + { "hex.builtin.view.gdb.ip", "IP Address" }, + { "hex.builtin.view.gdb.port", "Port" }, + { "hex.builtin.view.gdb.connect", "Connect" }, + { "hex.builtin.view.gdb.disconnect", "Disconnect" }, { "hex.builtin.command.calc.desc", "Calculator" }, { "hex.builtin.command.cmd.desc", "Command" }, @@ -669,6 +676,10 @@ namespace hex::plugin::builtin { { "hex.builtin.provider.file.creation", "Creation time" }, { "hex.builtin.provider.file.access", "Last access time" }, { "hex.builtin.provider.file.modification", "Last modification time" }, + + { "hex.builtin.provider.file", "File Provider" }, + { "hex.builtin.provider.gdb", "GDB Server Provider" }, + { "hex.builtin.provider.gdb.name", "GDB Server <{0}:{1}>" }, }); } diff --git a/plugins/builtin/source/lang/it_IT.cpp b/plugins/builtin/source/lang/it_IT.cpp index 35c612572..8f09c6c2b 100644 --- a/plugins/builtin/source/lang/it_IT.cpp +++ b/plugins/builtin/source/lang/it_IT.cpp @@ -23,6 +23,7 @@ namespace hex::plugin::builtin { { "hex.welcome.start.open_file", "Apri un File" }, { "hex.welcome.start.open_project", "Apri un Progetto" }, { "hex.welcome.start.recent", "File recenti" }, + //{ "hex.welcome.start.open_other", "Other Providers" }, { "hex.welcome.header.help", "Aiuto" }, { "hex.welcome.help.repo", "Repo GitHub" }, { "hex.welcome.help.repo.link", "https://github.com/WerWolv/ImHex" }, @@ -85,248 +86,255 @@ namespace hex::plugin::builtin { //{ "hex.message.yara_rule_added", "Yara rule added!" }, //{ "hex.message.magic_db_added", "Magic database added!" }, - { "hex.view.bookmarks.name", "Segnalibri" }, - { "hex.view.bookmarks.default_title", "Segnalibro [0x{0:X} - 0x{1:X}]" }, - { "hex.view.bookmarks.no_bookmarks", "Non è stato creato alcun segnalibro. Aggiungine uno andando su Modifica -> Crea Segnalibro" }, - { "hex.view.bookmarks.title.info", "Informazioni" }, - { "hex.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} bytes)" }, - { "hex.view.bookmarks.button.jump", "Vai a" }, - { "hex.view.bookmarks.button.remove", "Rimuovi" }, - { "hex.view.bookmarks.header.name", "Nome" }, - { "hex.view.bookmarks.header.color", "Colore" }, - { "hex.view.bookmarks.header.comment", "Commento" }, + /* Builtin plugin features */ - { "hex.view.command_palette.name", "Tavola dei Comandi" }, + { "hex.builtin.view.bookmarks.name", "Segnalibri" }, + { "hex.builtin.view.bookmarks.default_title", "Segnalibro [0x{0:X} - 0x{1:X}]" }, + { "hex.builtin.view.bookmarks.no_bookmarks", "Non è stato creato alcun segnalibro. Aggiungine uno andando su Modifica -> Crea Segnalibro" }, + { "hex.builtin.view.bookmarks.title.info", "Informazioni" }, + { "hex.builtin.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} bytes)" }, + { "hex.builtin.view.bookmarks.button.jump", "Vai a" }, + { "hex.builtin.view.bookmarks.button.remove", "Rimuovi" }, + { "hex.builtin.view.bookmarks.header.name", "Nome" }, + { "hex.builtin.view.bookmarks.header.color", "Colore" }, + { "hex.builtin.view.bookmarks.header.comment", "Commento" }, - { "hex.view.data_inspector.name", "Ispezione Dati" }, - { "hex.view.data_inspector.table.name", "Nome" }, - { "hex.view.data_inspector.table.value", "Valore" }, - //{ "hex.view.data_inspector.no_data", "No bytes selected"}, + { "hex.builtin.view.command_palette.name", "Tavola dei Comandi" }, + + { "hex.builtin.view.data_inspector.name", "Ispezione Dati" }, + { "hex.builtin.view.data_inspector.table.name", "Nome" }, + { "hex.builtin.view.data_inspector.table.value", "Valore" }, + //{ "hex.builtin.view.data_inspector.no_data", "No bytes selected"}, - { "hex.view.data_processor.name", "Processa Dati" }, - { "hex.view.data_processor.menu.remove_selection", "Rimuovi i selezionati" }, - { "hex.view.data_processor.menu.remove_node", "Rimuovi Nodo" }, - { "hex.view.data_processor.menu.remove_link", "Rimuovi Link" }, + { "hex.builtin.view.data_processor.name", "Processa Dati" }, + { "hex.builtin.view.data_processor.menu.remove_selection", "Rimuovi i selezionati" }, + { "hex.builtin.view.data_processor.menu.remove_node", "Rimuovi Nodo" }, + { "hex.builtin.view.data_processor.menu.remove_link", "Rimuovi Link" }, - { "hex.view.disassembler.name", "Disassembla" }, - { "hex.view.disassembler.position", "Posiziona" }, - { "hex.view.disassembler.base", "Indirizzo di base" }, - { "hex.view.disassembler.region", "Regione del Codice" }, - { "hex.view.disassembler.settings.header", "Impostazioni" }, - { "hex.view.disassembler.arch", "Architettura" }, - { "hex.view.disassembler.arm.arm", "Modalità ARM" }, - { "hex.view.disassembler.arm.thumb", "Modalità Thumb" }, - { "hex.view.disassembler.arm.default", "Modalità di Default" }, - { "hex.view.disassembler.arm.cortex_m", "Modalità Cortex-M" }, - { "hex.view.disassembler.arm.armv8", "Modalità ARMv8" }, + { "hex.builtin.view.disassembler.name", "Disassembla" }, + { "hex.builtin.view.disassembler.position", "Posiziona" }, + { "hex.builtin.view.disassembler.base", "Indirizzo di base" }, + { "hex.builtin.view.disassembler.region", "Regione del Codice" }, + { "hex.builtin.view.disassembler.settings.header", "Impostazioni" }, + { "hex.builtin.view.disassembler.arch", "Architettura" }, + { "hex.builtin.view.disassembler.arm.arm", "Modalità ARM" }, + { "hex.builtin.view.disassembler.arm.thumb", "Modalità Thumb" }, + { "hex.builtin.view.disassembler.arm.default", "Modalità di Default" }, + { "hex.builtin.view.disassembler.arm.cortex_m", "Modalità Cortex-M" }, + { "hex.builtin.view.disassembler.arm.armv8", "Modalità ARMv8" }, - { "hex.view.disassembler.mips.mips32", "Modalità MIPS32" }, - { "hex.view.disassembler.mips.mips64", "Modalità MIPS64" }, - { "hex.view.disassembler.mips.mips32R6", "Modalità MIPS32R6" }, - { "hex.view.disassembler.mips.micro", "Modalità Micro" }, + { "hex.builtin.view.disassembler.mips.mips32", "Modalità MIPS32" }, + { "hex.builtin.view.disassembler.mips.mips64", "Modalità MIPS64" }, + { "hex.builtin.view.disassembler.mips.mips32R6", "Modalità MIPS32R6" }, + { "hex.builtin.view.disassembler.mips.micro", "Modalità Micro" }, - { "hex.view.disassembler.x86.16bit", "Modalità 16-bit" }, - { "hex.view.disassembler.x86.32bit", "Modalità 32-bit" }, - { "hex.view.disassembler.x86.64bit", "Modalità 64-bit" }, + { "hex.builtin.view.disassembler.x86.16bit", "Modalità 16-bit" }, + { "hex.builtin.view.disassembler.x86.32bit", "Modalità 32-bit" }, + { "hex.builtin.view.disassembler.x86.64bit", "Modalità 64-bit" }, - { "hex.view.disassembler.ppc.32bit", "Modalità 32-bit" }, - { "hex.view.disassembler.ppc.64bit", "Modalità 64-bit" }, + { "hex.builtin.view.disassembler.ppc.32bit", "Modalità 32-bit" }, + { "hex.builtin.view.disassembler.ppc.64bit", "Modalità 64-bit" }, - { "hex.view.disassembler.sparc.v9", "Modalità Sparc V9" }, + { "hex.builtin.view.disassembler.sparc.v9", "Modalità Sparc V9" }, - { "hex.view.disassembler.disassemble", "Disassembla" }, - { "hex.view.disassembler.disassembling", "Disassemblaggio..." }, - { "hex.view.disassembler.disassembly.title", "Disassembla" }, - { "hex.view.disassembler.disassembly.address", "Indirizzo" }, - { "hex.view.disassembler.disassembly.offset", "Offset" }, - { "hex.view.disassembler.disassembly.bytes", "Byte" }, + { "hex.builtin.view.disassembler.disassemble", "Disassembla" }, + { "hex.builtin.view.disassembler.disassembling", "Disassemblaggio..." }, + { "hex.builtin.view.disassembler.disassembly.title", "Disassembla" }, + { "hex.builtin.view.disassembler.disassembly.address", "Indirizzo" }, + { "hex.builtin.view.disassembler.disassembly.offset", "Offset" }, + { "hex.builtin.view.disassembler.disassembly.bytes", "Byte" }, - { "hex.view.hashes.name", "Hash" }, - { "hex.view.hashes.settings", "Impostazioni" }, - { "hex.view.hashes.function", "Funzioni di Hash" }, - { "hex.view.hashes.iv", "Valore Iniziale" }, - { "hex.view.hashes.poly", "Polinomio" }, - { "hex.view.hashes.result", "Risultato" }, + { "hex.builtin.view.hashes.name", "Hash" }, + { "hex.builtin.view.hashes.settings", "Impostazioni" }, + { "hex.builtin.view.hashes.function", "Funzioni di Hash" }, + { "hex.builtin.view.hashes.iv", "Valore Iniziale" }, + { "hex.builtin.view.hashes.poly", "Polinomio" }, + { "hex.builtin.view.hashes.result", "Risultato" }, - { "hex.view.help.name", "Aiuto" }, - { "hex.view.help.about.name", "Riguardo ImHex" }, - { "hex.view.help.about.translator", "Tradotto da CrustySeanPro" }, - { "hex.view.help.about.source", "Codice Sorgente disponibile su GitHub:" }, - { "hex.view.help.about.donations", "Donazioni" }, - { "hex.view.help.about.thanks", "Se ti piace il mio lavoro, per favore considera di fare una donazione. Grazie mille <3" }, - { "hex.view.help.about.libs", "Librerie usate" }, - { "hex.view.help.about.paths", "ImHex cartelle" }, - { "hex.view.help.documentation", "Documentazione di ImHex" }, - { "hex.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"}, - { "hex.view.help.calc_cheat_sheet", "Calcolatrice Cheat Sheet" }, + { "hex.builtin.view.help.name", "Aiuto" }, + { "hex.builtin.view.help.about.name", "Riguardo ImHex" }, + { "hex.builtin.view.help.about.translator", "Tradotto da CrustySeanPro" }, + { "hex.builtin.view.help.about.source", "Codice Sorgente disponibile su GitHub:" }, + { "hex.builtin.view.help.about.donations", "Donazioni" }, + { "hex.builtin.view.help.about.thanks", "Se ti piace il mio lavoro, per favore considera di fare una donazione. Grazie mille <3" }, + { "hex.builtin.view.help.about.libs", "Librerie usate" }, + { "hex.builtin.view.help.about.paths", "ImHex cartelle" }, + { "hex.builtin.view.help.documentation", "Documentazione di ImHex" }, + { "hex.builtin.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"}, + { "hex.builtin.view.help.calc_cheat_sheet", "Calcolatrice Cheat Sheet" }, - { "hex.view.hexeditor.name", "Hex editor" }, - { "hex.view.hexeditor.create_file", "Nuovo" }, - { "hex.view.hexeditor.open_file", "Apri" }, - { "hex.view.hexeditor.menu.file.open_recent", "File recenti" }, - { "hex.view.hexeditor.open_project", "Apri i Progetti" }, - { "hex.view.hexeditor.save_project", "Salva i Progetti" }, - { "hex.view.hexeditor.save_data", "Salva i Dati" }, - { "hex.view.hexeditor.open_base64", "Apri Base64 File" }, - { "hex.view.hexeditor.load_enconding_file", "Carica un File di codfica personalizzato" }, - { "hex.view.hexeditor.page", "Pagina {0} / {1}" }, - { "hex.view.hexeditor.save_as", "Salva come" }, - { "hex.view.hexeditor.exit_application.title", "Uscire dall'applicazione?" }, - { "hex.view.hexeditor.exit_application.desc", "Hai delle modifiche non salvate nel tuo progetto.\nSei sicuro di voler uscire?" }, - { "hex.view.hexeditor.script.title", "Carica un File tramite il Caricatore di Script" }, - { "hex.view.hexeditor.script.desc", "Carica un file tramite il Caricatore di Script di Python." }, - { "hex.view.hexeditor.script.script", "Script" }, - { "hex.view.hexeditor.script.script.title", "Caricatore Script: Apri Script" }, - { "hex.view.hexeditor.script.file", "File" }, - { "hex.view.hexeditor.script.file.title", "Caricatore Script: Apri File" }, + { "hex.builtin.view.hexeditor.name", "Hex editor" }, + { "hex.builtin.view.hexeditor.create_file", "Nuovo" }, + { "hex.builtin.view.hexeditor.open_file", "Apri" }, + { "hex.builtin.view.hexeditor.menu.file.open_recent", "File recenti" }, + { "hex.builtin.view.hexeditor.open_project", "Apri i Progetti" }, + { "hex.builtin.view.hexeditor.save_project", "Salva i Progetti" }, + { "hex.builtin.view.hexeditor.save_data", "Salva i Dati" }, + { "hex.builtin.view.hexeditor.open_base64", "Apri Base64 File" }, + { "hex.builtin.view.hexeditor.load_enconding_file", "Carica un File di codfica personalizzato" }, + { "hex.builtin.view.hexeditor.page", "Pagina {0} / {1}" }, + { "hex.builtin.view.hexeditor.save_as", "Salva come" }, + { "hex.builtin.view.hexeditor.exit_application.title", "Uscire dall'applicazione?" }, + { "hex.builtin.view.hexeditor.exit_application.desc", "Hai delle modifiche non salvate nel tuo progetto.\nSei sicuro di voler uscire?" }, + { "hex.builtin.view.hexeditor.script.title", "Carica un File tramite il Caricatore di Script" }, + { "hex.builtin.view.hexeditor.script.desc", "Carica un file tramite il Caricatore di Script di Python." }, + { "hex.builtin.view.hexeditor.script.script", "Script" }, + { "hex.builtin.view.hexeditor.script.script.title", "Caricatore Script: Apri Script" }, + { "hex.builtin.view.hexeditor.script.file", "File" }, + { "hex.builtin.view.hexeditor.script.file.title", "Caricatore Script: Apri File" }, - { "hex.view.hexeditor.menu.file.open_file", "Apri File..." }, - { "hex.view.hexeditor.menu.file.save", "Salva" }, - { "hex.view.hexeditor.menu.file.save_as", "Salva come..." }, - { "hex.view.hexeditor.menu.file.close", "Chiudi" }, - { "hex.view.hexeditor.menu.file.quit", "Uscita ImHex" }, - { "hex.view.hexeditor.menu.file.open_project", "Apri un Progetto..." }, - { "hex.view.hexeditor.menu.file.save_project", "Salva Progetto..." }, - { "hex.view.hexeditor.menu.file.load_encoding_file", "Carica una codifica personalizzata..." }, - { "hex.view.hexeditor.menu.file.import", "Importa..." }, - { "hex.view.hexeditor.menu.file.import.base64", "Base64 File" }, - { "hex.view.hexeditor.base64.import_error", "Il file non è in un formato bas64 corretto!" }, - { "hex.view.hexeditor.file_open_error", "Impossibile aprire il File!" }, - { "hex.view.hexeditor.menu.file.import.ips", "IPS Patch" }, - { "hex.view.hexeditor.menu.file.import.ips32", "IPS32 Patch" }, - { "hex.view.hexeditor.menu.file.import.script", "File con il Caricatore di Script" }, + { "hex.builtin.view.hexeditor.menu.file.open_file", "Apri File..." }, + { "hex.builtin.view.hexeditor.menu.file.save", "Salva" }, + { "hex.builtin.view.hexeditor.menu.file.save_as", "Salva come..." }, + { "hex.builtin.view.hexeditor.menu.file.close", "Chiudi" }, + { "hex.builtin.view.hexeditor.menu.file.quit", "Uscita ImHex" }, + { "hex.builtin.view.hexeditor.menu.file.open_project", "Apri un Progetto..." }, + { "hex.builtin.view.hexeditor.menu.file.save_project", "Salva Progetto..." }, + { "hex.builtin.view.hexeditor.menu.file.load_encoding_file", "Carica una codifica personalizzata..." }, + { "hex.builtin.view.hexeditor.menu.file.import", "Importa..." }, + { "hex.builtin.view.hexeditor.menu.file.import.base64", "Base64 File" }, + { "hex.builtin.view.hexeditor.base64.import_error", "Il file non è in un formato bas64 corretto!" }, + { "hex.builtin.view.hexeditor.file_open_error", "Impossibile aprire il File!" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips", "IPS Patch" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips32", "IPS32 Patch" }, + { "hex.builtin.view.hexeditor.menu.file.import.script", "File con il Caricatore di Script" }, - { "hex.view.hexeditor.menu.file.export", "Esporta..." }, - { "hex.view.hexeditor.menu.file.export.title", "Esporta File" }, - { "hex.view.hexeditor.menu.file.export.ips", "IPS Patch" }, - { "hex.view.hexeditor.menu.file.export.ips32", "IPS32 Patch" }, - { "hex.view.hexeditor.menu.file.search", "Cerca" }, - { "hex.view.hexeditor.search.string", "Stringa" }, - { "hex.view.hexeditor.search.hex", "Hex" }, - { "hex.view.hexeditor.search.find", "Cerca" }, - { "hex.view.hexeditor.search.find_next", "Cerca il prossimo" }, - { "hex.view.hexeditor.search.find_prev", "Cerca il precedente" }, - { "hex.view.hexeditor.menu.file.goto", "Vai a" }, - { "hex.view.hexeditor.goto.offset.absolute", "Assoluto" }, - { "hex.view.hexeditor.goto.offset.current", "Corrente" }, - { "hex.view.hexeditor.goto.offset.begin", "Inizo" }, - { "hex.view.hexeditor.goto.offset.end", "Fine" }, - { "hex.view.hexeditor.error.read_only", "Impossibile scrivere sul File. File aperto solo in modalità lettura" }, - { "hex.view.hexeditor.error.open", "Impossibile aprire il File!" }, - { "hex.view.hexeditor.error.create", "Impossibile creare il nuovo File!" }, - { "hex.view.hexeditor.menu.edit.undo", "Annulla" }, - { "hex.view.hexeditor.menu.edit.redo", "Ripeti" }, - { "hex.view.hexeditor.menu.edit.copy", "Copia" }, - { "hex.view.hexeditor.menu.edit.copy_as", "Copia come..." }, - { "hex.view.hexeditor.copy.hex", "Stringa" }, - { "hex.view.hexeditor.copy.c", "C Array" }, - { "hex.view.hexeditor.copy.cpp", "C++ Array" }, - { "hex.view.hexeditor.copy.csharp", "C# Array" }, - { "hex.view.hexeditor.copy.rust", "Rust Array" }, - { "hex.view.hexeditor.copy.python", "Python Array" }, - { "hex.view.hexeditor.copy.java", "Java Array" }, - { "hex.view.hexeditor.copy.js", "JavaScript Array" }, - { "hex.view.hexeditor.copy.ascii", "ASCII Art" }, - { "hex.view.hexeditor.copy.html", "HTML" }, - { "hex.view.hexeditor.menu.edit.paste", "Incolla" }, - { "hex.view.hexeditor.menu.edit.select_all", "Seleziona tutti" }, - { "hex.view.hexeditor.menu.edit.bookmark", "Crea segnalibro" }, - { "hex.view.hexeditor.menu.edit.set_base", "Imposta indirizzo di base" }, - { "hex.view.hexeditor.menu.edit.resize", "Ridimensiona" }, + { "hex.builtin.view.hexeditor.menu.file.export", "Esporta..." }, + { "hex.builtin.view.hexeditor.menu.file.export.title", "Esporta File" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips", "IPS Patch" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips32", "IPS32 Patch" }, + { "hex.builtin.view.hexeditor.menu.file.search", "Cerca" }, + { "hex.builtin.view.hexeditor.search.string", "Stringa" }, + { "hex.builtin.view.hexeditor.search.hex", "Hex" }, + { "hex.builtin.view.hexeditor.search.find", "Cerca" }, + { "hex.builtin.view.hexeditor.search.find_next", "Cerca il prossimo" }, + { "hex.builtin.view.hexeditor.search.find_prev", "Cerca il precedente" }, + { "hex.builtin.view.hexeditor.menu.file.goto", "Vai a" }, + { "hex.builtin.view.hexeditor.goto.offset.absolute", "Assoluto" }, + { "hex.builtin.view.hexeditor.goto.offset.current", "Corrente" }, + { "hex.builtin.view.hexeditor.goto.offset.begin", "Inizo" }, + { "hex.builtin.view.hexeditor.goto.offset.end", "Fine" }, + { "hex.builtin.view.hexeditor.error.read_only", "Impossibile scrivere sul File. File aperto solo in modalità lettura" }, + { "hex.builtin.view.hexeditor.error.open", "Impossibile aprire il File!" }, + { "hex.builtin.view.hexeditor.error.create", "Impossibile creare il nuovo File!" }, + { "hex.builtin.view.hexeditor.menu.edit.undo", "Annulla" }, + { "hex.builtin.view.hexeditor.menu.edit.redo", "Ripeti" }, + { "hex.builtin.view.hexeditor.menu.edit.copy", "Copia" }, + { "hex.builtin.view.hexeditor.menu.edit.copy_as", "Copia come..." }, + { "hex.builtin.view.hexeditor.copy.hex", "Stringa" }, + { "hex.builtin.view.hexeditor.copy.c", "C Array" }, + { "hex.builtin.view.hexeditor.copy.cpp", "C++ Array" }, + { "hex.builtin.view.hexeditor.copy.csharp", "C# Array" }, + { "hex.builtin.view.hexeditor.copy.rust", "Rust Array" }, + { "hex.builtin.view.hexeditor.copy.python", "Python Array" }, + { "hex.builtin.view.hexeditor.copy.java", "Java Array" }, + { "hex.builtin.view.hexeditor.copy.js", "JavaScript Array" }, + { "hex.builtin.view.hexeditor.copy.ascii", "ASCII Art" }, + { "hex.builtin.view.hexeditor.copy.html", "HTML" }, + { "hex.builtin.view.hexeditor.menu.edit.paste", "Incolla" }, + { "hex.builtin.view.hexeditor.menu.edit.select_all", "Seleziona tutti" }, + { "hex.builtin.view.hexeditor.menu.edit.bookmark", "Crea segnalibro" }, + { "hex.builtin.view.hexeditor.menu.edit.set_base", "Imposta indirizzo di base" }, + { "hex.builtin.view.hexeditor.menu.edit.resize", "Ridimensiona" }, - { "hex.view.information.name", "Informazione sui Dati" }, - { "hex.view.information.control", "Controllo" }, - { "hex.view.information.analyze", "Analizza Pagina" }, - { "hex.view.information.analyzing", "Sto analizzando..." }, - { "hex.view.information.region", "Regione Analizzata" }, - { "hex.view.information.magic", "Informazione Magica" }, - { "hex.view.information.description", "Descrizione:" }, - { "hex.view.information.mime", "Tipo di MIME:" }, - { "hex.view.information.info_analysis", "Informazioni dell'analisi" }, - { "hex.view.information.distribution", "Distribuzione dei Byte" }, - { "hex.view.information.entropy", "Entropia" }, - { "hex.view.information.block_size", "Dimensione del Blocco" }, - { "hex.view.information.block_size.desc", "{0} blocchi di {1} bytes" }, - { "hex.view.information.file_entropy", "Entropia dei File" }, - { "hex.view.information.highest_entropy", "Highest entropy block" }, - { "hex.view.information.encrypted", "Questi dati sono probabilmente codificati o compressi!" }, + { "hex.builtin.view.information.name", "Informazione sui Dati" }, + { "hex.builtin.view.information.control", "Controllo" }, + { "hex.builtin.view.information.analyze", "Analizza Pagina" }, + { "hex.builtin.view.information.analyzing", "Sto analizzando..." }, + { "hex.builtin.view.information.region", "Regione Analizzata" }, + { "hex.builtin.view.information.magic", "Informazione Magica" }, + { "hex.builtin.view.information.description", "Descrizione:" }, + { "hex.builtin.view.information.mime", "Tipo di MIME:" }, + { "hex.builtin.view.information.info_analysis", "Informazioni dell'analisi" }, + { "hex.builtin.view.information.distribution", "Distribuzione dei Byte" }, + { "hex.builtin.view.information.entropy", "Entropia" }, + { "hex.builtin.view.information.block_size", "Dimensione del Blocco" }, + { "hex.builtin.view.information.block_size.desc", "{0} blocchi di {1} bytes" }, + { "hex.builtin.view.information.file_entropy", "Entropia dei File" }, + { "hex.builtin.view.information.highest_entropy", "Highest entropy block" }, + { "hex.builtin.view.information.encrypted", "Questi dati sono probabilmente codificati o compressi!" }, - { "hex.view.patches.name", "Patches" }, - { "hex.view.patches.offset", "Offset" }, - { "hex.view.patches.orig", "Valore Originale" }, - { "hex.view.patches.patch", "Valore patchato"}, - { "hex.view.patches.remove", "Rimuovi patch" }, + { "hex.builtin.view.patches.name", "Patches" }, + { "hex.builtin.view.patches.offset", "Offset" }, + { "hex.builtin.view.patches.orig", "Valore Originale" }, + { "hex.builtin.view.patches.patch", "Valore patchato"}, + { "hex.builtin.view.patches.remove", "Rimuovi patch" }, - { "hex.view.pattern.name", "Editor dei Pattern" }, - { "hex.view.pattern.accept_pattern", "Accetta pattern" }, - { "hex.view.pattern.accept_pattern.desc", "Uno o più pattern compatibili con questo tipo di dati sono stati trovati!" }, - { "hex.view.pattern.accept_pattern.pattern_language", "Pattern" }, - { "hex.view.pattern.accept_pattern.question", "Vuoi applicare i patter selezionati" }, - { "hex.view.pattern.menu.file.load_pattern", "Caricamento dei pattern..." }, - { "hex.view.pattern.open_pattern", "Apri pattern" }, - { "hex.view.pattern.evaluating", "Valutazione..." }, - { "hex.view.pattern.auto", "Auto valutazione" }, + { "hex.builtin.view.pattern.name", "Editor dei Pattern" }, + { "hex.builtin.view.pattern.accept_pattern", "Accetta pattern" }, + { "hex.builtin.view.pattern.accept_pattern.desc", "Uno o più pattern compatibili con questo tipo di dati sono stati trovati!" }, + { "hex.builtin.view.pattern.accept_pattern.pattern_language", "Pattern" }, + { "hex.builtin.view.pattern.accept_pattern.question", "Vuoi applicare i patter selezionati" }, + { "hex.builtin.view.pattern.menu.file.load_pattern", "Caricamento dei pattern..." }, + { "hex.builtin.view.pattern.open_pattern", "Apri pattern" }, + { "hex.builtin.view.pattern.evaluating", "Valutazione..." }, + { "hex.builtin.view.pattern.auto", "Auto valutazione" }, - { "hex.view.pattern_data.name", "Dati dei Pattern" }, - { "hex.view.pattern_data.var_name", "Nome" }, - { "hex.view.pattern_data.color", "Colore" }, - { "hex.view.pattern_data.offset", "Offset" }, - { "hex.view.pattern_data.size", "Dimensione" }, - { "hex.view.pattern_data.type", "Tipo" }, - { "hex.view.pattern_data.value", "Valore" }, + { "hex.builtin.view.pattern_data.name", "Dati dei Pattern" }, + { "hex.builtin.view.pattern_data.var_name", "Nome" }, + { "hex.builtin.view.pattern_data.color", "Colore" }, + { "hex.builtin.view.pattern_data.offset", "Offset" }, + { "hex.builtin.view.pattern_data.size", "Dimensione" }, + { "hex.builtin.view.pattern_data.type", "Tipo" }, + { "hex.builtin.view.pattern_data.value", "Valore" }, - { "hex.view.settings.name", "Impostazioni" }, + { "hex.builtin.view.settings.name", "Impostazioni" }, - { "hex.view.strings.name", "Stringhe" }, - { "hex.view.strings.copy", "Copia stringa" }, - { "hex.view.strings.demangle", "Demangle" }, - { "hex.view.strings.min_length", "Lunghezza minima" }, - { "hex.view.strings.filter", "Filtro" }, - { "hex.view.strings.extract", "Estrai" }, - { "hex.view.strings.searching", "Sto cercando..." }, - { "hex.view.strings.offset", "Offset" }, - { "hex.view.strings.size", "Dimensione" }, - { "hex.view.strings.string", "Stringa" }, - { "hex.view.strings.demangle.title", "Nome Demangled" }, - { "hex.view.strings.demangle.copy", "Copia" }, + { "hex.builtin.view.strings.name", "Stringhe" }, + { "hex.builtin.view.strings.copy", "Copia stringa" }, + { "hex.builtin.view.strings.demangle", "Demangle" }, + { "hex.builtin.view.strings.min_length", "Lunghezza minima" }, + { "hex.builtin.view.strings.filter", "Filtro" }, + { "hex.builtin.view.strings.extract", "Estrai" }, + { "hex.builtin.view.strings.searching", "Sto cercando..." }, + { "hex.builtin.view.strings.offset", "Offset" }, + { "hex.builtin.view.strings.size", "Dimensione" }, + { "hex.builtin.view.strings.string", "Stringa" }, + { "hex.builtin.view.strings.demangle.title", "Nome Demangled" }, + { "hex.builtin.view.strings.demangle.copy", "Copia" }, - { "hex.view.tools.name", "Strumenti" }, + { "hex.builtin.view.tools.name", "Strumenti" }, - { "hex.view.yara.name", "Regole di Yara" }, - { "hex.view.yara.header.rules", "Regola" }, - { "hex.view.yara.reload", "Ricarica" }, - { "hex.view.yara.match", "Abbina Regole" }, - { "hex.view.yara.matching", "Abbinamento..." }, - { "hex.view.yara.error", "Errore compilazione Yara: " }, - { "hex.view.yara.header.matches", "Abbinamenti" }, - { "hex.view.yara.matches.identifier", "Identificatore" }, - //{ "hex.view.yara.matches.variable", "Variable" }, - { "hex.view.yara.whole_data", "Tutti i file combaciano!" }, - { "hex.view.yara.no_rules", "Nessuna regola di YARA. Aggiungile in nella cartella 'yara' di 'ImHex'" }, + { "hex.builtin.view.yara.name", "Regole di Yara" }, + { "hex.builtin.view.yara.header.rules", "Regola" }, + { "hex.builtin.view.yara.reload", "Ricarica" }, + { "hex.builtin.view.yara.match", "Abbina Regole" }, + { "hex.builtin.view.yara.matching", "Abbinamento..." }, + { "hex.builtin.view.yara.error", "Errore compilazione Yara: " }, + { "hex.builtin.view.yara.header.matches", "Abbinamenti" }, + { "hex.builtin.view.yara.matches.identifier", "Identificatore" }, + //{ "hex.builtin.view.yara.matches.variable", "Variable" }, + { "hex.builtin.view.yara.whole_data", "Tutti i file combaciano!" }, + { "hex.builtin.view.yara.no_rules", "Nessuna regola di YARA. Aggiungile in nella cartella 'yara' di 'ImHex'" }, - { "hex.view.constants.name", "Costanti" }, - { "hex.view.constants.row.category", "Categoria" }, - { "hex.view.constants.row.name", "Nome" }, - { "hex.view.constants.row.desc", "Descrizione" }, - { "hex.view.constants.row.value", "Valore" }, - { "hex.view.store.name", "Content Store" }, - { "hex.view.store.desc", "Scarica nuovi contenuti dal database online di ImHex" }, - { "hex.view.store.reload", "Ricarica" }, - { "hex.view.store.row.name", "Nome" }, - { "hex.view.store.row.description", "Descrizione" }, - { "hex.view.store.download", "Download" }, - { "hex.view.store.update", "Aggiorna" }, - { "hex.view.store.remove", "Rimuovi" }, - { "hex.view.store.tab.patterns", "Modelli" }, - { "hex.view.store.tab.libraries", "Librerie" }, - { "hex.view.store.tab.magics", "File Magici" }, - { "hex.view.store.tab.constants", "Costanti" }, - { "hex.view.store.tab.yara", "Regole di Yara" }, - { "hex.view.store.loading", "Caricamento del content store..." }, - //{ "hex.view.diff.name", "Diffing" }, + { "hex.builtin.view.constants.name", "Costanti" }, + { "hex.builtin.view.constants.row.category", "Categoria" }, + { "hex.builtin.view.constants.row.name", "Nome" }, + { "hex.builtin.view.constants.row.desc", "Descrizione" }, + { "hex.builtin.view.constants.row.value", "Valore" }, + { "hex.builtin.view.store.name", "Content Store" }, + { "hex.builtin.view.store.desc", "Scarica nuovi contenuti dal database online di ImHex" }, + { "hex.builtin.view.store.reload", "Ricarica" }, + { "hex.builtin.view.store.row.name", "Nome" }, + { "hex.builtin.view.store.row.description", "Descrizione" }, + { "hex.builtin.view.store.download", "Download" }, + { "hex.builtin.view.store.update", "Aggiorna" }, + { "hex.builtin.view.store.remove", "Rimuovi" }, + { "hex.builtin.view.store.tab.patterns", "Modelli" }, + { "hex.builtin.view.store.tab.libraries", "Librerie" }, + { "hex.builtin.view.store.tab.magics", "File Magici" }, + { "hex.builtin.view.store.tab.constants", "Costanti" }, + { "hex.builtin.view.store.tab.yara", "Regole di Yara" }, + { "hex.builtin.view.store.loading", "Caricamento del content store..." }, + //{ "hex.builtin.view.diff.name", "Diffing" }, - /* Builtin plugin features */ + //{ "hex.builtin.view.gdb.name", "GDB Provider" }, + //{ "hex.builtin.view.gdb.settings", "Settings" }, + //{ "hex.builtin.view.gdb.ip", "IP Address" }, + //{ "hex.builtin.view.gdb.port", "Port" }, + //{ "hex.builtin.view.gdb.connect", "Connect" }, + //{ "hex.builtin.view.gdb.disconnect", "Disconnect" }, { "hex.builtin.command.calc.desc", "Calcolatrice" }, { "hex.builtin.command.cmd.desc", "Comando" }, @@ -662,6 +670,10 @@ namespace hex::plugin::builtin { { "hex.builtin.provider.file.creation", "Data di creazione" }, { "hex.builtin.provider.file.access", "Data dell'ultimo accesso" }, { "hex.builtin.provider.file.modification", "Data dell'ultima modifica" }, + + //{ "hex.builtin.provider.file", "File Provider" }, + //{ "hex.builtin.provider.gdb", "GDB Server Provider" }, + //{ "hex.builtin.provider.gdb.name", "GDB Server <{0}:{1}>" }, }); } diff --git a/plugins/builtin/source/lang/zh_CN.cpp b/plugins/builtin/source/lang/zh_CN.cpp index 947e5e6d5..0039d96ae 100644 --- a/plugins/builtin/source/lang/zh_CN.cpp +++ b/plugins/builtin/source/lang/zh_CN.cpp @@ -23,6 +23,7 @@ namespace hex::plugin::builtin { { "hex.welcome.start.open_file", "打开文件" }, { "hex.welcome.start.open_project", "打开工程" }, { "hex.welcome.start.recent", "最近文件" }, + //{ "hex.welcome.start.open_other", "Other Providers" }, { "hex.welcome.header.help", "帮助" }, { "hex.welcome.help.repo", "GitHub仓库" }, { "hex.welcome.help.repo.link", "https://github.com/WerWolv/ImHex" }, @@ -86,248 +87,255 @@ namespace hex::plugin::builtin { { "hex.message.yara_rule_added", "Yara规则已添加!" }, { "hex.message.magic_db_added", "魔术数据库已添加!" }, - { "hex.view.bookmarks.name", "书签" }, - { "hex.view.bookmarks.default_title", "书签 [0x{0:X} - 0x{1:X}]" }, - { "hex.view.bookmarks.no_bookmarks", "空空如也。通过 编辑->添加书签" }, - { "hex.view.bookmarks.title.info", "信息" }, - { "hex.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} 字节)" }, - { "hex.view.bookmarks.button.jump", "转到" }, - { "hex.view.bookmarks.button.remove", "移除" }, - { "hex.view.bookmarks.header.name", "名称" }, - { "hex.view.bookmarks.header.color", "颜色" }, - { "hex.view.bookmarks.header.comment", "注释" }, + /* Builtin plugin features */ - { "hex.view.command_palette.name", "命令栏" }, + { "hex.builtin.view.bookmarks.name", "书签" }, + { "hex.builtin.view.bookmarks.default_title", "书签 [0x{0:X} - 0x{1:X}]" }, + { "hex.builtin.view.bookmarks.no_bookmarks", "空空如也。通过 编辑->添加书签" }, + { "hex.builtin.view.bookmarks.title.info", "信息" }, + { "hex.builtin.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} 字节)" }, + { "hex.builtin.view.bookmarks.button.jump", "转到" }, + { "hex.builtin.view.bookmarks.button.remove", "移除" }, + { "hex.builtin.view.bookmarks.header.name", "名称" }, + { "hex.builtin.view.bookmarks.header.color", "颜色" }, + { "hex.builtin.view.bookmarks.header.comment", "注释" }, - { "hex.view.data_inspector.name", "数据分析器" }, - { "hex.view.data_inspector.table.name", "名称" }, - { "hex.view.data_inspector.table.value", "值" }, - { "hex.view.data_inspector.no_data", "没有选中字节"}, + { "hex.builtin.view.command_palette.name", "命令栏" }, - { "hex.view.data_processor.name", "数据处理器" }, - { "hex.view.data_processor.menu.remove_selection", "移除已选" }, - { "hex.view.data_processor.menu.remove_node", "移除节点" }, - { "hex.view.data_processor.menu.remove_link", "移除链接" }, + { "hex.builtin.view.data_inspector.name", "数据分析器" }, + { "hex.builtin.view.data_inspector.table.name", "名称" }, + { "hex.builtin.view.data_inspector.table.value", "值" }, + { "hex.builtin.view.data_inspector.no_data", "没有选中字节"}, - { "hex.view.disassembler.name", "反汇编" }, - { "hex.view.disassembler.position", "位置" }, - { "hex.view.disassembler.base", "基地址" }, - { "hex.view.disassembler.region", "代码范围" }, - { "hex.view.disassembler.settings.header", "设置" }, - { "hex.view.disassembler.arch", "架构" }, - { "hex.view.disassembler.arm.arm", "ARM" }, - { "hex.view.disassembler.arm.thumb", "Thumb" }, - { "hex.view.disassembler.arm.default", "默认" }, - { "hex.view.disassembler.arm.cortex_m", "Cortex-M" }, - { "hex.view.disassembler.arm.armv8", "ARMv8" }, + { "hex.builtin.view.data_processor.name", "数据处理器" }, + { "hex.builtin.view.data_processor.menu.remove_selection", "移除已选" }, + { "hex.builtin.view.data_processor.menu.remove_node", "移除节点" }, + { "hex.builtin.view.data_processor.menu.remove_link", "移除链接" }, - { "hex.view.disassembler.mips.mips32", "MIPS32" }, - { "hex.view.disassembler.mips.mips64", "MIPS64" }, - { "hex.view.disassembler.mips.mips32R6", "MIPS32R6" }, - { "hex.view.disassembler.mips.micro", "Micro MIPS" }, + { "hex.builtin.view.disassembler.name", "反汇编" }, + { "hex.builtin.view.disassembler.position", "位置" }, + { "hex.builtin.view.disassembler.base", "基地址" }, + { "hex.builtin.view.disassembler.region", "代码范围" }, + { "hex.builtin.view.disassembler.settings.header", "设置" }, + { "hex.builtin.view.disassembler.arch", "架构" }, + { "hex.builtin.view.disassembler.arm.arm", "ARM" }, + { "hex.builtin.view.disassembler.arm.thumb", "Thumb" }, + { "hex.builtin.view.disassembler.arm.default", "默认" }, + { "hex.builtin.view.disassembler.arm.cortex_m", "Cortex-M" }, + { "hex.builtin.view.disassembler.arm.armv8", "ARMv8" }, - { "hex.view.disassembler.x86.16bit", "16位" }, - { "hex.view.disassembler.x86.32bit", "32位" }, - { "hex.view.disassembler.x86.64bit", "64位" }, + { "hex.builtin.view.disassembler.mips.mips32", "MIPS32" }, + { "hex.builtin.view.disassembler.mips.mips64", "MIPS64" }, + { "hex.builtin.view.disassembler.mips.mips32R6", "MIPS32R6" }, + { "hex.builtin.view.disassembler.mips.micro", "Micro MIPS" }, - { "hex.view.disassembler.ppc.32bit", "32位" }, - { "hex.view.disassembler.ppc.64bit", "64位" }, + { "hex.builtin.view.disassembler.x86.16bit", "16位" }, + { "hex.builtin.view.disassembler.x86.32bit", "32位" }, + { "hex.builtin.view.disassembler.x86.64bit", "64位" }, - { "hex.view.disassembler.sparc.v9", "Sparc V9" }, + { "hex.builtin.view.disassembler.ppc.32bit", "32位" }, + { "hex.builtin.view.disassembler.ppc.64bit", "64位" }, - { "hex.view.disassembler.disassemble", "反汇编" }, - { "hex.view.disassembler.disassembling", "反汇编中..." }, - { "hex.view.disassembler.disassembly.title", "反汇编" }, - { "hex.view.disassembler.disassembly.address", "地址" }, - { "hex.view.disassembler.disassembly.offset", "偏移" }, - { "hex.view.disassembler.disassembly.bytes", "字节" }, + { "hex.builtin.view.disassembler.sparc.v9", "Sparc V9" }, - { "hex.view.hashes.name", "哈希" }, - { "hex.view.hashes.settings", "设置" }, - { "hex.view.hashes.function", "哈希函数" }, - { "hex.view.hashes.iv", "初始值" }, - { "hex.view.hashes.poly", "多项式" }, - { "hex.view.hashes.result", "结果" }, + { "hex.builtin.view.disassembler.disassemble", "反汇编" }, + { "hex.builtin.view.disassembler.disassembling", "反汇编中..." }, + { "hex.builtin.view.disassembler.disassembly.title", "反汇编" }, + { "hex.builtin.view.disassembler.disassembly.address", "地址" }, + { "hex.builtin.view.disassembler.disassembly.offset", "偏移" }, + { "hex.builtin.view.disassembler.disassembly.bytes", "字节" }, - { "hex.view.help.name", "帮助" }, - { "hex.view.help.about.name", "关于" }, - { "hex.view.help.about.translator", "由xtexChooser翻译" }, - { "hex.view.help.about.source", "源代码位于GitHub:" }, - { "hex.view.help.about.donations", "赞助" }, - { "hex.view.help.about.thanks", "如果你喜欢我的工作,请赞助以帮助此项目继续前进。非常感谢 <3" }, - { "hex.view.help.about.libs", "使用的库" }, - { "hex.view.help.about.paths", "ImHex目录" }, - { "hex.view.help.documentation", "ImHex文档" }, - { "hex.view.help.pattern_cheat_sheet", "模式语言帮助"}, - { "hex.view.help.calc_cheat_sheet", "计算器帮助" }, + { "hex.builtin.view.hashes.name", "哈希" }, + { "hex.builtin.view.hashes.settings", "设置" }, + { "hex.builtin.view.hashes.function", "哈希函数" }, + { "hex.builtin.view.hashes.iv", "初始值" }, + { "hex.builtin.view.hashes.poly", "多项式" }, + { "hex.builtin.view.hashes.result", "结果" }, - { "hex.view.hexeditor.name", "Hex编辑器" }, - { "hex.view.hexeditor.create_file", "新建" }, - { "hex.view.hexeditor.open_file", "打开" }, - { "hex.view.hexeditor.open_project", "打开项目" }, - { "hex.view.hexeditor.save_project", "保存项目" }, - { "hex.view.hexeditor.save_data", "保存数据" }, - { "hex.view.hexeditor.open_base64", "打开Base64文件" }, - { "hex.view.hexeditor.load_enconding_file", "加载自定义编码定义文件" }, - { "hex.view.hexeditor.page", "页 {0} / {1}" }, - { "hex.view.hexeditor.save_as", "另存为" }, - { "hex.view.hexeditor.exit_application.title", "退出?" }, - { "hex.view.hexeditor.exit_application.desc", "工程还有为保存的更改。\n确定要退出吗?" }, - { "hex.view.hexeditor.script.title", "通过加载器脚本加载文件" }, - { "hex.view.hexeditor.script.desc", "通过Python加载器脚本加载文件。" }, - { "hex.view.hexeditor.script.script", "脚本" }, - { "hex.view.hexeditor.script.script.title", "加载器脚本:打开脚本" }, - { "hex.view.hexeditor.script.file", "文件" }, - { "hex.view.hexeditor.script.file.title", "加载器脚本:打开文件" }, + { "hex.builtin.view.help.name", "帮助" }, + { "hex.builtin.view.help.about.name", "关于" }, + { "hex.builtin.view.help.about.translator", "由xtexChooser翻译" }, + { "hex.builtin.view.help.about.source", "源代码位于GitHub:" }, + { "hex.builtin.view.help.about.donations", "赞助" }, + { "hex.builtin.view.help.about.thanks", "如果你喜欢我的工作,请赞助以帮助此项目继续前进。非常感谢 <3" }, + { "hex.builtin.view.help.about.libs", "使用的库" }, + { "hex.builtin.view.help.about.paths", "ImHex目录" }, + { "hex.builtin.view.help.documentation", "ImHex文档" }, + { "hex.builtin.view.help.pattern_cheat_sheet", "模式语言帮助"}, + { "hex.builtin.view.help.calc_cheat_sheet", "计算器帮助" }, - { "hex.view.hexeditor.menu.file.open_file", "打开文件..." }, - { "hex.view.hexeditor.menu.file.open_recent", "打开最近"}, - { "hex.view.hexeditor.menu.file.save", "保存" }, - { "hex.view.hexeditor.menu.file.save_as", "另存为..." }, - { "hex.view.hexeditor.menu.file.close", "关闭" }, - { "hex.view.hexeditor.menu.file.quit", "退出ImHex" }, - { "hex.view.hexeditor.menu.file.open_project", "打开项目..." }, - { "hex.view.hexeditor.menu.file.save_project", "保存项目..." }, - { "hex.view.hexeditor.menu.file.load_encoding_file", "加载自定义编码..." }, - { "hex.view.hexeditor.menu.file.import", "导入..." }, - { "hex.view.hexeditor.menu.file.import.base64", "Base64文件" }, - { "hex.view.hexeditor.base64.import_error", "文件不是有效的Base64格式!" }, - { "hex.view.hexeditor.file_open_error", "打开文件失败!" }, - { "hex.view.hexeditor.menu.file.import.ips", "IPS补丁" }, - { "hex.view.hexeditor.menu.file.import.ips32", "IPS32补丁" }, - { "hex.view.hexeditor.menu.file.import.script", "带有加载器脚本的文件" }, + { "hex.builtin.view.hexeditor.name", "Hex编辑器" }, + { "hex.builtin.view.hexeditor.create_file", "新建" }, + { "hex.builtin.view.hexeditor.open_file", "打开" }, + { "hex.builtin.view.hexeditor.open_project", "打开项目" }, + { "hex.builtin.view.hexeditor.save_project", "保存项目" }, + { "hex.builtin.view.hexeditor.save_data", "保存数据" }, + { "hex.builtin.view.hexeditor.open_base64", "打开Base64文件" }, + { "hex.builtin.view.hexeditor.load_enconding_file", "加载自定义编码定义文件" }, + { "hex.builtin.view.hexeditor.page", "页 {0} / {1}" }, + { "hex.builtin.view.hexeditor.save_as", "另存为" }, + { "hex.builtin.view.hexeditor.exit_application.title", "退出?" }, + { "hex.builtin.view.hexeditor.exit_application.desc", "工程还有为保存的更改。\n确定要退出吗?" }, + { "hex.builtin.view.hexeditor.script.title", "通过加载器脚本加载文件" }, + { "hex.builtin.view.hexeditor.script.desc", "通过Python加载器脚本加载文件。" }, + { "hex.builtin.view.hexeditor.script.script", "脚本" }, + { "hex.builtin.view.hexeditor.script.script.title", "加载器脚本:打开脚本" }, + { "hex.builtin.view.hexeditor.script.file", "文件" }, + { "hex.builtin.view.hexeditor.script.file.title", "加载器脚本:打开文件" }, - { "hex.view.hexeditor.menu.file.export", "导出..." }, - { "hex.view.hexeditor.menu.file.export.title", "导出文件" }, - { "hex.view.hexeditor.menu.file.export.ips", "IPS补丁" }, - { "hex.view.hexeditor.menu.file.export.ips32", "IPS32补丁" }, - { "hex.view.hexeditor.menu.file.search", "搜索" }, - { "hex.view.hexeditor.search.string", "字符串" }, - { "hex.view.hexeditor.search.hex", "Hex" }, - { "hex.view.hexeditor.search.find", "查找" }, - { "hex.view.hexeditor.search.find_next", "查找下一个" }, - { "hex.view.hexeditor.search.find_prev", "查找上一个" }, - { "hex.view.hexeditor.menu.file.goto", "转到" }, - { "hex.view.hexeditor.goto.offset.absolute", "绝对" }, - { "hex.view.hexeditor.goto.offset.current", "当前" }, - { "hex.view.hexeditor.goto.offset.begin", "起始" }, - { "hex.view.hexeditor.goto.offset.end", "末尾" }, - { "hex.view.hexeditor.error.read_only", "无法获得写权限,文件以只读方式打开。" }, - { "hex.view.hexeditor.error.open", "打开文件失败!" }, - { "hex.view.hexeditor.error.create", "创建新文件失败!" }, - { "hex.view.hexeditor.menu.edit.undo", "撤销" }, - { "hex.view.hexeditor.menu.edit.redo", "重做" }, - { "hex.view.hexeditor.menu.edit.copy", "复制" }, - { "hex.view.hexeditor.menu.edit.copy_as", "复制为..." }, - { "hex.view.hexeditor.copy.hex", "字符串" }, - { "hex.view.hexeditor.copy.c", "C数组" }, - { "hex.view.hexeditor.copy.cpp", "C++数组" }, - { "hex.view.hexeditor.copy.csharp", "C#数组" }, - { "hex.view.hexeditor.copy.rust", "Rust数组" }, - { "hex.view.hexeditor.copy.python", "Python数组" }, - { "hex.view.hexeditor.copy.java", "Java数组" }, - { "hex.view.hexeditor.copy.js", "JavaScript数组" }, - { "hex.view.hexeditor.copy.ascii", "ASCII Art" }, - { "hex.view.hexeditor.copy.html", "HTML" }, - { "hex.view.hexeditor.menu.edit.paste", "粘贴" }, - { "hex.view.hexeditor.menu.edit.select_all", "全选" }, - { "hex.view.hexeditor.menu.edit.bookmark", "添加书签" }, - { "hex.view.hexeditor.menu.edit.set_base", "设置基地址" }, - { "hex.view.hexeditor.menu.edit.resize", "修改大小" }, + { "hex.builtin.view.hexeditor.menu.file.open_file", "打开文件..." }, + { "hex.builtin.view.hexeditor.menu.file.open_recent", "打开最近"}, + { "hex.builtin.view.hexeditor.menu.file.save", "保存" }, + { "hex.builtin.view.hexeditor.menu.file.save_as", "另存为..." }, + { "hex.builtin.view.hexeditor.menu.file.close", "关闭" }, + { "hex.builtin.view.hexeditor.menu.file.quit", "退出ImHex" }, + { "hex.builtin.view.hexeditor.menu.file.open_project", "打开项目..." }, + { "hex.builtin.view.hexeditor.menu.file.save_project", "保存项目..." }, + { "hex.builtin.view.hexeditor.menu.file.load_encoding_file", "加载自定义编码..." }, + { "hex.builtin.view.hexeditor.menu.file.import", "导入..." }, + { "hex.builtin.view.hexeditor.menu.file.import.base64", "Base64文件" }, + { "hex.builtin.view.hexeditor.base64.import_error", "文件不是有效的Base64格式!" }, + { "hex.builtin.view.hexeditor.file_open_error", "打开文件失败!" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips", "IPS补丁" }, + { "hex.builtin.view.hexeditor.menu.file.import.ips32", "IPS32补丁" }, + { "hex.builtin.view.hexeditor.menu.file.import.script", "带有加载器脚本的文件" }, - { "hex.view.information.name", "数据信息" }, - { "hex.view.information.control", "控制" }, - { "hex.view.information.analyze", "分析" }, - { "hex.view.information.analyzing", "分析中..." }, - { "hex.view.information.region", "已分析区域" }, - { "hex.view.information.magic", "魔术信息" }, - { "hex.view.information.description", "描述:" }, - { "hex.view.information.mime", "MIME类型:" }, - { "hex.view.information.info_analysis", "信息分析" }, - { "hex.view.information.distribution", "字节分布" }, - { "hex.view.information.entropy", "熵" }, - { "hex.view.information.block_size", "块大小" }, - { "hex.view.information.block_size.desc", "{0} 块 × {1} 字节" }, - { "hex.view.information.file_entropy", "文件熵" }, - { "hex.view.information.highest_entropy", "最高熵" }, - { "hex.view.information.encrypted", "此数据似乎经过了加密或压缩!" }, + { "hex.builtin.view.hexeditor.menu.file.export", "导出..." }, + { "hex.builtin.view.hexeditor.menu.file.export.title", "导出文件" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips", "IPS补丁" }, + { "hex.builtin.view.hexeditor.menu.file.export.ips32", "IPS32补丁" }, + { "hex.builtin.view.hexeditor.menu.file.search", "搜索" }, + { "hex.builtin.view.hexeditor.search.string", "字符串" }, + { "hex.builtin.view.hexeditor.search.hex", "Hex" }, + { "hex.builtin.view.hexeditor.search.find", "查找" }, + { "hex.builtin.view.hexeditor.search.find_next", "查找下一个" }, + { "hex.builtin.view.hexeditor.search.find_prev", "查找上一个" }, + { "hex.builtin.view.hexeditor.menu.file.goto", "转到" }, + { "hex.builtin.view.hexeditor.goto.offset.absolute", "绝对" }, + { "hex.builtin.view.hexeditor.goto.offset.current", "当前" }, + { "hex.builtin.view.hexeditor.goto.offset.begin", "起始" }, + { "hex.builtin.view.hexeditor.goto.offset.end", "末尾" }, + { "hex.builtin.view.hexeditor.error.read_only", "无法获得写权限,文件以只读方式打开。" }, + { "hex.builtin.view.hexeditor.error.open", "打开文件失败!" }, + { "hex.builtin.view.hexeditor.error.create", "创建新文件失败!" }, + { "hex.builtin.view.hexeditor.menu.edit.undo", "撤销" }, + { "hex.builtin.view.hexeditor.menu.edit.redo", "重做" }, + { "hex.builtin.view.hexeditor.menu.edit.copy", "复制" }, + { "hex.builtin.view.hexeditor.menu.edit.copy_as", "复制为..." }, + { "hex.builtin.view.hexeditor.copy.hex", "字符串" }, + { "hex.builtin.view.hexeditor.copy.c", "C数组" }, + { "hex.builtin.view.hexeditor.copy.cpp", "C++数组" }, + { "hex.builtin.view.hexeditor.copy.csharp", "C#数组" }, + { "hex.builtin.view.hexeditor.copy.rust", "Rust数组" }, + { "hex.builtin.view.hexeditor.copy.python", "Python数组" }, + { "hex.builtin.view.hexeditor.copy.java", "Java数组" }, + { "hex.builtin.view.hexeditor.copy.js", "JavaScript数组" }, + { "hex.builtin.view.hexeditor.copy.ascii", "ASCII Art" }, + { "hex.builtin.view.hexeditor.copy.html", "HTML" }, + { "hex.builtin.view.hexeditor.menu.edit.paste", "粘贴" }, + { "hex.builtin.view.hexeditor.menu.edit.select_all", "全选" }, + { "hex.builtin.view.hexeditor.menu.edit.bookmark", "添加书签" }, + { "hex.builtin.view.hexeditor.menu.edit.set_base", "设置基地址" }, + { "hex.builtin.view.hexeditor.menu.edit.resize", "修改大小" }, - { "hex.view.patches.name", "补丁" }, - { "hex.view.patches.offset", "偏移" }, - { "hex.view.patches.orig", "原始值" }, - { "hex.view.patches.patch", "修改值"}, - { "hex.view.patches.remove", "移除补丁" }, + { "hex.builtin.view.information.name", "数据信息" }, + { "hex.builtin.view.information.control", "控制" }, + { "hex.builtin.view.information.analyze", "分析" }, + { "hex.builtin.view.information.analyzing", "分析中..." }, + { "hex.builtin.view.information.region", "已分析区域" }, + { "hex.builtin.view.information.magic", "魔术信息" }, + { "hex.builtin.view.information.description", "描述:" }, + { "hex.builtin.view.information.mime", "MIME类型:" }, + { "hex.builtin.view.information.info_analysis", "信息分析" }, + { "hex.builtin.view.information.distribution", "字节分布" }, + { "hex.builtin.view.information.entropy", "熵" }, + { "hex.builtin.view.information.block_size", "块大小" }, + { "hex.builtin.view.information.block_size.desc", "{0} 块 × {1} 字节" }, + { "hex.builtin.view.information.file_entropy", "文件熵" }, + { "hex.builtin.view.information.highest_entropy", "最高熵" }, + { "hex.builtin.view.information.encrypted", "此数据似乎经过了加密或压缩!" }, - { "hex.view.pattern.name", "模式编辑器" }, - { "hex.view.pattern.accept_pattern", "接受模式" }, - { "hex.view.pattern.accept_pattern.desc", "一个或多个模式与所找到的数据类型兼容" }, - { "hex.view.pattern.accept_pattern.pattern_language", "模式" }, - { "hex.view.pattern.accept_pattern.question", "是否应用找到的模式?" }, - { "hex.view.pattern.menu.file.load_pattern", "加载模式文件..." }, - { "hex.view.pattern.open_pattern", "打开模式" }, - { "hex.view.pattern.evaluating", "计算中..." }, - { "hex.view.pattern.auto", "自动计算" }, + { "hex.builtin.view.patches.name", "补丁" }, + { "hex.builtin.view.patches.offset", "偏移" }, + { "hex.builtin.view.patches.orig", "原始值" }, + { "hex.builtin.view.patches.patch", "修改值"}, + { "hex.builtin.view.patches.remove", "移除补丁" }, - { "hex.view.pattern_data.name", "模式数据" }, - { "hex.view.pattern_data.var_name", "名称" }, - { "hex.view.pattern_data.color", "颜色" }, - { "hex.view.pattern_data.offset", "偏移" }, - { "hex.view.pattern_data.size", "大小" }, - { "hex.view.pattern_data.type", "类型" }, - { "hex.view.pattern_data.value", "值" }, + { "hex.builtin.view.pattern.name", "模式编辑器" }, + { "hex.builtin.view.pattern.accept_pattern", "接受模式" }, + { "hex.builtin.view.pattern.accept_pattern.desc", "一个或多个模式与所找到的数据类型兼容" }, + { "hex.builtin.view.pattern.accept_pattern.pattern_language", "模式" }, + { "hex.builtin.view.pattern.accept_pattern.question", "是否应用找到的模式?" }, + { "hex.builtin.view.pattern.menu.file.load_pattern", "加载模式文件..." }, + { "hex.builtin.view.pattern.open_pattern", "打开模式" }, + { "hex.builtin.view.pattern.evaluating", "计算中..." }, + { "hex.builtin.view.pattern.auto", "自动计算" }, - { "hex.view.settings.name", "设置" }, + { "hex.builtin.view.pattern_data.name", "模式数据" }, + { "hex.builtin.view.pattern_data.var_name", "名称" }, + { "hex.builtin.view.pattern_data.color", "颜色" }, + { "hex.builtin.view.pattern_data.offset", "偏移" }, + { "hex.builtin.view.pattern_data.size", "大小" }, + { "hex.builtin.view.pattern_data.type", "类型" }, + { "hex.builtin.view.pattern_data.value", "值" }, - { "hex.view.strings.name", "字符串" }, - { "hex.view.strings.copy", "复制字符串" }, - { "hex.view.strings.demangle", "还原" }, - { "hex.view.strings.min_length", "最小长度" }, - { "hex.view.strings.filter", "过滤" }, - { "hex.view.strings.extract", "提取" }, - { "hex.view.strings.searching", "搜索中..." }, - { "hex.view.strings.offset", "偏移" }, - { "hex.view.strings.size", "大小" }, - { "hex.view.strings.string", "字符串" }, - { "hex.view.strings.demangle.title", "还原名" }, - { "hex.view.strings.demangle.copy", "复制" }, + { "hex.builtin.view.settings.name", "设置" }, - { "hex.view.tools.name", "工具" }, + { "hex.builtin.view.strings.name", "字符串" }, + { "hex.builtin.view.strings.copy", "复制字符串" }, + { "hex.builtin.view.strings.demangle", "还原" }, + { "hex.builtin.view.strings.min_length", "最小长度" }, + { "hex.builtin.view.strings.filter", "过滤" }, + { "hex.builtin.view.strings.extract", "提取" }, + { "hex.builtin.view.strings.searching", "搜索中..." }, + { "hex.builtin.view.strings.offset", "偏移" }, + { "hex.builtin.view.strings.size", "大小" }, + { "hex.builtin.view.strings.string", "字符串" }, + { "hex.builtin.view.strings.demangle.title", "还原名" }, + { "hex.builtin.view.strings.demangle.copy", "复制" }, - { "hex.view.yara.name", "Yara规则" }, - { "hex.view.yara.header.rules", "规则" }, - { "hex.view.yara.reload", "重新加载" }, - { "hex.view.yara.match", "匹配规则" }, - { "hex.view.yara.matching", "匹配中..." }, - { "hex.view.yara.error", "Yara编译器错误: " }, - { "hex.view.yara.header.matches", "匹配" }, - { "hex.view.yara.matches.identifier", "标识符" }, - //{ "hex.view.yara.matches.variable", "Variable" }, - { "hex.view.yara.whole_data", "全文件匹配!" }, - { "hex.view.yara.no_rules", "没有找到YARA规则。请将规则放到ImHex的'yara'目录下。" }, + { "hex.builtin.view.tools.name", "工具" }, - { "hex.view.constants.name", "常量" }, - { "hex.view.constants.row.category", "分类" }, - { "hex.view.constants.row.name", "名称" }, - { "hex.view.constants.row.desc", "描述" }, - { "hex.view.constants.row.value", "值" }, + { "hex.builtin.view.yara.name", "Yara规则" }, + { "hex.builtin.view.yara.header.rules", "规则" }, + { "hex.builtin.view.yara.reload", "重新加载" }, + { "hex.builtin.view.yara.match", "匹配规则" }, + { "hex.builtin.view.yara.matching", "匹配中..." }, + { "hex.builtin.view.yara.error", "Yara编译器错误: " }, + { "hex.builtin.view.yara.header.matches", "匹配" }, + { "hex.builtin.view.yara.matches.identifier", "标识符" }, + //{ "hex.builtin.view.yara.matches.variable", "Variable" }, + { "hex.builtin.view.yara.whole_data", "全文件匹配!" }, + { "hex.builtin.view.yara.no_rules", "没有找到YARA规则。请将规则放到ImHex的'yara'目录下。" }, - { "hex.view.store.name", "内容仓库" }, - { "hex.view.store.desc", "从ImHex在线数据库下载新内容" }, - { "hex.view.store.reload", "刷新" }, - { "hex.view.store.row.name", "名称" }, - { "hex.view.store.row.description", "描述" }, - { "hex.view.store.download", "下载" }, - { "hex.view.store.update", "更新" }, - { "hex.view.store.remove", "移除" }, - { "hex.view.store.tab.patterns", "模式" }, - { "hex.view.store.tab.libraries", "库" }, - { "hex.view.store.tab.magics", "魔术数据库" }, - { "hex.view.store.tab.constants", "常量" }, - { "hex.view.store.tab.yara", "Yara规则" }, - { "hex.view.store.loading", "正在加载仓库内容..." }, - { "hex.view.diff.name", "差异" }, + { "hex.builtin.view.constants.name", "常量" }, + { "hex.builtin.view.constants.row.category", "分类" }, + { "hex.builtin.view.constants.row.name", "名称" }, + { "hex.builtin.view.constants.row.desc", "描述" }, + { "hex.builtin.view.constants.row.value", "值" }, - /* Builtin plugin features */ + { "hex.builtin.view.store.name", "内容仓库" }, + { "hex.builtin.view.store.desc", "从ImHex在线数据库下载新内容" }, + { "hex.builtin.view.store.reload", "刷新" }, + { "hex.builtin.view.store.row.name", "名称" }, + { "hex.builtin.view.store.row.description", "描述" }, + { "hex.builtin.view.store.download", "下载" }, + { "hex.builtin.view.store.update", "更新" }, + { "hex.builtin.view.store.remove", "移除" }, + { "hex.builtin.view.store.tab.patterns", "模式" }, + { "hex.builtin.view.store.tab.libraries", "库" }, + { "hex.builtin.view.store.tab.magics", "魔术数据库" }, + { "hex.builtin.view.store.tab.constants", "常量" }, + { "hex.builtin.view.store.tab.yara", "Yara规则" }, + { "hex.builtin.view.store.loading", "正在加载仓库内容..." }, + { "hex.builtin.view.diff.name", "差异" }, + + //{ "hex.builtin.view.gdb.name", "GDB Provider" }, + //{ "hex.builtin.view.gdb.settings", "Settings" }, + //{ "hex.builtin.view.gdb.ip", "IP Address" }, + //{ "hex.builtin.view.gdb.port", "Port" }, + //{ "hex.builtin.view.gdb.connect", "Connect" }, + //{ "hex.builtin.view.gdb.disconnect", "Disconnect" }, { "hex.builtin.command.calc.desc", "计算器" }, { "hex.builtin.command.cmd.desc", "指令" }, @@ -664,6 +672,10 @@ namespace hex::plugin::builtin { { "hex.builtin.provider.file.creation", "创建时间" }, { "hex.builtin.provider.file.access", "最后访问时间" }, { "hex.builtin.provider.file.modification", "最后更改时间" }, + + //{ "hex.builtin.provider.file", "File Provider" }, + //{ "hex.builtin.provider.gdb", "GDB Server Provider" }, + //{ "hex.builtin.provider.gdb.name", "GDB Server <{0}:{1}>" }, }); } diff --git a/plugins/builtin/source/plugin_builtin.cpp b/plugins/builtin/source/plugin_builtin.cpp index 7208f9915..5a3b69f2a 100644 --- a/plugins/builtin/source/plugin_builtin.cpp +++ b/plugins/builtin/source/plugin_builtin.cpp @@ -2,12 +2,14 @@ namespace hex::plugin::builtin { + void registerViews(); void registerDataInspectorEntries(); void registerToolEntries(); void registerPatternLanguageFunctions(); void registerCommandPaletteCommands(); void registerSettings(); void registerDataProcessorNodes(); + void registerProviders(); void addFooterItems(); void addToolbarItems(); @@ -23,12 +25,14 @@ IMHEX_PLUGIN_SETUP("Built-in", "WerWolv", "Default ImHex functionality") { using namespace hex::plugin::builtin; + registerViews(); registerDataInspectorEntries(); registerToolEntries(); registerPatternLanguageFunctions(); registerCommandPaletteCommands(); registerSettings(); registerDataProcessorNodes(); + registerProviders(); addFooterItems(); addToolbarItems(); diff --git a/plugins/libimhex/CMakeLists.txt b/plugins/libimhex/CMakeLists.txt index 771c5cee9..f04c76ce6 100644 --- a/plugins/libimhex/CMakeLists.txt +++ b/plugins/libimhex/CMakeLists.txt @@ -77,6 +77,11 @@ set(LIBIMHEX_SOURCES source/helpers/lang.cpp source/helpers/net.cpp source/helpers/file.cpp + source/helpers/socket.cpp + source/helpers/patches.cpp + source/helpers/project_file_handler.cpp + source/helpers/encoding_file.cpp + source/helpers/loader_script_handler.cpp source/pattern_language/pattern_language.cpp source/pattern_language/preprocessor.cpp diff --git a/plugins/libimhex/include/hex/api/content_registry.hpp b/plugins/libimhex/include/hex/api/content_registry.hpp index dc109ff35..308ab054f 100644 --- a/plugins/libimhex/include/hex/api/content_registry.hpp +++ b/plugins/libimhex/include/hex/api/content_registry.hpp @@ -18,6 +18,7 @@ namespace hex { class LanguageDefinition; namespace pl { class Evaluator; } namespace dp { class Node; } + namespace prv { class Provider; } /* The Content Registry is the heart of all features in ImHex that are in some way extendable by Plugins. @@ -52,7 +53,7 @@ namespace hex { std::map>& getEntries(); nlohmann::json getSetting(const std::string &unlocalizedCategory, const std::string &unlocalizedName); nlohmann::json& getSettingsData(); - }; + } /* Command Palette Command Registry. Allows adding of new commands to the command palette */ namespace CommandPaletteCommands { @@ -75,7 +76,7 @@ namespace hex { void add(Type type, const std::string &command, const std::string &unlocalizedDescription, const DisplayCallback &displayCallback, const ExecuteCallback &executeCallback = [](auto){}); std::vector& getEntries(); - }; + } /* Pattern Language Function Registry. Allows adding of new functions that may be used inside the pattern language */ namespace PatternLanguageFunctions { @@ -95,7 +96,7 @@ namespace hex { void add(const Namespace &ns, const std::string &name, u32 parameterCount, const Callback &func); std::map& getEntries(); - }; + } /* View Registry. Allows adding of new windows */ namespace Views { @@ -108,7 +109,7 @@ namespace hex { std::vector& getEntries(); - }; + } /* Tools Registry. Allows adding new entries to the tools window */ namespace Tools { @@ -122,7 +123,7 @@ namespace hex { void add(const std::string &unlocalizedName, const Callback &function); std::vector& getEntries(); - }; + } /* Data Inspector Registry. Allows adding of new types to the data inspector */ namespace DataInspector { @@ -145,7 +146,7 @@ namespace hex { void add(const std::string &unlocalizedName, size_t requiredSize, GeneratorFunction function); std::vector& getEntries(); - }; + } /* Data Processor Node Registry. Allows adding new processor nodes to be used in the data processor */ namespace DataProcessorNode { @@ -174,7 +175,7 @@ namespace hex { std::vector& getEntries(); - }; + } /* Language Registry. Allows together with the LangEntry class and the _lang user defined literal to add new languages */ namespace Language { @@ -183,7 +184,7 @@ namespace hex { std::map& getLanguages(); std::map>& getLanguageDefinitions(); - }; + } /* Interface Registry. Allows adding new items to various interfaces */ namespace Interface { @@ -196,7 +197,16 @@ namespace hex { std::vector& getWelcomeScreenEntries(); std::vector& getFooterItems(); std::vector& getToolbarItems(); - }; + } + + /* Provider Registry. Allows adding new data providers to be created from the UI */ + namespace Provider { + + void add(const std::string &unlocalizedName); + + const std::vector& getEntries(); + + } }; } \ No newline at end of file diff --git a/plugins/libimhex/include/hex/api/event.hpp b/plugins/libimhex/include/hex/api/event.hpp index d7fb66c34..1a7251f55 100644 --- a/plugins/libimhex/include/hex/api/event.hpp +++ b/plugins/libimhex/include/hex/api/event.hpp @@ -117,6 +117,7 @@ namespace hex { EVENT_DEF(RequestOpenFile, std::string); EVENT_DEF(RequestChangeTheme, u32); EVENT_DEF(RequestOpenPopup, std::string); + EVENT_DEF(RequestCreateProvider, std::string, hex::prv::Provider **); EVENT_DEF(QuerySelection, Region&); diff --git a/include/helpers/disassembler.hpp b/plugins/libimhex/include/hex/helpers/disassembler.hpp similarity index 100% rename from include/helpers/disassembler.hpp rename to plugins/libimhex/include/hex/helpers/disassembler.hpp diff --git a/include/helpers/encoding_file.hpp b/plugins/libimhex/include/hex/helpers/encoding_file.hpp similarity index 100% rename from include/helpers/encoding_file.hpp rename to plugins/libimhex/include/hex/helpers/encoding_file.hpp diff --git a/include/helpers/loader_script_handler.hpp b/plugins/libimhex/include/hex/helpers/loader_script_handler.hpp similarity index 100% rename from include/helpers/loader_script_handler.hpp rename to plugins/libimhex/include/hex/helpers/loader_script_handler.hpp diff --git a/include/helpers/patches.hpp b/plugins/libimhex/include/hex/helpers/patches.hpp similarity index 100% rename from include/helpers/patches.hpp rename to plugins/libimhex/include/hex/helpers/patches.hpp diff --git a/include/helpers/project_file_handler.hpp b/plugins/libimhex/include/hex/helpers/project_file_handler.hpp similarity index 100% rename from include/helpers/project_file_handler.hpp rename to plugins/libimhex/include/hex/helpers/project_file_handler.hpp diff --git a/plugins/libimhex/include/hex/helpers/shared_data.hpp b/plugins/libimhex/include/hex/helpers/shared_data.hpp index f0c628f0f..ccf7a6012 100644 --- a/plugins/libimhex/include/hex/helpers/shared_data.hpp +++ b/plugins/libimhex/include/hex/helpers/shared_data.hpp @@ -77,6 +77,8 @@ namespace hex { static std::vector footerItems; static std::vector toolbarItems; + static std::vector providerNames; + static std::vector dataProcessorNodes; static u32 dataProcessorNodeIdCounter; static u32 dataProcessorLinkIdCounter; diff --git a/plugins/libimhex/source/api/content_registry.cpp b/plugins/libimhex/source/api/content_registry.cpp index 8e30cbafa..53a11ab47 100644 --- a/plugins/libimhex/source/api/content_registry.cpp +++ b/plugins/libimhex/source/api/content_registry.cpp @@ -269,4 +269,15 @@ namespace hex { std::vector& ContentRegistry::Interface::getToolbarItems() { return SharedData::toolbarItems; } + + + /* Providers */ + + void ContentRegistry::Provider::add(const std::string &unlocalizedName) { + SharedData::providerNames.push_back(unlocalizedName); + } + + const std::vector &ContentRegistry::Provider::getEntries() { + return SharedData::providerNames; + } } \ No newline at end of file diff --git a/source/helpers/encoding_file.cpp b/plugins/libimhex/source/helpers/encoding_file.cpp similarity index 97% rename from source/helpers/encoding_file.cpp rename to plugins/libimhex/source/helpers/encoding_file.cpp index 9dbb475ff..581cb936b 100644 --- a/source/helpers/encoding_file.cpp +++ b/plugins/libimhex/source/helpers/encoding_file.cpp @@ -1,4 +1,4 @@ -#include "helpers/encoding_file.hpp" +#include #include diff --git a/source/helpers/loader_script_handler.cpp b/plugins/libimhex/source/helpers/loader_script_handler.cpp similarity index 99% rename from source/helpers/loader_script_handler.cpp rename to plugins/libimhex/source/helpers/loader_script_handler.cpp index 3f0df3e09..2aca63d37 100644 --- a/source/helpers/loader_script_handler.cpp +++ b/plugins/libimhex/source/helpers/loader_script_handler.cpp @@ -1,4 +1,4 @@ -#include "helpers/loader_script_handler.hpp" +#include #include #include diff --git a/source/helpers/patches.cpp b/plugins/libimhex/source/helpers/patches.cpp similarity index 99% rename from source/helpers/patches.cpp rename to plugins/libimhex/source/helpers/patches.cpp index 50ca4fd17..2a2e95479 100644 --- a/source/helpers/patches.cpp +++ b/plugins/libimhex/source/helpers/patches.cpp @@ -1,4 +1,4 @@ -#include "helpers/patches.hpp" +#include #include diff --git a/source/helpers/project_file_handler.cpp b/plugins/libimhex/source/helpers/project_file_handler.cpp similarity index 98% rename from source/helpers/project_file_handler.cpp rename to plugins/libimhex/source/helpers/project_file_handler.cpp index 1149eabfa..7e1de098f 100644 --- a/source/helpers/project_file_handler.cpp +++ b/plugins/libimhex/source/helpers/project_file_handler.cpp @@ -1,4 +1,4 @@ -#include "helpers/project_file_handler.hpp" +#include #include diff --git a/plugins/libimhex/source/helpers/shared_data.cpp b/plugins/libimhex/source/helpers/shared_data.cpp index 4ef5f12c1..2610c60c3 100644 --- a/plugins/libimhex/source/helpers/shared_data.cpp +++ b/plugins/libimhex/source/helpers/shared_data.cpp @@ -29,6 +29,8 @@ namespace hex { std::vector SharedData::footerItems; std::vector SharedData::toolbarItems; + std::vector SharedData::providerNames; + std::vector SharedData::dataProcessorNodes; u32 SharedData::dataProcessorNodeIdCounter = 1; u32 SharedData::dataProcessorLinkIdCounter = 1; diff --git a/source/init/tasks.cpp b/source/init/tasks.cpp index ed258f5bf..54c4d79fa 100644 --- a/source/init/tasks.cpp +++ b/source/init/tasks.cpp @@ -6,31 +6,12 @@ #include #include #include +#include #include #include #include -#include "views/view_hexeditor.hpp" -#include "views/view_pattern_editor.hpp" -#include "views/view_pattern_data.hpp" -#include "views/view_hashes.hpp" -#include "views/view_information.hpp" -#include "views/view_help.hpp" -#include "views/view_tools.hpp" -#include "views/view_strings.hpp" -#include "views/view_data_inspector.hpp" -#include "views/view_disassembler.hpp" -#include "views/view_bookmarks.hpp" -#include "views/view_patches.hpp" -#include "views/view_command_palette.hpp" -#include "views/view_settings.hpp" -#include "views/view_data_processor.hpp" -#include "views/view_yara.hpp" -#include "views/view_constants.hpp" -#include "views/view_store.hpp" -#include "views/view_diff.hpp" - #include "helpers/plugin_manager.hpp" #include @@ -179,31 +160,6 @@ namespace hex::init { return true; } - bool loadDefaultViews() { - - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - ContentRegistry::Views::add(); - - return true; - } - bool deleteSharedData() { SharedData::deferredCalls.clear(); @@ -312,7 +268,6 @@ namespace hex::init { { "Checking for updates...", checkForUpdates }, { "Downloading information...", downloadInformation }, { "Creating directories...", createDirectories }, - { "Loading default views...", loadDefaultViews }, { "Loading settings...", loadSettings }, { "Loading plugins...", loadPlugins }, { "Loading fonts...", loadFonts }, diff --git a/source/window/window.cpp b/source/window/window.cpp index 18ca41511..0a6eabfd0 100644 --- a/source/window/window.cpp +++ b/source/window/window.cpp @@ -31,7 +31,7 @@ #include #include "helpers/plugin_manager.hpp" -#include "helpers/project_file_handler.hpp" +#include #include "init/tasks.hpp" #include @@ -559,6 +559,19 @@ namespace hex { EventManager::post("Open File"); if (ImGui::IconHyperlink(ICON_VS_NOTEBOOK, "hex.welcome.start.open_project"_lang)) EventManager::post("Open Project"); + if (ImGui::IconHyperlink(ICON_VS_TELESCOPE, "hex.welcome.start.open_other"_lang)) + ImGui::OpenPopup("hex.welcome.start.popup.open_other"_lang); + } + + if (ImGui::BeginPopup("hex.welcome.start.popup.open_other"_lang)) { + for (const auto &unlocalizedProviderName : ContentRegistry::Provider::getEntries()) { + if (ImGui::Hyperlink(LangEntry(unlocalizedProviderName))) { + EventManager::post(unlocalizedProviderName, nullptr); + ImGui::CloseCurrentPopup(); + } + } + + ImGui::EndPopup(); } ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 9); @@ -687,9 +700,9 @@ namespace hex { for (auto &view : ContentRegistry::Views::getEntries()) ImGui::DockBuilderDockWindow(view->getUnlocalizedName().data(), utilitiesId); - ImGui::DockBuilderDockWindow("hex.view.hexeditor.name", hexEditorId); - ImGui::DockBuilderDockWindow("hex.view.data_inspector.name", inspectorId); - ImGui::DockBuilderDockWindow("hex.view.pattern_data.name", patternDataId); + ImGui::DockBuilderDockWindow("hex.builtin.view.hexeditor.name", hexEditorId); + ImGui::DockBuilderDockWindow("hex.builtin.view.data_inspector.name", inspectorId); + ImGui::DockBuilderDockWindow("hex.builtin.view.pattern_data.name", patternDataId); ImGui::DockBuilderFinish(dockId); }