summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2021-03-16 21:27:42 -0400
committerJosh Ferrell <josh@vector35.com>2021-04-02 15:02:38 -0400
commitf6e2976e166f7f533a618352a761504b8339db88 (patch)
treefcb643bcf0d010080f64451779d95579c213b66b
parentaf5287cfa36f779c80a86e45cf2b458689e6e9f2 (diff)
Make TypeView::getLinesForType static+public
-rw-r--r--ui/typeview.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/ui/typeview.h b/ui/typeview.h
index 40e41215..2d95a080 100644
--- a/ui/typeview.h
+++ b/ui/typeview.h
@@ -17,6 +17,27 @@
#define TYPE_VIEW_UPDATE_CHECK_INTERVAL 200
+enum BINARYNINJAUIAPI TypeDefinitionLineType
+{
+ TypedefLineType,
+ StructDefinitionLineType,
+ StructFieldLineType,
+ StructDefinitionEndLineType,
+ EnumDefinitionLineType,
+ EnumMemberLineType,
+ EnumDefinitionEndLineType,
+ PaddingLineType
+};
+
+struct BINARYNINJAUIAPI TypeDefinitionLine
+{
+ TypeDefinitionLineType lineType;
+ std::vector<BinaryNinja::InstructionTextToken> tokens;
+ TypeRef type, rootType;
+ uint64_t offset;
+ size_t fieldIndex;
+};
+
class BINARYNINJAUIAPI TypeViewHistoryEntry: public HistoryEntry
{
BinaryNinja::QualifiedName m_cursorType;
@@ -56,27 +77,6 @@ class BINARYNINJAUIAPI TypeView: public QAbstractScrollArea, public View, public
{
Q_OBJECT
- enum TypeDefinitionLineType
- {
- TypedefLineType,
- StructDefinitionLineType,
- StructFieldLineType,
- StructDefinitionEndLineType,
- EnumDefinitionLineType,
- EnumMemberLineType,
- EnumDefinitionEndLineType,
- PaddingLineType
- };
-
- struct TypeDefinitionLine
- {
- TypeDefinitionLineType lineType;
- std::vector<BinaryNinja::InstructionTextToken> tokens;
- TypeRef type, rootType;
- uint64_t offset;
- size_t fieldIndex;
- };
-
struct TypeLineIndex
{
BinaryNinja::QualifiedName name;
@@ -119,8 +119,6 @@ class BINARYNINJAUIAPI TypeView: public QAbstractScrollArea, public View, public
void adjustSize(int width, int height);
- std::vector<TypeDefinitionLine> getLinesForType(const std::string& name, const std::string& varName, size_t index,
- TypeRef type, TypeRef parent);
void refreshAllTypes();
void ensureCursorVisible();
void focusOnCursor();
@@ -204,6 +202,8 @@ public:
virtual ArchitectureRef getOrAskForArchitecture();
+ static std::vector<TypeDefinitionLine> getLinesForType(const std::string& name, const std::string& varName, size_t index, TypeRef type, TypeRef parent, int paddingCols);
+
protected:
virtual void resizeEvent(QResizeEvent* event) override;
virtual void paintEvent(QPaintEvent* event) override;