From ea0fc3b50a7700edac55e9e4a7130d3c7ef1045c Mon Sep 17 00:00:00 2001 From: Xusheng Date: Tue, 28 Jul 2020 13:23:34 +0800 Subject: maintain selected bytes when switching between views --- ui/flowgraphwidget.h | 1 + ui/hexeditor.h | 1 + ui/linearview.h | 1 + ui/viewframe.h | 1 + 4 files changed, 4 insertions(+) diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h index b4c87e31..d3bbd06e 100644 --- a/ui/flowgraphwidget.h +++ b/ui/flowgraphwidget.h @@ -201,6 +201,7 @@ public: virtual uint64_t getCurrentOffset() override; virtual BNAddressRange getSelectionOffsets() override; virtual BNAddressRange getSelectionForInfo() override; + virtual void setSelectionOffsets(BNAddressRange range) override; virtual bool navigate(uint64_t pos) override; virtual bool navigateToFunction(FunctionRef func, uint64_t pos) override; bool navigateWithHistoryEntry(uint64_t addr, FlowGraphHistoryEntry* entry); diff --git a/ui/hexeditor.h b/ui/hexeditor.h index 3500958d..aa64ed08 100644 --- a/ui/hexeditor.h +++ b/ui/hexeditor.h @@ -36,6 +36,7 @@ public: virtual void selectNone(); void setSelectionRange(uint64_t begin, uint64_t end); + void setSelectionOffsets(BNAddressRange range); virtual void updateFonts() override; diff --git a/ui/linearview.h b/ui/linearview.h index dd460de4..22b18efc 100644 --- a/ui/linearview.h +++ b/ui/linearview.h @@ -269,6 +269,7 @@ public: virtual uint64_t getCurrentOffset() override; virtual BNAddressRange getSelectionOffsets() override; virtual BNAddressRange getSelectionForInfo() override; + virtual void setSelectionOffsets(BNAddressRange range) override; virtual FunctionRef getCurrentFunction() override; virtual BasicBlockRef getCurrentBasicBlock() override; virtual ArchitectureRef getCurrentArchitecture() override; diff --git a/ui/viewframe.h b/ui/viewframe.h index dea74b11..23c7c446 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -72,6 +72,7 @@ public: virtual uint64_t getCurrentOffset() = 0; virtual BNAddressRange getSelectionOffsets(); virtual BNAddressRange getSelectionForInfo(); + virtual void setSelectionOffsets(BNAddressRange range); virtual bool navigate(uint64_t offset) = 0; virtual bool navigateToFunction(FunctionRef func, uint64_t offset); virtual bool goToReference(FunctionRef func, uint64_t source, uint64_t target); -- cgit v1.3.1