diff options
| author | Rusty Wagner <rusty@vector35.com> | 2019-03-27 22:56:07 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2019-03-27 23:01:29 -0400 |
| commit | 962efd7abd475c1c40ae2892a89ac5b2c56e24a7 (patch) | |
| tree | bcc6c26d54e29b18ca93590ed990d3888a9f8b90 | |
| parent | 7cebd716bb4ceacda7fc7ba076c61893ad0e1dfb (diff) | |
Add prev/next cross reference functions
| -rw-r--r-- | ui/viewframe.h | 12 | ||||
| -rw-r--r-- | ui/xreflist.h | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/ui/viewframe.h b/ui/viewframe.h index 688a5a21..55d39a57 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -214,11 +214,11 @@ public: QWidget* getExtendedView(const QString& name, bool create = false); - bool navigate(const QString& type, uint64_t offset, bool updateInfo = true); - bool navigate(const QString& type, const std::function<bool(View*)>& handler, bool updateInfo = true); - bool navigate(BinaryViewRef data, uint64_t offset, bool updateInfo = true); - bool navigateToFunction(FunctionRef func, uint64_t offset, bool updateInfo = true); - bool goToReference(BinaryViewRef data, FunctionRef func, uint64_t source, uint64_t target); + bool navigate(const QString& type, uint64_t offset, bool updateInfo = true, bool addHistoryEntry = true); + bool navigate(const QString& type, const std::function<bool(View*)>& handler, bool updateInfo = true, bool addHistoryEntry = true); + bool navigate(BinaryViewRef data, uint64_t offset, bool updateInfo = true, bool addHistoryEntry = true); + bool navigateToFunction(FunctionRef func, uint64_t offset, bool updateInfo = true, bool addHistoryEntry = true); + bool goToReference(BinaryViewRef data, FunctionRef func, uint64_t source, uint64_t target, bool addHistoryEntry = true); QString getTypeForView(QWidget* view); QString getDataTypeForView(const QString& type); QString getDataTypeForView(QWidget* view); @@ -241,6 +241,8 @@ public: void updateFeatureMapLocation(View* view); void updateCrossReferences(); void showCrossReferences(); + void nextCrossReference(); + void prevCrossReference(); virtual UIActionContext actionContext(); void bindActions(); diff --git a/ui/xreflist.h b/ui/xreflist.h index 961e1238..63faf21a 100644 --- a/ui/xreflist.h +++ b/ui/xreflist.h @@ -63,6 +63,8 @@ class BINARYNINJAUIAPI CrossReferenceList: public QListView, public DockContextH QPoint m_hoverPos; uint64_t m_curRefTarget = 0; + bool m_navigating = false; + bool m_navToNextOrPrevStarted = false; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; @@ -72,16 +74,19 @@ protected: virtual bool shouldBeVisible(ViewFrame* frame) override; virtual void updateFonts() override; virtual void wheelEvent(QWheelEvent* e) override; + void goToReference(const QModelIndex& idx); private Q_SLOTS: - void goToReference(const QModelIndex& idx); void hoverTimerEvent(); + void referenceActivated(const QModelIndex& idx); public: CrossReferenceList(ViewFrame* view, BinaryViewRef data); virtual ~CrossReferenceList(); void setCurrentSelection(uint64_t begin, uint64_t end); + void navigateToNext(); + void navigateToPrev(); bool hasSelection(); }; |
