From a0fdaba9b0e03c28be3a8c9514952338c91ec578 Mon Sep 17 00:00:00 2001 From: kat Date: Wed, 18 May 2022 03:21:16 -0400 Subject: Add Split + Navigate Feature --- ui/flowgraphwidget.h | 3 +++ ui/linearview.h | 3 +++ ui/uicontext.h | 19 ++++++++++++++++--- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h index 4678329e..869c3bf6 100644 --- a/ui/flowgraphwidget.h +++ b/ui/flowgraphwidget.h @@ -356,4 +356,7 @@ class BINARYNINJAUIAPI FlowGraphWidget : void instrEditDoneEvent(); void setCurrentVariableDeadStoreElimination(BNDeadStoreElimination elimination); + void splitToNewTabAndNavigateFromCursorPosition(); + void splitToNewWindowAndNavigateFromCursorPosition(); + void splitToNewPaneAndNavigateFromCursorPosition(); }; diff --git a/ui/linearview.h b/ui/linearview.h index 5ca2810a..cb1c6662 100644 --- a/ui/linearview.h +++ b/ui/linearview.h @@ -442,6 +442,9 @@ class BINARYNINJAUIAPI LinearView : public QAbstractScrollArea, public View, pub void moveToEndOfView(); void selectNone(); void navigateToHighlightedToken(); + void splitToNewTabAndNavigateFromCursorPosition(); + void splitToNewWindowAndNavigateFromCursorPosition(); + void splitToNewPaneAndNavigateFromCursorPosition(); }; class LinearViewType : public ViewType diff --git a/ui/uicontext.h b/ui/uicontext.h index 6a139dd6..070f59cb 100644 --- a/ui/uicontext.h +++ b/ui/uicontext.h @@ -303,10 +303,23 @@ class BINARYNINJAUIAPI UIContext \param widget Widget to display in the tab (optionally a ViewFrame) */ virtual void createTabForWidget(const QString& name, QWidget* widget) = 0; + + /*! + * Open a new window with the same file context and Navigate to a given location + * @param location + */ + virtual void splitToNewWindowAndNavigateToLocation(uint64_t location) = 0; + + /*! + * Open a new tab with the same file context and Navigate to a given location + * @param location + */ + virtual void splitToNewTabAndNavigateToLocation(uint64_t location) = 0; + /*! - Open a new pane in the active tab - \param pane Pane widget to open - \param primaryDirection Primary axis for content in pane (determines default split direction) + Open a new pane in the active tab + \param pane Pane widget to open + \param primaryDirection Primary axis for content in pane (determines default split direction) */ virtual void openPane(Pane* pane, Qt::Orientation primaryDirection = Qt::Vertical) = 0; /*! -- cgit v1.3.1