summaryrefslogtreecommitdiff
path: root/ui/filecontext.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2021-11-18 13:52:25 -0500
committerRusty Wagner <rusty.wagner@gmail.com>2022-01-10 15:25:18 -0700
commit7f6e54fdc8ff4a06fdcd3c510a37add337f04bac (patch)
tree60cce5955fcc05fc84f35f9662d49c7e0790dde1 /ui/filecontext.h
parentd9661f34eec6855d495a10eaafc2a8e2679756a7 (diff)
Refactor main area to use pane system
Diffstat (limited to 'ui/filecontext.h')
-rw-r--r--ui/filecontext.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/ui/filecontext.h b/ui/filecontext.h
index b58413b6..54861591 100644
--- a/ui/filecontext.h
+++ b/ui/filecontext.h
@@ -7,8 +7,10 @@
#include "binaryninjaapi.h"
#include "uicontext.h"
+class View;
class ViewFrame;
class ViewType;
+class SyncGroup;
// This base class is required for building the Python bindings. The other base classes of FileContext are
// ignored (as they have no functions that should be exported to Python), but this would leave the binding
@@ -31,6 +33,10 @@ class BINARYNINJAUIAPI FileContext: public FileContextBase, public BinaryNinja::
ViewFrame* m_currentViewFrame;
std::set<QObject*> m_refs;
+ std::vector<SyncGroup*> m_syncGroups;
+ std::map<ViewFrame*, std::pair<View*, ViewLocation>> m_syncLastLocation;
+ bool m_suspendSync = false;
+
static std::set<FileContext*> m_openFiles;
void createBinaryViews();
@@ -49,6 +55,8 @@ public:
QString getFilename() const { return m_filename; }
void setFilename(QString newName) {m_filename = newName;}
ViewFrame* getCurrentViewFrame() const { return m_currentViewFrame; }
+ QString getTabName(QWidget* widget);
+ QString getShortFileName(QWidget* widget);
bool isValidSaveFilename() const { return m_isValidSaveFilename; }
void markAsSaved(const QString& filename);
@@ -74,6 +82,18 @@ public:
void updateAnalysis();
+ SyncGroup* newSyncGroup();
+ SyncGroup* syncGroupById(int id);
+ void deleteSyncGroup(SyncGroup* syncGroup);
+ SyncGroup* syncGroupForFrame(ViewFrame* frame);
+ void removeFrame(ViewFrame* frame);
+ const std::vector<SyncGroup*>& allSyncGroups() const { return m_syncGroups; }
+
+ void forceLocationSyncForFrame(ViewFrame* frame);
+ bool syncLocation(ViewFrame* frame, View* view, const ViewLocation& location);
+ void suspendSync() { m_suspendSync = true; }
+ void resumeSync() { m_suspendSync = false; }
+
static FileContext* newFile();
static FileContext* openFilename(const QString& path);
static const std::set<FileContext*>& getOpenFileContexts();