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:
parent
84dd0ce1ae
commit
1168e46c1d
2 changed files with 50 additions and 77 deletions
|
@ -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&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue