summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2022-07-20 15:57:00 +0800
committerXusheng <xusheng@vector35.com>2022-08-04 14:59:46 +0800
commitae8d81fd6662ba42e11c068126e890470438e482 (patch)
treeb1cb1b24481de29251b54644d56715322cff77ba /ui
parent0469ac871e005ecb359fb171368eee3f517e391c (diff)
Merge the functionality of "Create Structure" with "Create All Members" in linear view
Diffstat (limited to 'ui')
-rw-r--r--ui/createstructdialog.h8
-rw-r--r--ui/flowgraphwidget.h3
-rw-r--r--ui/linearview.h1
-rw-r--r--ui/tokenizedtextview.h3
-rw-r--r--ui/typeview.h1
5 files changed, 9 insertions, 7 deletions
diff --git a/ui/createstructdialog.h b/ui/createstructdialog.h
index f273399f..bcb9cd20 100644
--- a/ui/createstructdialog.h
+++ b/ui/createstructdialog.h
@@ -2,6 +2,7 @@
#include <QtWidgets/QDialog>
#include <QtWidgets/QLineEdit>
+#include <QtWidgets/QCheckBox>
#include "binaryninjaapi.h"
#include "uicontext.h"
@@ -11,16 +12,21 @@ class BINARYNINJAUIAPI CreateStructDialog : public QDialog
QLineEdit* m_name;
QLineEdit* m_size;
+ QCheckBox* m_pointer;
BinaryViewRef m_view;
BinaryNinja::QualifiedName m_resultName;
uint64_t m_resultSize;
+ bool m_resultPointer;
+ bool m_askForPointer;
public:
- CreateStructDialog(QWidget* parent, BinaryViewRef view, const std::string& name);
+ CreateStructDialog(QWidget* parent, BinaryViewRef view, const std::string& name, bool askForPointer = false,
+ bool defaultToPointer = false);
BinaryNinja::QualifiedName getName() { return m_resultName; }
uint64_t getSize() { return m_resultSize; }
+ bool getCreatePointer() { return m_resultPointer;}
private Q_SLOTS:
void createStruct();
diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h
index 46c484c3..f6a38a85 100644
--- a/ui/flowgraphwidget.h
+++ b/ui/flowgraphwidget.h
@@ -327,8 +327,7 @@ class BINARYNINJAUIAPI FlowGraphWidget :
void createFunc(const UIActionContext& context);
void createFuncWithPlatform(PlatformRef platform, bool autoSelect = false);
void changeType();
- void inferStructureType();
- void autoCreateMembers();
+ void inferStructureType(const UIActionContext& context);
void comment();
void addUserXref();
void functionComment();
diff --git a/ui/linearview.h b/ui/linearview.h
index 1e0c0865..6bec459c 100644
--- a/ui/linearview.h
+++ b/ui/linearview.h
@@ -310,7 +310,6 @@ class BINARYNINJAUIAPI LinearView : public QAbstractScrollArea, public View, pub
void createArray();
void createStruct();
void createNewTypes();
- void autoCreateMembers();
//! Get the length of of the string (if there is one) starting at the
//! given address. String type is assumed to be UTF-8 by default, but the
diff --git a/ui/tokenizedtextview.h b/ui/tokenizedtextview.h
index 0e6abc5e..86ec5915 100644
--- a/ui/tokenizedtextview.h
+++ b/ui/tokenizedtextview.h
@@ -99,8 +99,7 @@ class BINARYNINJAUIAPI TokenizedTextView :
void makePtr();
void makeString(size_t charSize = 1);
void changeType();
- void inferStructureType();
- void autoCreateMembers();
+ void inferStructureType(const UIActionContext& context);
//! Get the length of of the string (if there is one) starting at the
//! given address. String type is assumed to be UTF-8 by default, but the
diff --git a/ui/typeview.h b/ui/typeview.h
index ebf01533..e47823b3 100644
--- a/ui/typeview.h
+++ b/ui/typeview.h
@@ -287,7 +287,6 @@ class BINARYNINJAUIAPI TypeView : public QAbstractScrollArea, public View, publi
void createUnion();
void setStructureSize();
void addUserXref();
- void autoCreateMembers();
void updateLineNumberAreaWidth(size_t lineCount);
void focusFilter();
void toggleCollapseType();