summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-02-15 15:58:14 -0500
committerPeter LaFosse <peter@vector35.com>2024-02-16 15:01:44 -0500
commite3ae076fe472e96e037f2997d9b8c6f29c4f4fce (patch)
tree13380bbe7639136845084f11ac7b168cb4010440 /ui
parentf61154d607b37185d55eef52c884f35f99141303 (diff)
Add UI callback for On(Data)ViewReplaced for rebase
Diffstat (limited to 'ui')
-rw-r--r--ui/uicontext.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/ui/uicontext.h b/ui/uicontext.h
index 9d65ac90..db013320 100644
--- a/ui/uicontext.h
+++ b/ui/uicontext.h
@@ -191,7 +191,39 @@ class BINARYNINJAUIAPI UIContextNotification
(void)file;
(void)frame;
}
-
+ /*!
+ Callback after a ViewFrame is replaced in an open file (e.g. on Rebase or Sync)
+ \param context Context which replaced the view
+ \param file Context with the file and ui views
+ \param oldFrame Old ViewFrame being deleted
+ \param newFrame New ViewFrame being created
+ */
+ virtual void OnViewReplaced(
+ UIContext* context,
+ FileContext* file,
+ ViewFrame* oldFrame,
+ ViewFrame* newFrame
+ )
+ {
+ (void)context;
+ (void)file;
+ (void)oldFrame;
+ (void)newFrame;
+ }
+ /*!
+ Callback after a BinaryView is replaced in an open file (e.g. on Rebase)
+ \param context Context which replaced the view
+ \param file Context with the file and ui views
+ \param oldData Old BinaryView with that name
+ \param newData New BinaryView with that name
+ */
+ virtual void OnDataViewReplaced(UIContext* context, FileContext* file, BinaryViewRef oldData, BinaryViewRef newData)
+ {
+ (void)context;
+ (void)file;
+ (void)oldData;
+ (void)newData;
+ }
/*!
Callback when the ui changes views
\param context Context changing views
@@ -486,6 +518,8 @@ public:
void NotifyOnAfterSaveFile(FileContext* file, ViewFrame* frame);
bool NotifyOnBeforeCloseFile(FileContext* file, ViewFrame* frame);
void NotifyOnAfterCloseFile(FileContext* file, ViewFrame* frame);
+ void NotifyOnViewReplaced(FileContext* file, ViewFrame* oldFrame, ViewFrame* newFrame);
+ void NotifyOnDataViewReplaced(FileContext* file, BinaryViewRef oldView, BinaryViewRef newView);
void NotifyOnViewChange(ViewFrame* frame, const QString& type);
void NotifyOnAddressChange(ViewFrame* frame, View* view, const ViewLocation& location);