summaryrefslogtreecommitdiff
path: root/ui/uicomment.h
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2020-07-13 15:27:44 +0800
committerXusheng <xusheng@vector35.com>2020-08-11 10:19:23 +0800
commit297ea6f73fe5c482611cf4e0d72090df73d9c16f (patch)
treeb6b8c47d5088f1de2f955d2b89363e22a932fbd2 /ui/uicomment.h
parente5e4fe424ca345b8bba1200b9cac8a9765bc7c9d (diff)
make the comment dialog non-modal
Diffstat (limited to 'ui/uicomment.h')
-rw-r--r--ui/uicomment.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/ui/uicomment.h b/ui/uicomment.h
new file mode 100644
index 00000000..6fd74917
--- /dev/null
+++ b/ui/uicomment.h
@@ -0,0 +1,46 @@
+#pragma once
+
+#include "binaryninjaapi.h"
+#include "uicontext.h"
+
+// these are only intended to be used for the ui
+typedef enum
+{
+ FunctionComment,
+ AddressComment
+}UICommentType;
+
+class UIComment
+{
+ 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;
+ }
+}; \ No newline at end of file