ViewFrame Class Reference

Public Slots

virtual void assemble ()
 
virtual void compile ()
 

Signals

void notifyCloseFeatureMap (bool recreate)
 
void notifyViewChanged (ViewFrame *frame)
 

Public Member Functions

 ViewFrame (QWidget *parent, FileContext *file, const QString &type, bool createDynamicWidgets=false)
 
virtual ~ViewFrame ()
 
FileContextgetFileContext () const
 
bool areFileContentsLocked (bool showToolTip=false)
 
void setFileContentsLocked (bool enable)
 
DockHandlergetDockHandler ()
 
QString getTabName ()
 
QString getShortFileName ()
 
std::vector< QString > getAvailableTypes () const
 
QString getCurrentView () const
 
BinaryViewRef getCurrentBinaryView () const
 
QString getCurrentDataType () const
 
uint64_t getCurrentOffset () const
 
BNAddressRange getSelectionOffsets () const
 
ViewLocation getViewLocation () const
 
void setViewLocation (const ViewLocation &viewLocation)
 
ViewgetCurrentViewInterface () const
 
QWidget * getCurrentWidget () const
 
bool setViewType (const QString &type)
 
bool isGraphViewPreferred ()
 
void setGraphViewPreferred (bool graphViewPreferred)
 
void focus ()
 
QWidget * getExtendedView (const QString &name, bool create=false)
 
SidebargetSidebar ()
 
template<class T >
T * getSidebarWidget (const QString &name)
 
bool navigate (const QString &type, uint64_t offset, bool updateInfo=true, bool addHistoryEntry=true)
 
bool navigate (const QString &type, const std::function< bool(View *)> &handler, bool updateInfo=true, bool addHistoryEntry=true)
 
bool navigate (BinaryViewRef data, uint64_t offset, bool updateInfo=true, bool addHistoryEntry=true)
 
bool navigateToFunction (FunctionRef func, uint64_t offset, bool updateInfo=true, bool addHistoryEntry=true)
 
bool goToReference (BinaryViewRef data, FunctionRef func, uint64_t source, uint64_t target, bool addHistoryEntry=true)
 
bool navigateToViewLocation (BinaryViewRef data, const ViewLocation &viewLocation, bool addHistoryEntry=true, bool center=false)
 
bool navigateToHistoryEntry (BinaryNinja::Ref< HistoryEntry > entry)
 
QString getTypeForView (QWidget *view) const
 
QString getDataTypeForView (const QString &type) const
 
QString getDataTypeForView (QWidget *view) const
 
QWidget * getViewWidgetForType (const QString &type)
 
ViewgetViewForType (const QString &type)
 
bool closeRequest ()
 
void closing ()
 
void clearViewLocation ()
 
void updateFonts ()
 
void updateTheme ()
 
void addHistoryEntry ()
 
void readHistoryEntries (BinaryViewRef data)
 Parse history entries from the raw data associated with a BinaryView, loading them into the back/forward navigation stacks, and navigating to the saved position. More...
 
void writeHistoryEntries (BinaryViewRef data)
 Serialize history entries and current position, storing them in the raw data associated with a BinaryView. More...
 
void back ()
 
void forward ()
 
void setCurrentFunction (FunctionRef func)
 
void updateCrossReferences ()
 
void updateCrossReferenceSelection ()
 
void nextCrossReference ()
 
void prevCrossReference ()
 
void updateVariableList ()
 
void updateStackView ()
 
void showTags ()
 
void editTag (TagRef tag)
 
void nextTag ()
 
void prevTag ()
 
virtual UIActionContext actionContext ()
 
void bindActions ()
 
int preferredSyncGroup () const
 
void setPreferredSyncGroup (int syncGroup)
 
void disableSync ()
 
void enableSync ()
 
void enableSync (int id)
 
void newSyncGroup ()
 
void toggleSync ()
 
SyncGroupsyncGroup ()
 
void syncToOtherViews ()
 
void forceSyncFromView ()
 
ViewFramegetOtherPane ()
 

Static Public Member Functions

static bool getAddressFromString (QWidget *parent, BinaryViewRef data, uint64_t &offset, uint64_t currentAddress, const QString &addrStr, std::string &errorString)
 
static bool getAddressFromInput (QWidget *parent, BinaryViewRef data, uint64_t &offset, uint64_t currentAddress, const QString &title="Go to Address", const QString &msg="Address:", bool defaultToCurrent=false)
 
static bool getFileOffsetFromInput (QWidget *parent, BinaryViewRef data, uint64_t &offset, uint64_t currentAddress, const QString &title="Go to File Offset", const QString &msg="File Offset:", bool defaultToCurrent=false)
 
static void registerActions ()
 
static ViewFrameviewFrameForWidget (QWidget *widget)
 
static bool lineHasInstructionToken (const BinaryNinja::DisassemblyTextLine &line)
 
static QString getDisassemblyText (const std::vector< BinaryNinja::DisassemblyTextLine > &lines)
 

Protected Member Functions

