@@ -113,6 +113,7 @@ class BINARYNINJAUIAPI FlowGraphWidget: public QAbstractScrollArea, public View,
113113 uint64_t m_addrAfterLayout;
114114 bool m_pendingXrefNavigation, m_xrefNavigation;
115115 uint64_t m_xrefTarget;
116+ size_t m_indexAfterlayout;
116117
117118 InstructionEdit* m_instrEdit;
118119
@@ -163,8 +164,8 @@ class BINARYNINJAUIAPI FlowGraphWidget: public QAbstractScrollArea, public View,
163164 void navigateToAddress (uint64_t addr);
164165 void navigateToGotoLabel (uint64_t label);
165166
166- void setGraphInternal (FlowGraphRef graph, FlowGraphHistoryEntry* entry, bool useAddr, uint64_t addr, bool notify,
167- bool recenterWithPreviousGraph);
167+ void setGraphInternal (FlowGraphRef graph, FlowGraphHistoryEntry* entry, bool useAddr, uint64_t addr,
168+ bool notify, bool recenterWithPreviousGraph, size_t index = BN_INVALID_EXPR );
168169
169170 void up (bool selecting, size_t count = 1 );
170171 void down (bool selecting, size_t count = 1 );
@@ -198,6 +199,7 @@ class BINARYNINJAUIAPI FlowGraphWidget: public QAbstractScrollArea, public View,
198199
199200 void setGraph (FlowGraphRef graph);
200201 void setGraph (FlowGraphRef graph, uint64_t addr);
202+ void setGraphAtIndex (FlowGraphRef graph, size_t index);
201203 void setGraph (FlowGraphRef graph, FlowGraphHistoryEntry* entry);
202204 void setRelatedGraph (FlowGraphRef graph);
203205 void setRelatedGraph (FlowGraphRef graph, uint64_t addr);
@@ -211,6 +213,7 @@ class BINARYNINJAUIAPI FlowGraphWidget: public QAbstractScrollArea, public View,
211213 virtual void setSelectionOffsets (BNAddressRange range) override ;
212214 virtual bool navigate (uint64_t pos) override ;
213215 virtual bool navigateToFunction (FunctionRef func, uint64_t pos) override ;
216+ virtual bool navigateToFunctionIndex (FunctionRef func, size_t index) override ;
214217 bool navigateWithHistoryEntry (uint64_t addr, FlowGraphHistoryEntry* entry);
215218 bool navigateWithHistoryEntry (FunctionRef func, uint64_t addr, FlowGraphHistoryEntry* entry);
216219 void setNavigationTarget (View* target) { m_navigationTarget = target; }
@@ -258,6 +261,7 @@ class BINARYNINJAUIAPI FlowGraphWidget: public QAbstractScrollArea, public View,
258261 void paintEdge (QPainter& p, const FlowGraphNodeRef& node, const BinaryNinja::FlowGraphEdge& edge);
259262
260263 void showAddress (uint64_t addr, bool select = false );
264+ void showIndex (size_t index);
261265 void showTopNode ();
262266 void showNode (FlowGraphNodeRef node);
263267 void showLineInNode (FlowGraphNodeRef node, size_t lineIndex);
0 commit comments