diff options
| -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(); }; /*! |
