mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
HexEditor: Add Value Inspector
This adds a value inspector window to the Hex Editor. This window shows the data at the current cursor position (or selection start if a range is selected) interpreted as a variety of data types. Currently supported values include 8, 16, 32, and 64 bit signed and unsigned values as well as float and double. The inspector can operate in both little endian and big endian modes. This is switched between by options in the View menu.
This commit is contained in:
parent
604557c71b
commit
6a4fdae575
4 changed files with 313 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
* Copyright (c) 2022, Timothy Slater <tslater2006@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -9,6 +10,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "HexEditor.h"
|
||||
#include "ValueInspectorModel.h"
|
||||
#include <AK/Function.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
|
@ -32,7 +34,8 @@ private:
|
|||
void set_path(StringView);
|
||||
void update_title();
|
||||
void set_search_results_visible(bool visible);
|
||||
|
||||
void set_value_inspector_visible(bool visible);
|
||||
void update_inspector_values(size_t position);
|
||||
virtual void drop_event(GUI::DropEvent&) override;
|
||||
|
||||
RefPtr<HexEditor> m_editor;
|
||||
|
@ -54,6 +57,7 @@ private:
|
|||
RefPtr<GUI::Action> m_goto_offset_action;
|
||||
RefPtr<GUI::Action> m_layout_toolbar_action;
|
||||
RefPtr<GUI::Action> m_layout_search_results_action;
|
||||
RefPtr<GUI::Action> m_layout_value_inspector_action;
|
||||
|
||||
RefPtr<GUI::Action> m_copy_hex_action;
|
||||
RefPtr<GUI::Action> m_copy_text_action;
|
||||
|
@ -61,10 +65,17 @@ private:
|
|||
RefPtr<GUI::Action> m_fill_selection_action;
|
||||
|
||||
GUI::ActionGroup m_bytes_per_row_actions;
|
||||
GUI::ActionGroup m_value_inspector_mode_actions;
|
||||
|
||||
RefPtr<GUI::Statusbar> m_statusbar;
|
||||
RefPtr<GUI::Toolbar> m_toolbar;
|
||||
RefPtr<GUI::ToolbarContainer> m_toolbar_container;
|
||||
RefPtr<GUI::TableView> m_search_results;
|
||||
RefPtr<GUI::Widget> m_search_results_container;
|
||||
RefPtr<GUI::Widget> m_side_panel_container;
|
||||
RefPtr<GUI::Widget> m_value_inspector_container;
|
||||
RefPtr<GUI::TableView> m_value_inspector;
|
||||
|
||||
bool m_value_inspector_little_endian { true };
|
||||
bool m_selecting_from_inspector { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue