mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
feat: Added option to change radix of numbers in hex editor view
This commit is contained in:
@@ -94,6 +94,7 @@ namespace hex::ui {
|
||||
void setUnknownDataCharacter(char character) { m_unknownDataCharacter = character; }
|
||||
private:
|
||||
enum class CellType : u8 { None, Hex, ASCII };
|
||||
enum class AddressFormat : u8 { Hexadecimal, Decimal, Octal };
|
||||
|
||||
void drawCell(u64 address, u8 *data, size_t size, bool hovered, CellType cellType);
|
||||
void drawSeparatorLine(u64 address, bool drawVerticalConnector);
|
||||
@@ -107,6 +108,8 @@ namespace hex::ui {
|
||||
void handleSelection(u64 address, u32 bytesPerCell, const u8 *data, bool cellHovered);
|
||||
std::optional<color_t> applySelectionColor(u64 byteAddress, std::optional<color_t> color);
|
||||
|
||||
std::string formatAddress(u64 address, u32 width = 2, bool prefix = false) const;
|
||||
|
||||
public:
|
||||
void setSelectionUnchecked(std::optional<u64> start, std::optional<u64> end) {
|
||||
m_selectionStart = start;
|
||||
@@ -357,6 +360,7 @@ namespace hex::ui {
|
||||
u16 m_visibleRowCount = 0;
|
||||
|
||||
CellType m_editingCellType = CellType::None;
|
||||
AddressFormat m_addressFormat = AddressFormat::Hexadecimal;
|
||||
std::optional<u64> m_editingAddress;
|
||||
bool m_shouldModifyValue = false;
|
||||
bool m_enteredEditingMode = false;
|
||||
|
||||
Reference in New Issue
Block a user