diff options
| author | Glenn Smith <glenn@vector35.com> | 2021-07-03 01:08:47 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2021-07-09 16:39:09 -0400 |
| commit | 3808f91664f9632eb9d754a1ff99447b50468b36 (patch) | |
| tree | 44f0dbf857de5aeeb03fe27fb2c11aa136074682 /ui | |
| parent | d19f5e85ee26c3d6604798d30ab821d15731cada (diff) | |
Cleanup tags and comments in many places
Fixes #1926 #2374 #2325 #2204 #1652 and possibly others
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/linearview.h | 7 | ||||
| -rw-r--r-- | ui/uicomment.h | 68 |
2 files changed, 43 insertions, 32 deletions
diff --git a/ui/linearview.h b/ui/linearview.h index 74bc6b7a..60df5c93 100644 --- a/ui/linearview.h +++ b/ui/linearview.h @@ -140,6 +140,7 @@ class BINARYNINJAUIAPI LinearView: public QAbstractScrollArea, public View, publ SettingsRef m_settings; DisassemblySettingsRef m_options; BNFunctionGraphType m_ilViewType; + HexEditorHighlightState m_highlightState; InstructionEdit* m_instrEdit; @@ -334,7 +335,9 @@ public: virtual void OnDataVariableRemoved(BinaryNinja::BinaryView* view, const BinaryNinja::DataVariable& var) override; virtual void OnDataVariableUpdated(BinaryNinja::BinaryView* view, const BinaryNinja::DataVariable& var) override; virtual void OnDataMetadataUpdated(BinaryNinja::BinaryView* view, uint64_t offset) override; + virtual void OnTagAdded(BinaryNinja::BinaryView* data, const BinaryNinja::TagReference& tagRef) override; virtual void OnTagUpdated(BinaryNinja::BinaryView* data, const BinaryNinja::TagReference& tagRef) override; + virtual void OnTagRemoved(BinaryNinja::BinaryView* data, const BinaryNinja::TagReference& tagRef) override; virtual void updateFonts() override; @@ -352,6 +355,10 @@ public: virtual BNFunctionGraphType getILViewType() override { return m_ilViewType; }; virtual void setILViewType(BNFunctionGraphType ilViewType) override; + void setHighlightMode(HexEditorHighlightMode mode); + void setColorMode(HexEditorColorMode mode); + void setContrast(HexEditorHighlightContrast mode); + void toggleOption(BNDisassemblyOption option); virtual bool goToReference(FunctionRef func, uint64_t source, uint64_t target) override; diff --git a/ui/uicomment.h b/ui/uicomment.h index 6fd74917..1ed71af7 100644 --- a/ui/uicomment.h +++ b/ui/uicomment.h @@ -4,43 +4,47 @@ #include "uicontext.h" // these are only intended to be used for the ui -typedef enum +typedef enum { FunctionComment, - AddressComment -}UICommentType; + AddressComment, + DataComment +} UICommentType; class UIComment { - public: - UICommentType type; - FunctionRef func; - BinaryViewRef data; - uint64_t address; - QString content; +public: + UICommentType type; + FunctionRef func; + BinaryViewRef data; + uint64_t address; + QString content; - UIComment( UICommentType type, - FunctionRef func, - uint64_t address, - QString content): - type(type), func(func), - address(address), content(content) - {} - UIComment( UICommentType type, - BinaryViewRef data, - uint64_t address, - QString content): - type(type), data(data), - address(address), content(content) - {} - - UIComment(const UIComment& rhs) - { - type = rhs.type; - func = rhs.func; - data = rhs.data; - address = rhs.address; - content = rhs.content; - } + UIComment(UICommentType type, + FunctionRef func, + uint64_t address, + QString content): + type(type), func(func), + address(address), content(content) + {} + + + UIComment(UICommentType type, + BinaryViewRef data, + uint64_t address, + QString content): + type(type), data(data), + address(address), content(content) + {} + + + UIComment(const UIComment& rhs) + { + type = rhs.type; + func = rhs.func; + data = rhs.data; + address = rhs.address; + content = rhs.content; + } };
\ No newline at end of file |
