refactor: refactor tools_entries.cpp into several smaller files (#1418)

This commit is contained in:
iTrooz
2023-11-12 01:22:01 +01:00
committed by GitHub
parent 46b1b0ba17
commit b04cb7648e
21 changed files with 2723 additions and 2360 deletions

View File

@@ -0,0 +1,30 @@
#include <hex/helpers/utils.hpp>
#include <hex/api/localization.hpp>
#include <llvm/Demangle/Demangle.h>
#include <imgui.h>
#include <hex/ui/imgui_imhex_extensions.h>
namespace hex::plugin::builtin {
namespace impl {
void drawDemangler() {
static std::string mangledName, demangledName;
if (ImGui::InputTextWithHint("hex.builtin.tools.demangler.mangled"_lang, "Itanium, MSVC, Dlang & Rust", mangledName)) {
demangledName = llvm::demangle(mangledName);
if (demangledName == mangledName) {
demangledName = "???";
}
}
ImGui::Header("hex.builtin.tools.demangler.demangled"_lang);
if (ImGui::BeginChild("demangled", ImVec2(0, 200_scaled), true)) {
ImGui::TextFormattedWrappedSelectable("{}", demangledName);
}
ImGui::EndChild();
}
}
}