summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2020-08-24 21:46:36 +0800
committerXusheng <xusheng@vector35.com>2020-09-15 09:29:54 +0800
commit75d05ea710f80a0ca2fdc53b638952a7a97e7ad8 (patch)
treef8fe2205178cd7942a1e6d45c79dda9d748b526f /ui
parent33e31719d37deed58cfe709bf475b80fece8c34a (diff)
display as in linear view
Diffstat (limited to 'ui')
-rw-r--r--ui/action.h2
-rw-r--r--ui/flowgraphwidget.h13
-rw-r--r--ui/linearview.h15
-rw-r--r--ui/tokenizedtextview.h13
-rw-r--r--ui/viewframe.h2
5 files changed, 5 insertions, 40 deletions
diff --git a/ui/action.h b/ui/action.h
index a374731b..3414d8b0 100644
--- a/ui/action.h
+++ b/ui/action.h
@@ -19,6 +19,7 @@
class View;
class UIContext;
+struct LinearViewCursorPosition;
struct BINARYNINJAUIAPI HighlightTokenState
{
@@ -49,6 +50,7 @@ struct BINARYNINJAUIAPI UIActionContext
FunctionRef function;
LowLevelILFunctionRef lowLevelILFunction;
MediumLevelILFunctionRef mediumLevelILFunction;
+ LinearViewCursorPosition* cursorPosition;
UIActionContext();
UIActionContext(const BinaryNinja::PluginCommandContext& pluginContext);
diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h
index a6e02076..532a506a 100644
--- a/ui/flowgraphwidget.h
+++ b/ui/flowgraphwidget.h
@@ -308,19 +308,6 @@ private Q_SLOTS:
void skipAndReturnZero();
void skipAndReturnValue();
- void displayAsDefault();
- void displayAsBinary();
- void displayAsSignedOctal();
- void displayAsUnsignedOctal();
- void displayAsSignedDecimal();
- void displayAsUnsignedDecimal();
- void displayAsSignedHexadecimal();
- void displayAsUnsignedHexadecimal();
- void displayAsCharacterConstant();
- void displayAsPointer();
- void displayAsFloat();
- void displayAsDouble();
-
void makePtr();
void makeString();
diff --git a/ui/linearview.h b/ui/linearview.h
index 00f02c76..7bdc464f 100644
--- a/ui/linearview.h
+++ b/ui/linearview.h
@@ -230,6 +230,7 @@ private Q_SLOTS:
void makeString();
void changeType();
void undefineVariable();
+ void displayAs(const UIActionContext& context, BNIntegerDisplayType displayType) override;
void createStructOrInferStructureType();
void createArray();
void createStruct();
@@ -237,19 +238,6 @@ private Q_SLOTS:
size_t getStringLength(uint64_t startAddr);
- void displayAsDefault();
- void displayAsBinary();
- void displayAsSignedOctal();
- void displayAsUnsignedOctal();
- void displayAsSignedDecimal();
- void displayAsUnsignedDecimal();
- void displayAsSignedHexadecimal();
- void displayAsUnsignedHexadecimal();
- void displayAsCharacterConstant();
- void displayAsPointer();
- void displayAsFloat();
- void displayAsDouble();
-
void setInstructionHighlight(BNHighlightColor color);
void setBlockHighlight(BNHighlightColor color);
@@ -273,6 +261,7 @@ public:
virtual BinaryViewRef getData() override { return m_data; }
void getCurrentOffsetByType(TypeRef resType, uint64_t baseAddr, uint64_t& begin, uint64_t& end, bool singleLine);
virtual uint64_t getCurrentOffset() override;
+ virtual UIActionContext actionContext() override;
virtual BNAddressRange getSelectionOffsets() override;
virtual BNAddressRange getSelectionForInfo() override;
virtual void setSelectionOffsets(BNAddressRange range) override;
diff --git a/ui/tokenizedtextview.h b/ui/tokenizedtextview.h
index 28d0399b..d937760a 100644
--- a/ui/tokenizedtextview.h
+++ b/ui/tokenizedtextview.h
@@ -92,19 +92,6 @@ class BINARYNINJAUIAPI TokenizedTextView: public QAbstractScrollArea, public Vie
void inferStructureType();
size_t getStringLength(uint64_t startAddr);
- void displayAsDefault();
- void displayAsBinary();
- void displayAsSignedOctal();
- void displayAsUnsignedOctal();
- void displayAsSignedDecimal();
- void displayAsUnsignedDecimal();
- void displayAsSignedHexadecimal();
- void displayAsUnsignedHexadecimal();
- void displayAsCharacterConstant();
- void displayAsPointer();
- void displayAsFloat();
- void displayAsDouble();
-
void setInstructionHighlight(BNHighlightColor color);
void setBlockHighlight(BNHighlightColor color);
diff --git a/ui/viewframe.h b/ui/viewframe.h
index 7d63b84a..4d367074 100644
--- a/ui/viewframe.h
+++ b/ui/viewframe.h
@@ -106,7 +106,7 @@ public:
virtual void writeData(const BinaryNinja::DataBuffer& data);
- virtual bool canDisplayAs(const UIActionContext& context);
+ virtual bool canDisplayAs(const UIActionContext& context, const BNIntegerDisplayType);
virtual void displayAs(const UIActionContext& context, BNIntegerDisplayType type);
virtual HistoryEntry* getHistoryEntry();