diff options
Diffstat (limited to 'ui/filecontext.h')
| -rw-r--r-- | ui/filecontext.h | 20 |
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(); |
