From 1511b57efa929d7e4304d416ee0ab9edc3b7ff2e Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 13 Apr 2020 17:09:55 -0400 Subject: Make addresses clickable in scripting console --- ui/scriptingconsole.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ui/scriptingconsole.h') diff --git a/ui/scriptingconsole.h b/ui/scriptingconsole.h index 48eefa6d..4f2cc5a5 100644 --- a/ui/scriptingconsole.h +++ b/ui/scriptingconsole.h @@ -98,13 +98,18 @@ class BINARYNINJAUIAPI ScriptingConsoleOutput: public QTextEdit UIActionHandler* m_handler; UIActionHandler m_actionHandler; ContextMenuManager* m_contextMenuManager; + BinaryViewRef m_data; Menu* m_menu; public: ScriptingConsoleOutput(ScriptingConsole* parent, Menu* menu); - + bool IsNavigable(const QString& str, const std::pair& offsetLen, uint64_t& value, bool highlight) const; protected: void contextMenuEvent(QContextMenuEvent* event) override; + +public Q_SLOTS: + virtual void mousePressEvent(QMouseEvent* event) override; + void viewChanged(QWidget* frame); }; class ScriptingConsoleWidget; @@ -146,6 +151,9 @@ private Q_SLOTS: void cancel(); void showCancelButton(); +Q_SIGNALS: + void viewChanged(QWidget* frame); + protected: void customEvent(QEvent* event) override; void notifyFontChanged() override; @@ -167,6 +175,7 @@ public: virtual void NotifyOutput(const std::string& text) override; virtual void NotifyError(const std::string& text) override; virtual void NotifyInputReadyStateChanged(BNScriptingProviderInputReadyState state) override; + virtual void notifyViewChanged(ViewFrame* frame) override; void moveUpInHistory(); void moveDownInHistory(); -- cgit v1.3.1