summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/flowgraphwidget.h4
-rw-r--r--ui/linearview.h3
-rw-r--r--ui/render.h2
-rw-r--r--ui/util.h18
4 files changed, 22 insertions, 5 deletions
diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h
index 6919297f..367e0174 100644
--- a/ui/flowgraphwidget.h
+++ b/ui/flowgraphwidget.h
@@ -288,10 +288,6 @@ public:
virtual void onFunctionSelected(FunctionRef func);
virtual void onHighlightChanged(const HighlightTokenState& highlight);
- static std::string getPossibleValueSetStateName(BNRegisterValueType state);
- static std::string getStringForRegisterValue(ArchitectureRef arch, BinaryNinja::RegisterValue value);
- static std::string getStringForPossibleValueSet(ArchitectureRef arch, const BinaryNinja::PossibleValueSet& values);
-
// protected:
// These APIs are really supposed to be protected but since the bindings need to call them
// and they have out parameters (and thus need to be re-implemented) they must be public
diff --git a/ui/linearview.h b/ui/linearview.h
index d2ad807c..fa814383 100644
--- a/ui/linearview.h
+++ b/ui/linearview.h
@@ -153,6 +153,8 @@ class BINARYNINJAUIAPI LinearView: public QAbstractScrollArea, public View, publ
size_t m_topLine;
QTimer* m_updateTimer;
+ QTimer* m_hoverTimer;
+ QPointF m_previewPos;
ContextMenuManager* m_contextMenuManager;
QPointer<CommentDialog> m_commentDialog;
@@ -291,6 +293,7 @@ private Q_SLOTS:
void scrollBarMoved(int value);
void scrollBarAction(int action);
void updateTimerEvent();
+ void hoverTimerEvent();
void setStackAdjustment();
void setCallTypeAdjustment();
diff --git a/ui/render.h b/ui/render.h
index e23173bf..a1b55092 100644
--- a/ui/render.h
+++ b/ui/render.h
@@ -77,7 +77,7 @@ public:
QColor getColorForHexDumpByte(const HexEditorHighlightState& state, BNModificationStatus modification, uint8_t byte);
QColor getHighlightColor(BNHighlightColor color);
- HighlightTokenState getTokenForDisassemblyLinePosition(size_t col, const std::vector<BinaryNinja::InstructionTextToken>& tokens);
+ HighlightTokenState getTokenForDisassemblyLinePosition(int64_t col, const std::vector<BinaryNinja::InstructionTextToken>& tokens);
HighlightTokenState getTokenForDisassemblyTokenIndex(size_t tokenIndex,
const std::vector<BinaryNinja::InstructionTextToken>& tokens);
HighlightTokenState getHighlightTokenForTextToken(const BinaryNinja::InstructionTextToken& token);
diff --git a/ui/util.h b/ui/util.h
new file mode 100644
index 00000000..33008ec9
--- /dev/null
+++ b/ui/util.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "uitypes.h"
+#include "viewframe.h"
+#include <QtWidgets/QWidget>
+
+std::string BINARYNINJAUIAPI getStringForLocalVariable(ArchitectureRef arch, FunctionRef func, BinaryNinja::Variable localVar);
+std::string BINARYNINJAUIAPI getStringForRegisterValue(ArchitectureRef arch, BinaryNinja::RegisterValue value);
+std::string BINARYNINJAUIAPI getPossibleValueSetStateName(BNRegisterValueType state);
+std::string BINARYNINJAUIAPI getStringForIntegerValue(int64_t value);
+std::string BINARYNINJAUIAPI getStringForIntegerValue(uint64_t value);
+std::string BINARYNINJAUIAPI getStringForPossibleValueSet(ArchitectureRef arch, const BinaryNinja::PossibleValueSet& values);
+std::string BINARYNINJAUIAPI getStringForInstructionDataflowDetails(BinaryViewRef data, ArchitectureRef arch, FunctionRef func, uint64_t address);
+BinaryNinja::PossibleValueSet BINARYNINJAUIAPI getPossibleValueSetForToken(BinaryViewRef data, ArchitectureRef arch, FunctionRef func, HighlightTokenState token, size_t instrIdx);
+
+void BINARYNINJAUIAPI showHexPreview(QWidget* parent, ViewFrame* frame, const QPoint& previewPos, BinaryViewRef data, uint64_t address);
+bool BINARYNINJAUIAPI showDisassemblyPreview(QWidget* parent, ViewFrame* frame, const QPoint& previewPos, BinaryViewRef data, FunctionRef func, const ViewLocation& location);
+void BINARYNINJAUIAPI showTextTooltip(QWidget* parent, const QPoint& previewPos, const QString& text);