mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
HexEditor: Add get_byte() method to HexEditor class
This commit is contained in:
parent
1b70c5f605
commit
604557c71b
2 changed files with 9 additions and 0 deletions
|
@ -229,6 +229,14 @@ void HexEditor::set_content_length(size_t length)
|
|||
set_content_size({ static_cast<int>(newWidth), static_cast<int>(newHeight) });
|
||||
}
|
||||
|
||||
Optional<u8> HexEditor::get_byte(size_t position)
|
||||
{
|
||||
if (position < m_document->size())
|
||||
return m_document->get(position).value;
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
void HexEditor::mousedown_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.button() != GUI::MouseButton::Primary) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue