From 015314d34d073a8ebbd958edf8150a81381f12c2 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 3 May 2024 13:09:43 +0800 Subject: Add actions to quickly adjust the selection in linear and hex view --- ui/hexeditor.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'ui/hexeditor.h') diff --git a/ui/hexeditor.h b/ui/hexeditor.h index 1a485be9..0a6a4484 100644 --- a/ui/hexeditor.h +++ b/ui/hexeditor.h @@ -51,7 +51,6 @@ class BINARYNINJAUIAPI HexEditor : virtual void selectAll(); virtual void selectNone(); - void setSelectionRange(uint64_t begin, uint64_t end); virtual void setSelectionOffsets(BNAddressRange range) override; virtual void updateFonts() override; @@ -171,6 +170,28 @@ class BINARYNINJAUIAPI HexEditor : void deleteBack(); void deleteForward(); + void extendSelectionToStartOfBinary(); + void extendSelectionToEndOfBinary(); + void extendSelectionToStartOfSection(); + void extendSelectionToEndOfSection(); + void extendSelectionToStartOfSegment(); + void extendSelectionToEndOfSegment(); + void extendSelectionToStartOfDataVariable(); + void extendSelectionToEndOfDataVariable(); + void extendSelectionByBytes(); + void extendSelectionToAddress(); + void setSelectionSizeTo(); + void saveSelectionTo(); + + bool canExtendSelectionToStartOfSection(); + bool canExtendSelectionToEndOfSection(); + bool canExtendSelectionToStartOfSegment(); + bool canExtendSelectionToEndOfSegment(); + bool canExtendSelectionToStartOfDataVariable(); + bool canExtendSelectionToEndOfDataVariable(); + + void setSelectionOffsetsInternal(BNAddressRange range, bool navigateToStart = true); + BinaryViewRef m_data; ViewFrame* m_view; -- cgit v1.3.1