Compare commits

...

19 Commits

Author SHA1 Message Date
WerWolv
72ee1d186e build: Bumped version to 1.24.3 2022-10-12 12:48:50 +02:00
WerWolv
ee53eca19f patterns: Updated pattern language 2022-10-12 12:25:22 +02:00
WerWolv
7331b8d5ae node: Limit width of out variable access node 2022-10-12 12:24:54 +02:00
WerWolv
d17911d753 fix: Invalid axis labels in data information view 2022-10-12 12:24:11 +02:00
WerWolv
b41d01f126 lang: Added localization for new nodes 2022-10-12 12:18:27 +02:00
WerWolv
27fc3fd659 nodes: Added out variable access node 2022-10-12 12:18:18 +02:00
WerWolv
cc9dc90655 nodes: Added Float <-> Buffer casting nodes 2022-10-12 12:09:51 +02:00
WerWolv
015266181e fix: Various issue with the hex editor editing mode 2022-10-12 10:56:03 +02:00
WerWolv
299933c4f7 feat: Allow ASCII cells in Hex editor to be edited 2022-10-11 20:18:45 +02:00
WerWolv
5312d6f9fa fix: Data inspector still displaying entries with no selection 2022-10-11 20:18:16 +02:00
WerWolv
16eb7b3dbd ui: Fixed hex editor highlighting sometimes having gaps 2022-10-11 15:06:33 +02:00
WerWolv
cb9458dab4 patterns: Updated pattern language 2022-10-11 14:15:22 +02:00
WerWolv
e32a85a33f patterns: Updated pattern language 2022-10-11 09:00:07 +02:00
WerWolv
e4680fb0a2 fix: 64-Bit hex data visualizer only displaying 32 bit 2022-10-11 09:00:00 +02:00
WerWolv
1c52e0018a fix: Prevent same pl runtime from running simultaneously when loading provider 2022-10-10 23:16:54 +02:00
WerWolv
ee2838bada build: Bumped version to 1.24.2 2022-10-10 20:52:48 +02:00
iTrooz_
4d17265e90 git: Use action to manage ccache + minor fixes (#775)
* use action for ccache + limit cache size

* remove 'prepare cache' step for Windows

* remove libpython from CI

* fix the restore key for MacOS

* remove Rust from CI

* do not pin appimage-builder version since issue with it has been resolved

* use ccache action for CodeQL

* Rebased onto latest master

Co-authored-by: WerWolv <werwolv98@gmail.com>
2022-10-10 20:37:00 +02:00
WerWolv
6a6b860622 patterns: Updated pattern language 2022-10-10 20:33:43 +02:00
WerWolv
e78c452daf fix: Hex editor selection not showing rendering properly 2022-10-10 20:33:34 +02:00
22 changed files with 343 additions and 145 deletions

View File

@@ -25,14 +25,13 @@ jobs:
with:
languages: 'cpp'
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
path: |
~/.cache/ccache
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
with:

View File

@@ -28,21 +28,13 @@ jobs:
with:
submodules: recursive
- name: 📜 Prepare Cache
id: prep-ccache
shell: bash
run: |
mkdir -p "${CCACHE_DIR}"
echo "::set-output name=dir::$CCACHE_DIR"
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
id: cache-ccache
with:
path: |
${{ steps.prep-ccache.outputs.dir }}
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
@@ -64,37 +56,23 @@ jobs:
glfw:p
file:p
mbedtls:p
python:p
freetype:p
dlfcn:p
- name: ⬇️ Install dependencies
run: |
curl --proto '=https' --tlsv1.2 -sSf https://win.rustup.rs > rustup-init.exe
./rustup-init.exe -y --default-host=x86_64-pc-windows-gnu --default-toolchain=none
rm rustup-init.exe
$USERPROFILE/.cargo/bin/rustup.exe target add x86_64-pc-windows-gnu
$USERPROFILE/.cargo/bin/rustup.exe default nightly
# Windows cmake build
- name: 🛠️ Build
run: |
mkdir -p build
cd build
# Get path to mingw python library
PYTHON_LIB_NAME=$(pkg-config --libs-only-l python3 | sed 's/^-l//' | sed 's/ //')
PYTHON_LIB_PATH=$(cygpath -m $(which lib${PYTHON_LIB_NAME}.dll))
cmake -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCREATE_PACKAGE=ON \
-DPython_LIBRARY="$PYTHON_LIB_PATH" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$USERPROFILE/.cargo/bin/" \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
..
mingw32-make -j4 install
@@ -166,13 +144,12 @@ jobs:
run: |
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
path: |
~/Library/Caches/ccache
key: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
restore-keys: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
@@ -260,13 +237,12 @@ jobs:
with:
submodules: recursive
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
path: |
~/.cache/ccache
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore other caches
uses: actions/cache@v3
@@ -290,14 +266,7 @@ jobs:
sudo apt install -y python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fuse
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
sudo pip3 install appimage-builder==1.0.0
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
sh rustup-init.sh -y --default-toolchain none
rm rustup-init.sh
$HOME/.cargo/bin/rustup install nightly
$HOME/.cargo/bin/rustup target add x86_64-unknown-linux-gnu
$HOME/.cargo/bin/rustup default nightly
sudo pip3 install appimage-builder
# Ubuntu cmake build
- name: 🛠️ Build
@@ -311,7 +280,6 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$HOME/.cargo/bin/" \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
..
make -j 4 install DESTDIR=DebDir
@@ -347,7 +315,6 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$HOME/.cargo/bin/" \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
-DIMHEX_PLUGINS_IN_SHARE=ON \
-DIMHEX_USE_BUNDLED_CA=ON \
@@ -412,13 +379,12 @@ jobs:
run: |
dist/get_deps_archlinux.sh --noconfirm
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
path: |
~/.cache/ccache
key: archlinux-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: archlinux-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
@@ -514,7 +480,6 @@ jobs:
libcurl-devel \
llvm-devel \
mbedtls-devel \
python3-devel \
rpm-build \
yara-devel
@@ -527,13 +492,12 @@ jobs:
run: |
dist/get_deps_fedora.sh
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
path: |
~/.cache/ccache
key: fedora-${{ matrix.release }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: fedora-${{ matrix.release }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Set version variable
run: |

View File

@@ -22,13 +22,12 @@ jobs:
with:
submodules: recursive
- name: 📜 Restore ccache
uses: actions/cache@v3
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
path: |
~/.cache/ccache
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache

View File

@@ -1 +1 @@
1.24.1
1.24.3

View File

@@ -586,7 +586,7 @@ namespace hex {
}, &userData);
ImGui::PopID();
return userData.editingDone || ImGui::IsKeyPressed(ImGuiKey_Enter) || ImGui::IsKeyPressed(ImGuiKey_Enter);
return userData.editingDone || ImGui::IsKeyPressed(ImGuiKey_Enter) || ImGui::IsKeyPressed(ImGuiKey_Escape);
}
void impl::addDataVisualizer(const std::string &unlocalizedName, DataVisualizer *visualizer) {

View File

@@ -17,6 +17,7 @@ namespace hex::plugin::builtin {
struct {
std::string sourceCode;
std::mutex runtimeMutex;
std::unique_ptr<pl::PatternLanguage> runtime;
bool executionDone = true;
} patternLanguage;

View File

@@ -24,9 +24,11 @@ namespace hex::plugin::builtin {
void registerEvents();
void registerMenuItems();
void drawCell(u64 address, u8 *data, size_t size, bool hovered);
enum class CellType { None, Hex, ASCII };
void drawCell(u64 address, u8 *data, size_t size, bool hovered, CellType cellType);
void drawPopup();
void drawSelectionFrame(u32 x, u32 y, u64 byteAddress, u16 bytesPerCell, const ImVec2 &cellPos, const ImVec2 &cellSize);
void drawSelectionFrame(u32 x, u32 y, u64 byteAddress, u16 bytesPerCell, const ImVec2 &cellPos, const ImVec2 &cellSize) const;
public:
void setSelection(const Region &region) { this->setSelection(region.getStartAddress(), region.getEndAddress()); }
@@ -49,7 +51,7 @@ namespace hex::plugin::builtin {
}
}
[[nodiscard]] Region getSelection() const {
[[nodiscard]] static Region getSelection() {
auto &data = ProviderExtraData::getCurrent().editor;
if (!isSelectionValid())
@@ -62,7 +64,7 @@ namespace hex::plugin::builtin {
return { start, size };
}
[[nodiscard]] bool isSelectionValid() const {
[[nodiscard]] static bool isSelectionValid() {
auto &data = ProviderExtraData::getCurrent().editor;
return data.selectionStart.has_value() && data.selectionEnd.has_value();
@@ -131,6 +133,7 @@ namespace hex::plugin::builtin {
u16 m_visibleRowCount = 0;
CellType m_editingCellType = CellType::None;
std::optional<u64> m_editingAddress;
bool m_shouldModifyValue = false;
bool m_enteredEditingMode = false;

View File

@@ -7,6 +7,8 @@
#include <hex/helpers/logger.hpp>
#include <hex/providers/provider.hpp>
#include <content/helpers/provider_extra_data.hpp>
#include <cctype>
#include <random>
@@ -402,8 +404,8 @@ namespace hex::plugin::builtin {
void process() override {
auto input = this->getIntegerOnInput(0);
std::vector<u8> output(sizeof(u64), 0x00);
std::memcpy(output.data(), &input, sizeof(u64));
std::vector<u8> output(sizeof(input), 0x00);
std::memcpy(output.data(), &input, sizeof(input));
this->setBufferOnOutput(1, output);
}
@@ -416,16 +418,47 @@ namespace hex::plugin::builtin {
void process() override {
auto input = this->getBufferOnInput(0);
if (input.empty() || input.size() > sizeof(u64))
i64 output = 0;
if (input.empty() || input.size() > sizeof(output))
throwNodeError("Buffer is empty or bigger than 64 bits");
u64 output = 0;
std::memcpy(&output, input.data(), input.size());
this->setIntegerOnOutput(1, output);
}
};
class NodeCastFloatToBuffer : public dp::Node {
public:
NodeCastFloatToBuffer() : Node("hex.builtin.nodes.casting.float_to_buffer.header", { dp::Attribute(dp::Attribute::IOType::In, dp::Attribute::Type::Float, "hex.builtin.nodes.common.input"), dp::Attribute(dp::Attribute::IOType::Out, dp::Attribute::Type::Buffer, "hex.builtin.nodes.common.output") }) { }
void process() override {
auto input = this->getFloatOnInput(0);
std::vector<u8> output(sizeof(input), 0x00);
std::memcpy(output.data(), &input, sizeof(input));
this->setBufferOnOutput(1, output);
}
};
class NodeCastBufferToFloat : public dp::Node {
public:
NodeCastBufferToFloat() : Node("hex.builtin.nodes.casting.buffer_to_float.header", { dp::Attribute(dp::Attribute::IOType::In, dp::Attribute::Type::Buffer, "hex.builtin.nodes.common.input"), dp::Attribute(dp::Attribute::IOType::Out, dp::Attribute::Type::Float, "hex.builtin.nodes.common.output") }) { }
void process() override {
auto input = this->getBufferOnInput(0);
float output = 0;
if (input.empty() || input.size() != sizeof(output))
throwNodeError("Buffer is empty or not the right size to fit a float");
std::memcpy(&output, input.data(), input.size());
this->setFloatOnOutput(1, output);
}
};
class NodeArithmeticAdd : public dp::Node {
public:
NodeArithmeticAdd() : Node("hex.builtin.nodes.arithmetic.add.header", { dp::Attribute(dp::Attribute::IOType::In, dp::Attribute::Type::Integer, "hex.builtin.nodes.common.input.a"), dp::Attribute(dp::Attribute::IOType::In, dp::Attribute::Type::Integer, "hex.builtin.nodes.common.input.b"), dp::Attribute(dp::Attribute::IOType::Out, dp::Attribute::Type::Integer, "hex.builtin.nodes.common.output") }) { }
@@ -1019,6 +1052,43 @@ namespace hex::plugin::builtin {
std::array<ImU64, 256> m_counts = { 0 };
};
class NodePatternLanguageOutVariable : public dp::Node {
public:
NodePatternLanguageOutVariable() : Node("hex.builtin.nodes.pattern_language.out_var.header", { dp::Attribute(dp::Attribute::IOType::Out, dp::Attribute::Type::Buffer, "hex.builtin.nodes.common.output") }) { }
void drawNode() override {
ImGui::PushItemWidth(100);
ImGui::InputText("##name", this->m_name);
ImGui::PopItemWidth();
}
void process() override {
auto &pl = ProviderExtraData::getCurrent().patternLanguage;
std::scoped_lock lock(pl.runtimeMutex);
const auto &outVars = pl.runtime->getOutVariables();
if (outVars.contains(this->m_name)) {
std::visit(overloaded {
[](const std::string &) {},
[](pl::ptrn::Pattern *) {},
[this](auto &&value) {
std::vector<u8> buffer(std::min<size_t>(sizeof(value), 8));
std::memcpy(buffer.data(), &value, buffer.size());
this->setBufferOnOutput(0, buffer);
}
}, outVars.at(this->m_name));
} else {
throwNodeError(hex::format("Out variable '{}' has not been defined!", this->m_name));
}
}
private:
std::string m_name;
};
void registerDataProcessorNodes() {
ContentRegistry::DataProcessorNode::add<NodeInteger>("hex.builtin.nodes.constants", "hex.builtin.nodes.constants.int");
ContentRegistry::DataProcessorNode::add<NodeFloat>("hex.builtin.nodes.constants", "hex.builtin.nodes.constants.float");
@@ -1038,6 +1108,8 @@ namespace hex::plugin::builtin {
ContentRegistry::DataProcessorNode::add<NodeCastIntegerToBuffer>("hex.builtin.nodes.casting", "hex.builtin.nodes.casting.int_to_buffer");
ContentRegistry::DataProcessorNode::add<NodeCastBufferToInteger>("hex.builtin.nodes.casting", "hex.builtin.nodes.casting.buffer_to_int");
ContentRegistry::DataProcessorNode::add<NodeCastFloatToBuffer>("hex.builtin.nodes.casting", "hex.builtin.nodes.casting.float_to_buffer");
ContentRegistry::DataProcessorNode::add<NodeCastBufferToFloat>("hex.builtin.nodes.casting", "hex.builtin.nodes.casting.buffer_to_float");
ContentRegistry::DataProcessorNode::add<NodeArithmeticAdd>("hex.builtin.nodes.arithmetic", "hex.builtin.nodes.arithmetic.add");
ContentRegistry::DataProcessorNode::add<NodeArithmeticSubtract>("hex.builtin.nodes.arithmetic", "hex.builtin.nodes.arithmetic.sub");
@@ -1071,6 +1143,8 @@ namespace hex::plugin::builtin {
ContentRegistry::DataProcessorNode::add<NodeVisualizerLayeredDistribution>("hex.builtin.nodes.visualizer", "hex.builtin.nodes.visualizer.layered_dist");
ContentRegistry::DataProcessorNode::add<NodeVisualizerImage>("hex.builtin.nodes.visualizer", "hex.builtin.nodes.visualizer.image");
ContentRegistry::DataProcessorNode::add<NodeVisualizerByteDistribution>("hex.builtin.nodes.visualizer", "hex.builtin.nodes.visualizer.byte_distribution");
ContentRegistry::DataProcessorNode::add<NodePatternLanguageOutVariable>("hex.builtin.nodes.pattern_language", "hex.builtin.nodes.pattern_language.out_var");
}
}

View File

@@ -51,8 +51,8 @@ namespace hex::plugin::builtin {
constexpr static inline auto ByteCount = sizeof(T);
constexpr static inline auto CharCount = ByteCount * 2;
const static inline auto FormattingUpperCase = hex::format("%0{}X", CharCount);
const static inline auto FormattingLowerCase = hex::format("%0{}x", CharCount);
const static inline auto FormattingUpperCase = hex::format("%0{}llX", CharCount);
const static inline auto FormattingLowerCase = hex::format("%0{}llx", CharCount);
const char *getFormatString(bool upperCase) {
if (upperCase)
@@ -104,8 +104,8 @@ namespace hex::plugin::builtin {
constexpr static inline auto ByteCount = 1;
constexpr static inline auto CharCount = ByteCount * 2;
const static inline auto FormattingUpperCase = hex::format("%0{}X", CharCount);
const static inline auto FormattingLowerCase = hex::format("%0{}x", CharCount);
const static inline auto FormattingUpperCase = hex::format("%0{}llX", CharCount);
const static inline auto FormattingLowerCase = hex::format("%0{}llx", CharCount);
static const char *getFormatString(bool upperCase) {
if (upperCase)

View File

@@ -19,11 +19,11 @@ namespace hex::plugin::builtin {
ViewDataInspector::ViewDataInspector() : View("hex.builtin.view.data_inspector.name") {
EventManager::subscribe<EventRegionSelected>(this, [this](Region region) {
auto provider = ImHexApi::Provider::get();
if (!ImHexApi::Provider::isValid() || region.address == (size_t)-1) {
if (!ImHexApi::Provider::isValid() || region == Region::Invalid()) {
this->m_validBytes = 0;
} else {
auto provider = ImHexApi::Provider::get();
this->m_validBytes = u64(provider->getActualSize() - region.address);
this->m_startAddress = region.address;
}

View File

@@ -14,6 +14,8 @@
namespace hex::plugin::builtin {
/* Popups */
class PopupGoto : public ViewHexEditor::Popup {
public:
@@ -25,7 +27,7 @@ namespace hex::plugin::builtin {
ImGui::EndTabItem();
}
ImGui::BeginDisabled(!editor->isSelectionValid());
ImGui::BeginDisabled(!ViewHexEditor::isSelectionValid());
if (ImGui::BeginTabItem("hex.builtin.view.hex_editor.goto.offset.relative"_lang)) {
this->m_mode = Mode::Relative;
ImGui::EndTabItem();
@@ -57,7 +59,7 @@ namespace hex::plugin::builtin {
}
break;
case Mode::Relative: {
const auto selection = editor->getSelection();
const auto selection = ViewHexEditor::getSelection();
newAddress = selection.getStartAddress() + inputResult;
}
break;
@@ -206,7 +208,7 @@ namespace hex::plugin::builtin {
auto region = this->findSequence(searchSequence, this->m_backwards);
if (region.has_value()) {
if (editor->getSelection() == region) {
if (ViewHexEditor::getSelection() == region) {
if (this->m_nextSearchPosition.has_value())
this->m_searchPosition = this->m_nextSearchPosition.value();
this->m_nextSearchPosition.reset();
@@ -453,6 +455,68 @@ namespace hex::plugin::builtin {
u64 m_size;
};
/* Data Visualizer */
class DataVisualizerAscii : public hex::ContentRegistry::HexEditor::DataVisualizer {
public:
DataVisualizerAscii() : DataVisualizer(1, 1) { }
void draw(u64 address, const u8 *data, size_t size, bool upperCase) override {
hex::unused(address, upperCase);
if (size == 1) {
const u8 c = data[0];
if (std::isprint(c))
ImGui::Text("%c", c);
else
ImGui::TextDisabled(".");
}
else
ImGui::TextDisabled(".");
}
bool drawEditing(u64 address, u8 *data, size_t size, bool upperCase, bool startedEditing) override {
hex::unused(address, startedEditing, upperCase);
if (size == 1) {
struct UserData {
u8 *data;
i32 maxChars;
bool editingDone;
};
UserData userData = {
.data = data,
.maxChars = this->getMaxCharsPerCell(),
.editingDone = false
};
ImGui::PushID(reinterpret_cast<void*>(address));
char buffer[2] = { std::isprint(data[0]) ? char(data[0]) : '.', 0x00 };
ImGui::InputText("##editing_input", buffer, 2, TextInputFlags | ImGuiInputTextFlags_CallbackEdit, [](ImGuiInputTextCallbackData *data) -> int {
auto &userData = *reinterpret_cast<UserData*>(data->UserData);
if (data->BufTextLen >= userData.maxChars) {
userData.editingDone = true;
userData.data[0] = data->Buf[0];
}
return 0;
}, &userData);
ImGui::PopID();
return userData.editingDone || ImGui::IsKeyPressed(ImGuiKey_Enter) || ImGui::IsKeyPressed(ImGuiKey_Escape);
}
else
return false;
}
};
/* Hex Editor */
ViewHexEditor::ViewHexEditor() : View("hex.builtin.view.hex_editor.name") {
this->m_currDataVisualizer = ContentRegistry::HexEditor::impl::getVisualizers()["hex.builtin.visualizer.hexadecimal.8bit"];
@@ -523,11 +587,8 @@ namespace hex::plugin::builtin {
}
std::optional<color_t> ViewHexEditor::applySelectionColor(u64 byteAddress, std::optional<color_t> color) {
if (!color.has_value())
return std::nullopt;
if (this->isSelectionValid()) {
auto selection = this->getSelection();
if (isSelectionValid()) {
auto selection = getSelection();
if (byteAddress >= selection.getStartAddress() && byteAddress <= selection.getEndAddress()) {
if (color.has_value())
@@ -617,7 +678,9 @@ namespace hex::plugin::builtin {
ImGui::PopStyleVar();
}
void ViewHexEditor::drawCell(u64 address, u8 *data, size_t size, bool hovered) {
void ViewHexEditor::drawCell(u64 address, u8 *data, size_t size, bool hovered, CellType cellType) {
static DataVisualizerAscii asciiVisualizer;
auto provider = ImHexApi::Provider::get();
if (this->m_shouldUpdateEditingValue) {
@@ -627,8 +690,11 @@ namespace hex::plugin::builtin {
std::memcpy(this->m_editingBytes.data(), data, size);
}
if (this->m_editingAddress != address) {
this->m_currDataVisualizer->draw(address, data, size, this->m_upperCaseHex);
if (this->m_editingAddress != address || this->m_editingCellType != cellType) {
if (cellType == CellType::Hex)
this->m_currDataVisualizer->draw(address, data, size, this->m_upperCaseHex);
else
asciiVisualizer.draw(address, data, size, this->m_upperCaseHex);
if (hovered && provider->isWritable()) {
// Enter editing mode when double-clicking a cell
@@ -639,6 +705,7 @@ namespace hex::plugin::builtin {
this->m_editingBytes.resize(size);
std::memcpy(this->m_editingBytes.data(), data, size);
this->m_editingCellType = cellType;
}
}
}
@@ -646,7 +713,13 @@ namespace hex::plugin::builtin {
ImGui::SetKeyboardFocusHere();
ImGui::SetNextFrameWantCaptureKeyboard(true);
if (this->m_currDataVisualizer->drawEditing(*this->m_editingAddress, this->m_editingBytes.data(), this->m_editingBytes.size(), this->m_upperCaseHex, this->m_enteredEditingMode) || this->m_shouldModifyValue) {
bool shouldExitEditingMode = true;
if (cellType == this->m_editingCellType && cellType == CellType::Hex)
shouldExitEditingMode = this->m_currDataVisualizer->drawEditing(*this->m_editingAddress, this->m_editingBytes.data(), this->m_editingBytes.size(), this->m_upperCaseHex, this->m_enteredEditingMode);
else if (cellType == this->m_editingCellType && cellType == CellType::ASCII)
shouldExitEditingMode = asciiVisualizer.drawEditing(*this->m_editingAddress, this->m_editingBytes.data(), this->m_editingBytes.size(), this->m_upperCaseHex, this->m_enteredEditingMode);
if (shouldExitEditingMode || this->m_shouldModifyValue) {
provider->write(*this->m_editingAddress, this->m_editingBytes.data(), this->m_editingBytes.size());
@@ -666,19 +739,20 @@ namespace hex::plugin::builtin {
this->m_shouldUpdateEditingValue = true;
}
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left) && !hovered) {
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left) && !hovered && !this->m_enteredEditingMode) {
this->m_editingAddress = std::nullopt;
this->m_shouldModifyValue = false;
}
this->m_enteredEditingMode = false;
if (!this->m_editingAddress.has_value())
this->m_editingCellType = CellType::None;
}
}
void ViewHexEditor::drawSelectionFrame(u32 x, u32 y, u64 byteAddress, u16 bytesPerCell, const ImVec2 &cellPos, const ImVec2 &cellSize) {
if (!this->isSelectionValid()) return;
void ViewHexEditor::drawSelectionFrame(u32 x, u32 y, u64 byteAddress, u16 bytesPerCell, const ImVec2 &cellPos, const ImVec2 &cellSize) const {
if (!isSelectionValid()) return;
const auto selection = this->getSelection();
const auto selection = getSelection();
if (!Region { byteAddress, 1 }.isWithin(selection))
return;
@@ -866,19 +940,22 @@ namespace hex::plugin::builtin {
if (isColumnSeparatorColumn(x + 1, columnCount)) {
auto separatorAddress = x + y * columnCount;
if ((this->isSelectionValid() && this->getSelection().overlaps({ separatorAddress, 1 }) && this->getSelection().getEndAddress() != separatorAddress) || cellColors[x] == cellColors[x + 1])
auto [nextForegroundColor, nextBackgroundColor] = cellColors[x + 1];
if ((isSelectionValid() && getSelection().overlaps({ separatorAddress, 1 }) && getSelection().getEndAddress() != separatorAddress) || backgroundColor == nextBackgroundColor)
cellSize.x += SeparatorColumWidth + 1;
}
if (y == u64(clipper.DisplayStart))
cellSize.y -= (ImGui::GetStyle().CellPadding.y + 1);
backgroundColor = applySelectionColor(byteAddress, backgroundColor);
// Draw highlights and selection
if (backgroundColor.has_value()) {
auto drawList = ImGui::GetWindowDrawList();
// Draw background color
drawList->AddRectFilled(cellStartPos, cellStartPos + cellSize, applySelectionColor(byteAddress, backgroundColor).value());
drawList->AddRectFilled(cellStartPos, cellStartPos + cellSize, backgroundColor.value());
// Draw frame around mouse selection
this->drawSelectionFrame(x, y, byteAddress, bytesPerCell, cellStartPos, cellSize);
@@ -896,7 +973,7 @@ namespace hex::plugin::builtin {
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
ImGui::PushItemWidth((CharacterSize * maxCharsPerCell).x);
if (isCurrRegionValid(byteAddress))
this->drawCell(byteAddress, &bytes[x * bytesPerCell], bytesPerCell, cellHovered);
this->drawCell(byteAddress, &bytes[x * bytesPerCell], bytesPerCell, cellHovered, CellType::Hex);
else
ImGui::TextFormatted("{}", std::string(maxCharsPerCell, '?'));
ImGui::PopItemWidth();
@@ -935,23 +1012,27 @@ namespace hex::plugin::builtin {
auto [foregroundColor, backgroundColor] = cellColors[x / bytesPerCell];
backgroundColor = applySelectionColor(byteAddress, backgroundColor);
// Draw highlights and selection
if (backgroundColor.has_value()) {
auto drawList = ImGui::GetWindowDrawList();
// Draw background color
drawList->AddRectFilled(cellStartPos, cellStartPos + cellSize, applySelectionColor(byteAddress, backgroundColor).value());
drawList->AddRectFilled(cellStartPos, cellStartPos + cellSize, backgroundColor.value());
this->drawSelectionFrame(x, y, byteAddress, 1, cellStartPos, cellSize);
}
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + this->m_characterCellPadding / 2);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
ImGui::PushItemWidth(CharacterSize.x);
if (!isCurrRegionValid(byteAddress))
ImGui::TextFormatted("?");
else if (std::isprint(bytes[x]))
ImGui::TextFormatted("{:c}", bytes[x]);
else
ImGui::TextDisabled(".");
this->drawCell(byteAddress, &bytes[x], 1, cellHovered, CellType::ASCII);
ImGui::PopItemWidth();
ImGui::PopStyleVar();
}
}
@@ -993,12 +1074,14 @@ namespace hex::plugin::builtin {
if (x < validBytes && isCurrRegionValid(address)) {
auto [foregroundColor, backgroundColor] = cellColors[x / bytesPerCell];
backgroundColor = applySelectionColor(address, backgroundColor);
// Draw highlights and selection
if (backgroundColor.has_value()) {
auto drawList = ImGui::GetWindowDrawList();
// Draw background color
drawList->AddRectFilled(cellStartPos, cellStartPos + cellSize, applySelectionColor(address, backgroundColor).value());
drawList->AddRectFilled(cellStartPos, cellStartPos + cellSize, backgroundColor.value());
this->drawSelectionFrame(x, y, address, 1, cellStartPos, cellSize);
}
@@ -1019,7 +1102,7 @@ namespace hex::plugin::builtin {
}
// Scroll to the cursor if it's either at the top or bottom edge of the screen
if (this->m_shouldScrollToSelection && this->isSelectionValid()) {
if (this->m_shouldScrollToSelection && isSelectionValid()) {
// Make sure simply clicking on a byte at the edge of the screen won't cause scrolling
if ((ImGui::IsMouseDown(ImGuiMouseButton_Left) && providerData.selectionStart != providerData.selectionEnd)) {
auto fractionPerLine = 1.0 / (this->m_visibleRowCount + 1);
@@ -1043,7 +1126,7 @@ namespace hex::plugin::builtin {
this->m_shouldJumpWhenOffScreen = false;
const auto pageAddress = provider->getCurrentPageAddress() + provider->getBaseAddress();
auto newSelection = this->getSelection();
auto newSelection = getSelection();
newSelection.address -= pageAddress;
if ((newSelection.getStartAddress()) < u64(clipper.DisplayStart * this->m_bytesPerRow))
@@ -1060,7 +1143,7 @@ namespace hex::plugin::builtin {
if (this->m_shouldJumpToSelection) {
this->m_shouldJumpToSelection = false;
auto newSelection = this->getSelection();
auto newSelection = getSelection();
provider->setCurrentPage(provider->getPageOfAddress(newSelection.address).value_or(0));
const auto pageAddress = provider->getCurrentPageAddress() + provider->getBaseAddress();
@@ -1093,6 +1176,8 @@ namespace hex::plugin::builtin {
ImGui::EndTable();
}
ImGui::PopStyleVar();
this->m_enteredEditingMode = false;
}
void ViewHexEditor::drawFooter(const ImVec2 &size) {
@@ -1135,9 +1220,9 @@ namespace hex::plugin::builtin {
// Selection
ImGui::TableNextColumn();
{
auto selection = this->getSelection();
auto selection = getSelection();
std::string value;
if (this->isSelectionValid()) {
if (isSelectionValid()) {
value = hex::format("0x{0:08X} - 0x{1:08X} (0x{2:X} | {3})",
selection.getStartAddress(),
selection.getEndAddress(),
@@ -1295,17 +1380,17 @@ namespace hex::plugin::builtin {
});
// Remove selection
ShortcutManager::addShortcut(this, Keys::Escape, [this] {
ShortcutManager::addShortcut(this, Keys::Escape, [] {
auto &data = ProviderExtraData::getCurrent().editor;
data.selectionStart.reset();
data.selectionEnd.reset();
EventManager::post<EventRegionSelected>(this->getSelection());
EventManager::post<EventRegionSelected>(getSelection());
});
// Move cursor around
ShortcutManager::addShortcut(this, Keys::Up, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
if (selection.getEndAddress() >= this->m_bytesPerRow) {
auto pos = selection.getEndAddress() - this->m_bytesPerRow;
@@ -1315,7 +1400,7 @@ namespace hex::plugin::builtin {
}
});
ShortcutManager::addShortcut(this, Keys::Down, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
auto pos = selection.getEndAddress() + this->m_bytesPerRow;
this->setSelection(pos, pos);
@@ -1323,7 +1408,7 @@ namespace hex::plugin::builtin {
this->jumpIfOffScreen();
});
ShortcutManager::addShortcut(this, Keys::Left, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
if (selection.getEndAddress() > 0) {
auto pos = selection.getEndAddress() - 1;
@@ -1333,7 +1418,7 @@ namespace hex::plugin::builtin {
}
});
ShortcutManager::addShortcut(this, Keys::Right, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
auto pos = selection.getEndAddress() + 1;
this->setSelection(pos, pos);
@@ -1342,7 +1427,7 @@ namespace hex::plugin::builtin {
});
ShortcutManager::addShortcut(this, Keys::PageUp, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
u64 visibleByteCount = this->m_bytesPerRow * this->m_visibleRowCount;
if (selection.getEndAddress() >= visibleByteCount) {
@@ -1353,7 +1438,7 @@ namespace hex::plugin::builtin {
}
});
ShortcutManager::addShortcut(this, Keys::PageDown, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
auto pos = selection.getEndAddress() + (this->m_bytesPerRow * this->m_visibleRowCount);
this->setSelection(pos, pos);
@@ -1363,14 +1448,14 @@ namespace hex::plugin::builtin {
// Move selection around
ShortcutManager::addShortcut(this, SHIFT + Keys::Up, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
this->setSelection(std::max<u64>(selection.getStartAddress(), this->m_bytesPerRow) - this->m_bytesPerRow, selection.getEndAddress());
this->scrollToSelection();
this->jumpIfOffScreen();
});
ShortcutManager::addShortcut(this, SHIFT + Keys::Down, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
this->setSelection(selection.getStartAddress() + this->m_bytesPerRow, selection.getEndAddress());
this->scrollToSelection();
@@ -1378,21 +1463,21 @@ namespace hex::plugin::builtin {
});
ShortcutManager::addShortcut(this, SHIFT + Keys::Left, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
this->setSelection(std::max<u64>(selection.getStartAddress(), 1) - 1, selection.getEndAddress());
this->scrollToSelection();
this->jumpIfOffScreen();
});
ShortcutManager::addShortcut(this, SHIFT + Keys::Right, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
this->setSelection(selection.getStartAddress() + 1, selection.getEndAddress());
this->scrollToSelection();
this->jumpIfOffScreen();
});
ShortcutManager::addShortcut(this, Keys::PageUp, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
u64 visibleByteCount = this->m_bytesPerRow * this->m_visibleRowCount;
if (selection.getEndAddress() >= visibleByteCount) {
@@ -1403,7 +1488,7 @@ namespace hex::plugin::builtin {
}
});
ShortcutManager::addShortcut(this, Keys::PageDown, [this] {
auto selection = this->getSelection();
auto selection = getSelection();
auto pos = selection.getEndAddress() + (this->m_bytesPerRow * this->m_visibleRowCount);
this->setSelection(pos, selection.getEndAddress());
@@ -1423,18 +1508,18 @@ namespace hex::plugin::builtin {
});
// Copy
ShortcutManager::addShortcut(this, CTRL + Keys::C, [this] {
const auto selection = this->getSelection();
ShortcutManager::addShortcut(this, CTRL + Keys::C, [] {
const auto selection = getSelection();
copyBytes(selection);
});
ShortcutManager::addShortcut(this, CTRL + SHIFT + Keys::C, [this] {
const auto selection = this->getSelection();
ShortcutManager::addShortcut(this, CTRL + SHIFT + Keys::C, [] {
const auto selection = getSelection();
copyString(selection);
});
// Paste
ShortcutManager::addShortcut(this, CTRL + Keys::V, [this] {
const auto selection = this->getSelection();
ShortcutManager::addShortcut(this, CTRL + Keys::V, [] {
const auto selection = getSelection();
pasteBytes(selection);
});
@@ -1477,16 +1562,16 @@ namespace hex::plugin::builtin {
}
});
EventManager::subscribe<QuerySelection>(this, [this](auto &region) {
if (this->isSelectionValid())
region = this->getSelection();
EventManager::subscribe<QuerySelection>(this, [](auto &region) {
if (isSelectionValid())
region = getSelection();
});
EventManager::subscribe<EventProviderChanged>(this, [this](auto, auto) {
this->m_shouldUpdateScrollPosition = true;
if (this->isSelectionValid())
EventManager::post<EventRegionSelected>(this->getSelection());
if (isSelectionValid())
EventManager::post<EventRegionSelected>(getSelection());
});
EventManager::subscribe<EventSettingsChanged>(this, [this] {

View File

@@ -208,7 +208,7 @@ namespace hex::plugin::builtin {
ImGui::TextUnformatted("hex.builtin.view.information.distribution"_lang);
if (ImPlot::BeginPlot("##distribution", ImVec2(-1, 0), ImPlotFlags_NoChild | ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect)) {
ImPlot::SetupAxes("Address", "Count", ImPlotAxisFlags_Lock, ImPlotAxisFlags_Lock | ImPlotAxisFlags_LogScale);
ImPlot::SetupAxes("hex.builtin.common.value"_lang, "hex.builtin.common.count"_lang, ImPlotAxisFlags_Lock, ImPlotAxisFlags_Lock | ImPlotAxisFlags_LogScale);
ImPlot::SetupAxesLimits(0, 256, 1, double(*std::max_element(this->m_valueCounts.begin(), this->m_valueCounts.end())) * 1.1F, ImGuiCond_Always);
static auto x = [] {
@@ -227,7 +227,7 @@ namespace hex::plugin::builtin {
ImGui::TextUnformatted("hex.builtin.view.information.entropy"_lang);
if (ImPlot::BeginPlot("##entropy", ImVec2(-1, 0), ImPlotFlags_NoChild | ImPlotFlags_CanvasOnly)) {
ImPlot::SetupAxes("Address", "Entropy", ImPlotAxisFlags_Lock, ImPlotAxisFlags_Lock);
ImPlot::SetupAxes("hex.builtin.common.address"_lang, "hex.builtin.view.information.entropy"_lang, ImPlotAxisFlags_Lock, ImPlotAxisFlags_Lock);
ImPlot::SetupAxesLimits(0, this->m_blockEntropy.size(), -0.1F, 1.1F, ImGuiCond_Always);
ImPlot::PlotLine("##entropy_line", this->m_blockEntropy.data(), this->m_blockEntropy.size());

View File

@@ -123,6 +123,7 @@ namespace hex::plugin::builtin {
data.sourceCode = this->m_textEditor.GetText();
}
std::scoped_lock lock(data.runtimeMutex);
auto &runtime = data.runtime;
auto mimeType = magic::getMIMEType(provider);
@@ -830,6 +831,7 @@ namespace hex::plugin::builtin {
EventManager::post<EventHighlightingChanged>();
TaskManager::createTask("hex.builtin.view.pattern_editor.evaluating", TaskManager::NoProgress, [this, &patternLanguage, code](auto &task) {
std::scoped_lock lock(patternLanguage.runtimeMutex);
auto &runtime = patternLanguage.runtime;
task.setInterruptCallback([&runtime] { runtime->abort(); });

View File

@@ -82,6 +82,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "Datei auswählen" },
{ "hex.builtin.common.processing", "Verarbeiten" },
{ "hex.builtin.common.filter", "Filter" },
{ "hex.builtin.common.count", "Anzahl" },
{ "hex.builtin.common.value", "Wert" },
{ "hex.builtin.common.type", "Typ" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -562,8 +563,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "Datenumwandlung" },
{ "hex.builtin.nodes.casting.int_to_buffer", "Integral zu Buffer" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "Integral zu Buffer" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Buffer zu Integral" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Buffer zu Integral" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "Buffer zu Integral" },
{ "hex.builtin.nodes.casting.float_to_buffer", "Float zu Buffer" },
{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float zu Buffer" },
{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer zu Float" },
{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer zu Float" },
{ "hex.builtin.nodes.arithmetic", "Arithmetisch" },
{ "hex.builtin.nodes.arithmetic.add", "Addition" },
@@ -644,6 +649,10 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.visualizer.byte_distribution", "Byteverteilung" },
{ "hex.builtin.nodes.visualizer.byte_distribution.header", "Byteverteilung" },
{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
{ "hex.builtin.nodes.pattern_language.out_var", "Out Variabel" },
{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variabel" },
{ "hex.builtin.tools.demangler", "LLVM Demangler" },
{ "hex.builtin.tools.demangler.mangled", "Mangled Namen" },

View File

@@ -83,6 +83,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "Choose file" },
{ "hex.builtin.common.processing", "Processing" },
{ "hex.builtin.common.filter", "Filter" },
{ "hex.builtin.common.count", "Count" },
{ "hex.builtin.common.value", "Value" },
{ "hex.builtin.common.type", "Type" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -567,8 +568,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "Data conversion" },
{ "hex.builtin.nodes.casting.int_to_buffer", "Integer to Buffer" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "Integer to Buffer" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Buffer to Integer" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Buffer to Integer" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "Buffer to Integer" },
{ "hex.builtin.nodes.casting.float_to_buffer", "Float to Buffer" },
{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float to Buffer" },
{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer to Float" },
{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer to Float" },
{ "hex.builtin.nodes.arithmetic", "Arithmetic" },
{ "hex.builtin.nodes.arithmetic.add", "Addition" },
@@ -648,6 +653,10 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.visualizer.byte_distribution", "Byte Distribution" },
{ "hex.builtin.nodes.visualizer.byte_distribution.header", "Byte Distribution" },
{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
{ "hex.builtin.nodes.pattern_language.out_var", "Out Variable" },
{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variable" },
{ "hex.builtin.tools.demangler", "LLVM Demangler" },
{ "hex.builtin.tools.demangler.mangled", "Mangled name" },

View File

@@ -82,6 +82,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "Scegli file" },
//{ "hex.builtin.common.processing", "Processing" },
//{ "hex.builtin.common.filter", "Filter" },
//{ "hex.builtin.common.count", "Count" },
//{ "hex.builtin.common.value", "Value" },
//{ "hex.builtin.common.type", "Type" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -572,8 +573,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "Conversione Dati" },
{ "hex.builtin.nodes.casting.int_to_buffer", "Da Intero a Buffer" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "Da Intero a Buffer" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Da Buffer a Intero" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Da Buffer a Intero" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "Da Buffer a Integer" },
//{ "hex.builtin.nodes.casting.float_to_buffer", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer to Float" },
//{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer to Float" },
{ "hex.builtin.nodes.arithmetic", "Aritmetica" },
{ "hex.builtin.nodes.arithmetic.add", "Addizione" },
@@ -654,6 +659,9 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.nodes.visualizer.byte_distribution", "Byte Distribution" },
//{ "hex.builtin.nodes.visualizer.byte_distribution.header", "Byte Distribution" },
//{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
//{ "hex.builtin.nodes.pattern_language.out_var", "Out Variable" },
//{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variable" },
{ "hex.builtin.tools.demangler", "LLVM Demangler" },
{ "hex.builtin.tools.demangler.mangled", "Nome Mangled" },

View File

@@ -82,6 +82,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "ファイルを選択" },
// { "hex.builtin.common.processing", "Processing" },
{ "hex.builtin.common.filter", "フィルタ" },
//{ "hex.builtin.common.count", "Count" },
{ "hex.builtin.common.value", "" },
//{ "hex.builtin.common.type", "Type" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -570,8 +571,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "データ変換" },
{ "hex.builtin.nodes.casting.int_to_buffer", "整数→バッファ" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "整数→バッファ" },
{ "hex.builtin.nodes.casting.buffer_to_int", "バッファ→整数" },
{ "hex.builtin.nodes.casting.buffer_to_int", "バッファ→整数" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "バッファ→整数" },
//{ "hex.builtin.nodes.casting.float_to_buffer", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer to Float" },
//{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer to Float" },
{ "hex.builtin.nodes.arithmetic", "演算" },
{ "hex.builtin.nodes.arithmetic.add", "加算+" },
@@ -650,6 +655,10 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.visualizer.byte_distribution", "バイト分布" },
{ "hex.builtin.nodes.visualizer.byte_distribution.header", "バイト分布" },
//{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
//{ "hex.builtin.nodes.pattern_language.out_var", "Out Variable" },
//{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variable" },
{ "hex.builtin.tools.demangler", "LLVMデマングラー" },
{ "hex.builtin.tools.demangler.mangled", "マングリング名" },

View File

@@ -82,6 +82,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "파일 선택" },
{ "hex.builtin.common.processing", "작업 중" },
{ "hex.builtin.common.filter", "필터" },
//{ "hex.builtin.common.count", "Count" },
{ "hex.builtin.common.value", "" },
{ "hex.builtin.common.type", "타입" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -566,8 +567,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "데이터 변환" },
{ "hex.builtin.nodes.casting.int_to_buffer", "정수에서 버퍼로" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "정수에서 버퍼로" },
{ "hex.builtin.nodes.casting.buffer_to_int", "버퍼에서 정수로" },
{ "hex.builtin.nodes.casting.buffer_to_int", "버퍼에서 정수로" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "버퍼에서 정수로" },
//{ "hex.builtin.nodes.casting.float_to_buffer", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer to Float" },
//{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer to Float" },
{ "hex.builtin.nodes.arithmetic", "수학" },
{ "hex.builtin.nodes.arithmetic.add", "덧셈" },
@@ -647,6 +652,10 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.visualizer.byte_distribution", "바이트 분포" },
{ "hex.builtin.nodes.visualizer.byte_distribution.header", "바이트 분포" },
//{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
//{ "hex.builtin.nodes.pattern_language.out_var", "Out Variable" },
//{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variable" },
{ "hex.builtin.tools.demangler", "LLVM Demangler" },
{ "hex.builtin.tools.demangler.mangled", "Mangled name" },

View File

@@ -82,6 +82,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "Escolher arquivo" },
{ "hex.builtin.common.processing", "Processando" },
//{ "hex.builtin.common.filter", "Filter" },
//{ "hex.builtin.common.count", "Count" },
//{ "hex.builtin.common.value", "Value" },
//{ "hex.builtin.common.type", "Type" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -565,8 +566,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "Conversão de Dados" },
{ "hex.builtin.nodes.casting.int_to_buffer", "Integer to Buffer" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "Integer to Buffer" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Buffer to Integer" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Buffer to Integer" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "Buffer to Integer" },
//{ "hex.builtin.nodes.casting.float_to_buffer", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer to Float" },
//{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer to Float" },
{ "hex.builtin.nodes.arithmetic", "Aritmética" },
{ "hex.builtin.nodes.arithmetic.add", "Adição" },
@@ -646,6 +651,10 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.visualizer.byte_distribution", "Byte Distribution" },
{ "hex.builtin.nodes.visualizer.byte_distribution.header", "Byte Distribution" },
//{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
//{ "hex.builtin.nodes.pattern_language.out_var", "Out Variable" },
//{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variable" },
{ "hex.builtin.tools.demangler", "LLVM Demangler" },
{ "hex.builtin.tools.demangler.mangled", "Mangled name" },

View File

@@ -82,6 +82,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "选择文件" },
{ "hex.builtin.common.processing", "处理" },
{ "hex.builtin.common.filter", "过滤器" },
//{ "hex.builtin.common.count", "Count" },
{ "hex.builtin.common.value", "" },
{ "hex.builtin.common.type", "类型" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -567,8 +568,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "数据转换" },
{ "hex.builtin.nodes.casting.int_to_buffer", "整数到缓冲区" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "整数到缓冲区" },
{ "hex.builtin.nodes.casting.buffer_to_int", "缓冲区到整数" },
{ "hex.builtin.nodes.casting.buffer_to_int", "缓冲区到整数" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "缓冲区到整数" },
//{ "hex.builtin.nodes.casting.float_to_buffer", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer to Float" },
//{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer to Float" },
{ "hex.builtin.nodes.arithmetic", "运算" },
{ "hex.builtin.nodes.arithmetic.add", "加法" },
@@ -649,6 +654,10 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.visualizer.byte_distribution", "字节分布" },
{ "hex.builtin.nodes.visualizer.byte_distribution.header", "字节分布" },
//{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
//{ "hex.builtin.nodes.pattern_language.out_var", "Out Variable" },
//{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variable" },
{ "hex.builtin.tools.demangler", "LLVM 名还原" },
{ "hex.builtin.tools.demangler.mangled", "修饰名" },

View File

@@ -82,6 +82,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.choose_file", "選擇檔案" },
{ "hex.builtin.common.processing", "正在處理" },
//{ "hex.builtin.common.filter", "Filter" },
//{ "hex.builtin.common.count", "Count" },
//{ "hex.builtin.common.value", "Value" },
//{ "hex.builtin.common.type", "Type" },
{ "hex.builtin.common.type.u8", "uint8_t" },
@@ -565,8 +566,12 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.casting", "資料轉換" },
{ "hex.builtin.nodes.casting.int_to_buffer", "整數轉緩衝" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "整數轉緩衝" },
{ "hex.builtin.nodes.casting.buffer_to_int", "緩衝轉整數" },
{ "hex.builtin.nodes.casting.buffer_to_int", "緩衝轉整數" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "緩衝轉整數" },
//{ "hex.builtin.nodes.casting.float_to_buffer", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.float_to_buffer.header", "Float to Buffer" },
//{ "hex.builtin.nodes.casting.buffer_to_float", "Buffer to Float" },
//{ "hex.builtin.nodes.casting.buffer_to_float.header", "Buffer to Float" },
{ "hex.builtin.nodes.arithmetic", "數學運算" },
{ "hex.builtin.nodes.arithmetic.add", "加法" },
@@ -646,6 +651,10 @@ namespace hex::plugin::builtin {
{ "hex.builtin.nodes.visualizer.byte_distribution", "Byte Distribution" },
{ "hex.builtin.nodes.visualizer.byte_distribution.header", "Byte Distribution" },
//{ "hex.builtin.nodes.pattern_language", "Pattern Language" },
//{ "hex.builtin.nodes.pattern_language.out_var", "Out Variable" },
//{ "hex.builtin.nodes.pattern_language.out_var.header", "Out Variable" },
{ "hex.builtin.tools.demangler", "LLVM Demangler" },
{ "hex.builtin.tools.demangler.mangled", "Mangled name" },