diff options
| author | Alexander Taylor <alex@vector35.com> | 2026-05-12 21:19:28 -0400 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2026-05-13 13:32:22 -0400 |
| commit | 4c278a57b59c4b8e913d17b47bc4828659b32659 (patch) | |
| tree | d179792a704c615a3838ecfbfe636bc537d82216 /ui | |
| parent | 6a1c332697cbe12d6b2b7857bf21bc440706c0be (diff) | |
Changes related to display as/type toggling.
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/linearview.h | 1 | ||||
| -rw-r--r-- | ui/tokenizedtextview.h | 1 | ||||
| -rw-r--r-- | ui/util.h | 6 | ||||
| -rw-r--r-- | ui/viewframe.h | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/ui/linearview.h b/ui/linearview.h index 95abdd8c..d0036aaf 100644 --- a/ui/linearview.h +++ b/ui/linearview.h @@ -399,6 +399,7 @@ private Q_SLOTS: void makeString(size_t charSize = 1); void changeType(const UIActionContext& context); void undefineInRange(); + BNIntegerDisplayType getCurrentDisplayAs(const UIActionContext& context) override; void displayAs(const UIActionContext& context, BNIntegerDisplayType displayType) override; void createStructOrInferStructureType(); bool autoCreateArray(); diff --git a/ui/tokenizedtextview.h b/ui/tokenizedtextview.h index 0843d27a..d328c492 100644 --- a/ui/tokenizedtextview.h +++ b/ui/tokenizedtextview.h @@ -150,6 +150,7 @@ class BINARYNINJAUIAPI TokenizedTextView : virtual BinaryNinja::Ref<HistoryEntry> getHistoryEntry() override; void populateDefaultHistoryEntry(TokenizedTextViewHistoryEntry* entry); virtual void navigateToHistoryEntry(BinaryNinja::Ref<HistoryEntry> entry) override; + virtual bool canDisplayAs(const UIActionContext& context, const BNIntegerDisplayType displayType) override; virtual void OnBinaryDataWritten(BinaryNinja::BinaryView* data, uint64_t offset, size_t len) override; virtual void OnBinaryDataInserted(BinaryNinja::BinaryView* data, uint64_t offset, size_t len) override; @@ -22,7 +22,13 @@ std::string BINARYNINJAUIAPI getStringForRegisterValue(ArchitectureRef arch, Bin std::string BINARYNINJAUIAPI getPossibleValueSetStateName(BNRegisterValueType state); std::string BINARYNINJAUIAPI getStringForIntegerValue(int64_t value); std::string BINARYNINJAUIAPI getStringForUIntegerValue(uint64_t value); +bool BINARYNINJAUIAPI canDisplayIntegerTokenAs(const HighlightTokenState& token, BNIntegerDisplayType displayType); BNIntegerDisplayType BINARYNINJAUIAPI getInvertedIntegerDisplayType(BNIntegerDisplayType displayType, const std::string& text); +BNIntegerDisplayType BINARYNINJAUIAPI getToggledIntegerRadixDisplayType(BNIntegerDisplayType displayType, const std::string& text); +BNIntegerDisplayType BINARYNINJAUIAPI getToggledIntegerComplementDisplayType(BNIntegerDisplayType displayType, const std::string& text); +TypeRef BINARYNINJAUIAPI getIntegerTypePreservingDisplay(TypeRef type, size_t width, BinaryNinja::Confidence<bool> isSigned); +TypeRef BINARYNINJAUIAPI getIntegerTypeWithWidthPreservingAttributes(TypeRef type, size_t width); +TypeRef BINARYNINJAUIAPI getIntegerTypeWithSignPreservingAttributes(TypeRef type, BinaryNinja::Confidence<bool> isSigned); std::string BINARYNINJAUIAPI getStringForPossibleValueSet(ArchitectureRef arch, const BinaryNinja::PossibleValueSet& values, bool pretty = true); std::string BINARYNINJAUIAPI getStringForInstructionDataflowDetails(BinaryViewRef data, ArchitectureRef arch, FunctionRef func, uint64_t address); std::optional<BinaryNinja::PossibleValueSet> BINARYNINJAUIAPI getPossibleValueSetForToken(View* view, BinaryViewRef data, ArchitectureRef arch, diff --git a/ui/viewframe.h b/ui/viewframe.h index 08d4add6..3812afc0 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -210,6 +210,7 @@ class BINARYNINJAUIAPI View virtual void writeData(const BinaryNinja::DataBuffer& data, uint64_t addr); virtual bool canDisplayAs(const UIActionContext& context, const BNIntegerDisplayType); + virtual BNIntegerDisplayType getCurrentDisplayAs(const UIActionContext& context); virtual void displayAs(const UIActionContext& context, BNIntegerDisplayType type); virtual BinaryNinja::Ref<HistoryEntry> getHistoryEntry(); |
