1
1
#pragma once
2
2
3
+ #include < clickablelabel.h>
3
4
#include < QtCore/QSortFilterProxyModel>
4
5
#include < QtCore/QTimer>
5
6
#include < QtWidgets/QListView>
@@ -44,14 +45,15 @@ class VariableListItem
44
45
BinaryNinja::DataVariable m_dataVar;
45
46
BinaryNinja::PossibleValueSet m_pvs;
46
47
bool m_hasUidf;
48
+ bool m_showPlacementInformation;
47
49
48
50
public:
49
51
// ! Create a new VariableListItem of the LocalVariable type.
50
52
VariableListItem (
51
- FunctionRef func, BinaryNinja::Variable var, BinaryNinja::PossibleValueSet pvs, bool hasUidf, std::string name);
53
+ FunctionRef func, BinaryNinja::Variable var, BinaryNinja::PossibleValueSet pvs, bool hasUidf, std::string name, bool showPlacementInformation );
52
54
53
55
// ! Create a new VariableListItem of the DataVariable type.
54
- VariableListItem (FunctionRef func, BinaryNinja::DataVariable dataVar, uint64_t refPoint, std::string name);
56
+ VariableListItem (FunctionRef func, BinaryNinja::DataVariable dataVar, uint64_t refPoint, std::string name, bool showPlacementInformation );
55
57
56
58
// ! Get the type of this list item.
57
59
VariableListItemType type () const ;
@@ -70,6 +72,7 @@ class VariableListItem
70
72
71
73
std::vector<BinaryNinja::InstructionTextToken> tokensBeforeName () const ;
72
74
std::vector<BinaryNinja::InstructionTextToken> tokensAfterName () const ;
75
+ void displayVariablePlacementInfo (std::vector<BinaryNinja::InstructionTextToken>& tokens) const ;
73
76
74
77
// ! Shorthand to get concatenated type, name, and value tokens.
75
78
std::vector<BinaryNinja::InstructionTextToken> displayTokens () const ;
@@ -111,6 +114,7 @@ class BINARYNINJAUIAPI VariableListModel : public QAbstractListModel
111
114
112
115
size_t m_prevVariableCount;
113
116
uint64_t m_prevSelectionId;
117
+ bool m_showPlacementInformation;
114
118
115
119
public:
116
120
VariableListModel (QWidget* parent, ViewFrame* view, BinaryViewRef data);
@@ -127,6 +131,9 @@ class BINARYNINJAUIAPI VariableListModel : public QAbstractListModel
127
131
// ! Whether or not the function exceeds the set complexity threshold
128
132
bool functionExceedsComplexity () const { return m_funcExceedsComplexity; }
129
133
134
+ // ! Get the showPlacementInformation setting
135
+ bool showPlacementInformation () const { return m_showPlacementInformation; }
136
+
130
137
// ! Set the focused function and update the content of the list.
131
138
void setFunction (FunctionRef func, const BinaryNinja::FunctionViewType& il, const HighlightTokenState& hts);
132
139
@@ -180,6 +187,9 @@ class BINARYNINJAUIAPI VariableList : public SidebarWidget, public FilterTarget
180
187
FilterEdit* m_filterEdit;
181
188
FilteredView* m_filteredList;
182
189
190
+ ClickableIcon* m_hamburgerButton;
191
+ QMenu* m_hamburgerMenu;
192
+
183
193
ViewFrame* m_view;
184
194
BinaryViewRef m_data;
185
195
@@ -206,6 +216,7 @@ class BINARYNINJAUIAPI VariableList : public SidebarWidget, public FilterTarget
206
216
207
217
// ! Get the VariableListItem corresponding to the current selection.
208
218
VariableListItem* selectedItem () const ;
219
+ void showHamburgerMenu () const ;
209
220
210
221
// ! Show the rename dialog for the selected variable.
211
222
void changeSelectedVariableName ();
0 commit comments