diff options
| author | Peter LaFosse <peter@vector35.com> | 2025-10-02 10:23:13 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2025-11-03 10:48:11 -0500 |
| commit | d32a550355b7c4e7eba5e6dac7df7db7894b5139 (patch) | |
| tree | b789f0d1c51a41ebb372c7e1fbf00ecc953ddcd3 /ui | |
| parent | 7eedbd5c30f19c4c6c7c546e8eefb58e5f7c3e70 (diff) | |
Add additional helpers for right-click menu cleanup
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/action.h | 2 | ||||
| -rw-r--r-- | ui/linearview.h | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/ui/action.h b/ui/action.h index 238121ec..1b22f180 100644 --- a/ui/action.h +++ b/ui/action.h @@ -252,8 +252,10 @@ class BINARYNINJAUIAPI UIActionHandler ActionPriority getPriority(const QString& name); void bindCopyAsActions(const UITransformAction& action); + void bindCopyAsActions(const UITransformAction& action, const std::function<bool()>& shouldShow); void bindPasteFromActions(const UITransformAction& action); void bindTransformActions(const UITransformAction& encode, const UITransformAction& decode); + void bindTransformActions(const UITransformAction& encode, const UITransformAction& decode, const std::function<bool()>& shouldShow); void unbindCopyAsActions(); void unbindPasteFromActions(); void unbindTransformActions(); diff --git a/ui/linearview.h b/ui/linearview.h index 0eb1f203..b4fc2402 100644 --- a/ui/linearview.h +++ b/ui/linearview.h @@ -511,9 +511,11 @@ public: virtual void followPointer(); virtual bool canCopyWithTransform() override; + virtual bool canCut() override; virtual void cut() override; virtual void copy(TransformRef xform = nullptr) override; virtual void paste(TransformRef xform = nullptr) override; + virtual bool canPaste() override; virtual void copyAddress() override; virtual HighlightTokenState getHighlightTokenState() override { return m_highlight; } @@ -594,6 +596,9 @@ protected: bool canExtendSelectionToEndOfSegment(); bool canExtendSelectionToStartOfDataVariable(); bool canExtendSelectionToEndOfDataVariable(); + + virtual bool shouldShowCopyAsActions(); + virtual bool shouldShowTransformActions(); }; /*! |