bool event (QEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
bool gestureEvent (QGestureEvent *event)
 
void setView (QWidget *view)
 
BinaryNinja::Ref< HistoryEntrydeserializeHistoryEntry (const Json::Value &json)
 Load one history entry from json representation. More...
 

Protected Attributes

QPointer< CompileDialogcompileDialog
 

Constructor & Destructor Documentation

◆ ViewFrame()

ViewFrame::ViewFrame ( QWidget *  parent,
FileContext file,
const QString &  type,
bool  createDynamicWidgets = false 
)
explicit

◆ ~ViewFrame()

virtual ViewFrame::~ViewFrame ( )
virtual

Member Function Documentation

◆ actionContext()

virtual UIActionContext ViewFrame::actionContext ( )
virtual

◆ addHistoryEntry()

void ViewFrame::addHistoryEntry ( )

◆ areFileContentsLocked()

bool ViewFrame::areFileContentsLocked ( bool  showToolTip = false)

◆ assemble

virtual void ViewFrame::assemble ( )
virtualslot

◆ back()

void ViewFrame::back ( )

◆ bindActions()

void ViewFrame::bindActions ( )

◆ clearViewLocation()

void ViewFrame::clearViewLocation ( )

◆ closeRequest()

bool ViewFrame::closeRequest ( )

◆ closing()

void ViewFrame::closing ( )

◆ compile

virtual void ViewFrame::compile ( )
virtualslot

◆ deserializeHistoryEntry()

BinaryNinja::Ref< HistoryEntry > ViewFrame::deserializeHistoryEntry ( const Json::Value &  json)
protected

Load one history entry from json representation.

Parameters
jsonJson rep of history entry
Returns
Entry, if successful, else nullptr

◆ disableSync()

void ViewFrame::disableSync ( )

◆ editTag()

void ViewFrame::editTag ( TagRef  tag)

◆ enableSync() [1/2]

void ViewFrame::enableSync ( )

◆ enableSync() [2/2]

void ViewFrame::enableSync ( int  id)

◆ event()

bool ViewFrame::event ( QEvent *  event)
overrideprotected

◆ focus()

void ViewFrame::focus ( )

◆ forceSyncFromView()

void ViewFrame::forceSyncFromView ( )

◆ forward()

void ViewFrame::forward ( )

◆ gestureEvent()

bool ViewFrame::gestureEvent ( QGestureEvent *  event)
protected

◆ getAddressFromInput()

static bool ViewFrame::getAddressFromInput ( QWidget *  parent,
BinaryViewRef  data,
uint64_t &  offset,
uint64_t  currentAddress,
const QString &  title = "Go to Address",
const QString &  msg = "Address:",
bool  defaultToCurrent = false 
)
static

◆ getAddressFromString()

static bool ViewFrame::getAddressFromString ( QWidget *  parent,
BinaryViewRef  data,
uint64_t &  offset,
uint64_t  currentAddress,
const QString &  addrStr,
std::string &  errorString 
)
static

◆ getAvailableTypes()

std::vector< QString > ViewFrame::getAvailableTypes ( ) const

◆ getCurrentBinaryView()

BinaryViewRef ViewFrame::getCurrentBinaryView ( ) const

◆ getCurrentDataType()

QString ViewFrame::getCurrentDataType ( ) const

◆ getCurrentOffset()

uint64_t ViewFrame::getCurrentOffset ( ) const

◆ getCurrentView()

QString ViewFrame::getCurrentView ( ) const

◆ getCurrentViewInterface()

View * ViewFrame::getCurrentViewInterface ( ) const
inline

◆ getCurrentWidget()

QWidget * ViewFrame::getCurrentWidget ( ) const
inline

◆ getDataTypeForView() [1/2]

QString ViewFrame::getDataTypeForView ( const QString &  type) const

◆ getDataTypeForView() [2/2]

QString ViewFrame::getDataTypeForView ( QWidget *  view) const

◆ getDisassemblyText()

static QString ViewFrame::getDisassemblyText ( const std::vector< BinaryNinja::DisassemblyTextLine > &  lines)
static

◆ getDockHandler()

DockHandler * ViewFrame::getDockHandler ( )

◆ getExtendedView()

QWidget * ViewFrame::getExtendedView ( const QString &  name,
bool  create = false 
)

◆ getFileContext()

FileContext * ViewFrame::getFileContext ( ) const
inline

◆ getFileOffsetFromInput()

static bool ViewFrame::getFileOffsetFromInput ( QWidget *  parent,
BinaryViewRef  data,
uint64_t &  offset,
uint64_t  currentAddress,
const QString &  title = "Go to File Offset",
const QString &  msg = "File Offset:",
bool  defaultToCurrent = false 
)
static

◆ getOtherPane()

ViewFrame * ViewFrame::getOtherPane ( )

◆ getSelectionOffsets()

BNAddressRange ViewFrame::getSelectionOffsets ( ) const

◆ getShortFileName()

QString ViewFrame::getShortFileName ( )

◆ getSidebar()

Sidebar * ViewFrame::getSidebar ( )

◆ getSidebarWidget()

template<class T >
T * ViewFrame::getSidebarWidget ( const QString &  name)
inline

◆ getTabName()

QString ViewFrame::getTabName ( )

◆ getTypeForView()

QString ViewFrame::getTypeForView ( QWidget *  view) const

◆ getViewForType()

View * ViewFrame::getViewForType ( const QString &  type)

◆ getViewLocation()

ViewLocation ViewFrame::getViewLocation ( ) const

◆ getViewWidgetForType()

QWidget * ViewFrame::getViewWidgetForType ( const QString &  type)

◆ goToReference()

bool ViewFrame::goToReference ( BinaryViewRef  data,
FunctionRef  func,
uint64_t  source,
uint64_t  target,
bool  addHistoryEntry = true 
)

◆ isGraphViewPreferred()

bool ViewFrame::isGraphViewPreferred ( )
inline

◆ lineHasInstructionToken()

static bool ViewFrame::lineHasInstructionToken ( const BinaryNinja::DisassemblyTextLine line)
static

◆ mousePressEvent()

virtual void ViewFrame::mousePressEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ navigate() [1/3]

bool ViewFrame::navigate ( BinaryViewRef  data,
uint64_t  offset,
bool  updateInfo = true,
bool  addHistoryEntry = true 
)

◆ navigate() [2/3]

bool ViewFrame::navigate ( const QString &  type,
const std::function< bool(View *)> &  handler,
bool  updateInfo = true,
bool  addHistoryEntry = true 
)

◆ navigate() [3/3]

bool ViewFrame::navigate ( const QString &  type,
uint64_t  offset,
bool  updateInfo = true,
bool  addHistoryEntry = true 
)

◆ navigateToFunction()

bool ViewFrame::navigateToFunction ( FunctionRef  func,
uint64_t  offset,
bool  updateInfo = true,
bool  addHistoryEntry = true 
)

◆ navigateToHistoryEntry()

bool ViewFrame::navigateToHistoryEntry ( BinaryNinja::Ref< HistoryEntry entry)

◆ navigateToViewLocation()

bool ViewFrame::navigateToViewLocation ( BinaryViewRef  data,
const ViewLocation viewLocation,
bool  addHistoryEntry = true,
bool  center = false 
)

◆ newSyncGroup()

void ViewFrame::newSyncGroup ( )

◆ nextCrossReference()

void ViewFrame::nextCrossReference ( )

◆ nextTag()

void ViewFrame::nextTag ( )

◆ notifyCloseFeatureMap

void ViewFrame::notifyCloseFeatureMap ( bool  recreate)
signal

◆ notifyViewChanged

void ViewFrame::notifyViewChanged ( ViewFrame frame)
signal

◆ preferredSyncGroup()

int ViewFrame::preferredSyncGroup ( ) const
inline

◆ prevCrossReference()

void ViewFrame::prevCrossReference ( )

◆ prevTag()

void ViewFrame::prevTag ( )

◆ readHistoryEntries()

void ViewFrame::readHistoryEntries ( BinaryViewRef  data)

Parse history entries from the raw data associated with a BinaryView, loading them into the back/forward navigation stacks, and navigating to the saved position.

Parameters
dataView containing history entries

◆ registerActions()

static void ViewFrame::registerActions ( )
static

◆ setCurrentFunction()

void ViewFrame::setCurrentFunction ( FunctionRef  func)

◆ setFileContentsLocked()

void ViewFrame::setFileContentsLocked ( bool  enable)

◆ setGraphViewPreferred()

void ViewFrame::setGraphViewPreferred ( bool  graphViewPreferred)
inline

◆ setPreferredSyncGroup()

void ViewFrame::setPreferredSyncGroup ( int  syncGroup)
inline

◆ setView()

void ViewFrame::setView ( QWidget *  view)
protected

◆ setViewLocation()

void ViewFrame::setViewLocation ( const ViewLocation viewLocation)

◆ setViewType()

bool ViewFrame::setViewType ( const QString &  type)

◆ showTags()

void ViewFrame::showTags ( )

◆ syncGroup()

SyncGroup * ViewFrame::syncGroup ( )

◆ syncToOtherViews()

void ViewFrame::syncToOtherViews ( )

◆ toggleSync()

void ViewFrame::toggleSync ( )

◆ updateCrossReferences()

void ViewFrame::updateCrossReferences ( )

◆ updateCrossReferenceSelection()

void ViewFrame::updateCrossReferenceSelection ( )

◆ updateFonts()

void ViewFrame::updateFonts ( )

◆ updateStackView()

void ViewFrame::updateStackView ( )

◆ updateTheme()

void ViewFrame::updateTheme ( )

◆ updateVariableList()

void ViewFrame::updateVariableList ( )

◆ viewFrameForWidget()

static ViewFrame * ViewFrame::viewFrameForWidget ( QWidget *  widget)
static

◆ writeHistoryEntries()

void ViewFrame::writeHistoryEntries ( BinaryViewRef  data)

Serialize history entries and current position, storing them in the raw data associated with a BinaryView.

Parameters
dataView for saving history entries

Member Data Documentation

◆ compileDialog

QPointer<CompileDialog> ViewFrame::compileDialog
protected

The documentation for this class was generated from the following file: