@@ -380,6 +380,35 @@ class BINARYNINJAUIAPI UIContextNotification
380380 (void )view;
381381 (void )menu;
382382 }
383+
384+ /* !
385+ Callback when a token is double-clicked, invoked before the view's default
386+ double-click behavior (navigation, rename dialog, etc.). Lets a plugin handle the
387+ token itself, e.g. the debugger navigating to a variable's runtime address.
388+
389+ Notifications are invoked in registration order until one returns true, which
390+ consumes the double-click: no further notifications run and the default behavior is
391+ suppressed. Return false to pass the click on to the other notifications and,
392+ ultimately, the default behavior.
393+
394+ \param context Context containing the view
395+ \param frame ViewFrame containing the view
396+ \param view View in which the token was double-clicked
397+ \param location Location at the time of the click
398+ \param token The token that was double-clicked
399+ \return True if handled (suppressing the default behavior), false to pass it on
400+ */
401+ virtual bool OnTokenDoubleClicked (
402+ UIContext* context, ViewFrame* frame, View* view, const ViewLocation& location,
403+ const HighlightTokenState& token)
404+ {
405+ (void )context;
406+ (void )frame;
407+ (void )view;
408+ (void )location;
409+ (void )token;
410+ return false ;
411+ }
383412};
384413
385414/* !
@@ -599,6 +628,8 @@ class BINARYNINJAUIAPI UIContext
599628 void NotifyOnActionExecuted (UIActionHandler* handler, const QString& name, const UIActionContext& ctx, std::function<void (const UIActionContext&)>& action);
600629 void NotifyOnActionExecutedImmutable (UIActionHandler* handler, const QString& name, const UIActionContext& ctx);
601630 void NotifyOnContextMenuCreated (View* view, Menu& menu);
631+ bool NotifyOnTokenDoubleClicked (
632+ ViewFrame* frame, View* view, const ViewLocation& location, const HighlightTokenState& token);
602633
603634 virtual void findAll (const BinaryNinja::FindParameters& params);
604635
0 commit comments