1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:27:35 +00:00

HexEditor: Extract pixel-position-to-byte-offset code

This commit is contained in:
Sam Atkins 2024-01-10 17:13:00 +00:00 committed by Sam Atkins
parent 84dd0ce1ae
commit 1168e46c1d
2 changed files with 50 additions and 77 deletions

View file

@ -100,6 +100,12 @@ private:
size_t cell_width() const { return character_width() * 3; }
size_t offset_margin_width() const { return 80; }
struct OffsetData {
size_t offset;
EditMode panel;
};
Optional<OffsetData> offset_at(Gfx::IntPoint position) const;
ErrorOr<void> hex_mode_keydown_event(GUI::KeyEvent&);
ErrorOr<void> text_mode_keydown_event(GUI::KeyEvent&);