From 411acbaa4a1d217e731d3df0b189445117be3b26 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 19 Mar 2019 15:41:08 -0400 Subject: Add in progress UI API headers --- ui/viewtype.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ui/viewtype.h (limited to 'ui/viewtype.h') 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 +#include +#include +#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& getTypes(); + + static void registerViewType(ViewType* type); +}; + + +class BINARYNINJAUIAPI ViewTypeContainer +{ +public: + std::vector m_types; + + static ViewTypeContainer& GetViewTypeContainer(); +}; -- cgit v1.3.1