diff options
| author | Rusty Wagner <rusty@vector35.com> | 2019-03-19 15:41:08 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2019-03-20 13:00:17 -0400 |
| commit | 411acbaa4a1d217e731d3df0b189445117be3b26 (patch) | |
| tree | 49b5c5290058ffb98dd23ec9a7c1a49921254d15 /ui/viewtype.h | |
| parent | ca1bc587c22928bbd7198813064c9615c3c12771 (diff) | |
Add in progress UI API headers
Diffstat (limited to 'ui/viewtype.h')
| -rw-r--r-- | ui/viewtype.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ui/viewtype.h b/ui/viewtype.h new file mode 100644 index 00000000..2216b9dd --- /dev/null +++ b/ui/viewtype.h @@ -0,0 +1,40 @@ +#pragma once + +#include <QtCore/QString> +#include <QtWidgets/QWidget> +#include <vector> +#include "binaryninjaapi.h" +#include "uicontext.h" + +class ViewFrame; + +class BINARYNINJAUIAPI ViewType +{ + QString m_name, m_longName; + +public: + ViewType(const QString& name, const QString& longName); + virtual ~ViewType(); + + const QString& getName() { return m_name; } + const QString& getLongName() { return m_longName; } + virtual int getPriority(BinaryViewRef data, const QString& filename) = 0; + virtual QWidget* create(BinaryViewRef data, ViewFrame* viewFrame) = 0; + + virtual QString getDisplayName(BinaryViewTypeRef type); + virtual QString getDisplayLongName(BinaryViewTypeRef type); + + static ViewType* getTypeByName(const QString& name); + static const std::vector<ViewType*>& getTypes(); + + static void registerViewType(ViewType* type); +}; + + +class BINARYNINJAUIAPI ViewTypeContainer +{ +public: + std::vector<ViewType*> m_types; + + static ViewTypeContainer& GetViewTypeContainer(); +}; |
