summaryrefslogtreecommitdiff
path: root/ui/ilchooser.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ilchooser.h')
-rw-r--r--ui/ilchooser.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/ui/ilchooser.h b/ui/ilchooser.h
new file mode 100644
index 00000000..acf1bd22
--- /dev/null
+++ b/ui/ilchooser.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "pane.h"
+#include "menus.h"
+
+class BINARYNINJAUIAPI ILChooserWidget: public MenuHelper
+{
+ Q_OBJECT
+
+ UIActionHandler* m_handler;
+ bool m_longDescription;
+
+public:
+ ILChooserWidget(QWidget* parent, UIActionHandler* handler, bool longDescription);
+ void updateStatus(BNFunctionGraphType current);
+
+ static QString shortNameForILType(BNFunctionGraphType type);
+ static QString longNameForILType(BNFunctionGraphType type);
+
+protected:
+ virtual void showMenu() override;
+};
+
+class BINARYNINJAUIAPI ViewPaneHeaderILChooserWidget: public ViewPaneHeaderSubtypeWidget
+{
+ Q_OBJECT
+
+ View* m_view;
+ ILChooserWidget* m_widget;
+
+public:
+ ViewPaneHeaderILChooserWidget(View* view, UIActionHandler* handler);
+ virtual void updateStatus();
+};