Loading...
Searching...
No Matches
ViewFrame

Detailed Description

Classes

struct  SelectionInfoForXref
 This struct is used to pass selection information for cross references. More...
 
class  HistoryEntry
 
class  View
 
class  ViewNavigationMode
 
class  ViewLocation
 
class  ViewContainer
 
class  ViewFrame
 

Class Documentation

◆ SelectionInfoForXref

struct SelectionInfoForXref

This struct is used to pass selection information for cross references.

Public Member Functions

bool operator== (const SelectionInfoForXref &other) const
 
bool operator!= (const SelectionInfoForXref &other) const
 
bool isValid () const
 

Public Attributes

bool addrValid
 
bool typeValid
 
bool typeFieldValid
 
bool localVarValid
 
BNFunctionGraphType ilSource
 
uint64_t start
 
uint64_t end
 
BinaryNinja::QualifiedName type
 
uint64_t offset
 
BinaryNinja::Variable var
 
FunctionRef func
 
ArchitectureRef arch
 

Member Function Documentation

◆ operator==()

bool SelectionInfoForXref::operator== ( const SelectionInfoForXref & other) const
inline

◆ operator!=()

bool SelectionInfoForXref::operator!= ( const SelectionInfoForXref & other) const
inline

◆ isValid()

bool SelectionInfoForXref::isValid ( ) const
inline

Member Data Documentation

◆ addrValid

bool SelectionInfoForXref::addrValid

◆ typeValid

bool SelectionInfoForXref::typeValid

◆ typeFieldValid

bool SelectionInfoForXref::typeFieldValid

◆ localVarValid

bool SelectionInfoForXref::localVarValid

◆ ilSource

BNFunctionGraphType SelectionInfoForXref::ilSource

◆ start

uint64_t SelectionInfoForXref::start

◆ end

uint64_t SelectionInfoForXref::end

◆ type

BinaryNinja::QualifiedName SelectionInfoForXref::type

◆ offset

uint64_t SelectionInfoForXref::offset

◆ var

BinaryNinja::Variable SelectionInfoForXref::var

◆ func

FunctionRef SelectionInfoForXref::func

◆ arch

ArchitectureRef SelectionInfoForXref::arch

◆ HistoryEntry

class HistoryEntry

Public Member Functions

virtual ~HistoryEntry ()
 
QString getViewType () const
 
void setViewType (const QString &type)
 
virtual Json::Value serialize () const
 Serialize to json representation.
 
virtual bool deserialize (const Json::Value &value)
 Deserialize from json representation.
 
- Public Member Functions inherited from BinaryNinja::RefCountObject
 RefCountObject ()
 
virtual ~RefCountObject ()
 
RefCountObjectGetObject ()
 
void AddRef ()
 
void Release ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::RefCountObject
static RefCountObjectGetObject (RefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::RefCountObject
std::atomic< int > m_refs
 

Constructor & Destructor Documentation

◆ ~HistoryEntry()

virtual HistoryEntry::~HistoryEntry ( )
inlinevirtual

Member Function Documentation

◆ getViewType()

QString HistoryEntry::getViewType ( ) const
inline

◆ setViewType()

void HistoryEntry::setViewType ( const QString & type)
inline

◆ serialize()

virtual Json::Value HistoryEntry::serialize ( ) const
virtual

Serialize to json representation.

Returns
Json representation of history entry. In the Python api, this must be a dict.

Reimplemented in DisassemblyHistoryEntry, FlowGraphHistoryEntry, LinearViewHistoryEntry, and TokenizedTextViewHistoryEntry.

◆ deserialize()

virtual bool HistoryEntry::deserialize ( const Json::Value & value)
virtual

Deserialize from json representation.

This method should clear any previously entered data on the HistoryEntry as if it were newly created.

Parameters
valueJson representation of history entry. In the Python api, this will be a dict.
Returns
If deserialization was successful

Reimplemented in DisassemblyHistoryEntry, FlowGraphHistoryEntry, LinearViewHistoryEntry, and TokenizedTextViewHistoryEntry.

◆ View

class View

Public Member Functions

 View ()
 
virtual ~View ()
 
void enableRefreshTimer (QWidget *owner, int interval)
 
void setRefreshQuiesce (bool enable)
 
bool isQuiesced () const
 
virtual void notifyRefresh ()
 
virtual void notifyQuiesce (bool)
 
void setupView (QWidget *widget)
 
virtual bool canAssemble ()
 
virtual bool canCompile ()
 
virtual bool findNextData (uint64_t start, uint64_t end, const BinaryNinja::DataBuffer &data, uint64_t &addr, BNFindFlag flags, const std::function< bool(size_t current, size_t total)> &cb)
 
virtual bool findNextText (uint64_t start, uint64_t end, const std::string &text, uint64_t &addr, DisassemblySettingsRef settings, BNFindFlag flags, const BinaryNinja::FunctionViewType &graph, const std::function< bool(size_t current, size_t total)> &cb)
 
virtual bool findNextConstant (uint64_t start, uint64_t end, uint64_t constant, uint64_t &addr, DisassemblySettingsRef settings, const BinaryNinja::FunctionViewType &graph, const std::function< bool(size_t current, size_t total)> &cb)
 
virtual bool findAllData (uint64_t start, uint64_t end, const BinaryNinja::DataBuffer &data, BNFindFlag flags, const std::function< bool(size_t current, size_t total)> &cb, const std::function< bool(uint64_t addr, const BinaryNinja::DataBuffer &match)> &matchCallback)
 
virtual bool findAllText (uint64_t start, uint64_t end, const std::string &data, DisassemblySettingsRef settings, BNFindFlag flags, const BinaryNinja::FunctionViewType &graph, const std::function< bool(size_t current, size_t total)> &cb, const std::function< bool(uint64_t addr, const std::string &match, const BinaryNinja::LinearDisassemblyLine &line)> &matchCallback)
 
virtual bool findAllConstant (uint64_t start, uint64_t end, uint64_t constant, DisassemblySettingsRef settings, const BinaryNinja::FunctionViewType &graph, const std::function< bool(size_t current, size_t total)> &cb, const std::function< bool(uint64_t addr, const BinaryNinja::LinearDisassemblyLine &line)> &matchCallback)
 
virtual BinaryViewRef getData ()=0
 
virtual uint64_t getCurrentOffset ()=0
 
virtual BNAddressRange getSelectionOffsets ()
 
virtual SelectionInfoForXref getSelectionForXref ()
 
virtual void setSelectionOffsets (BNAddressRange range)=0
 
virtual bool navigate (uint64_t offset)=0
 
virtual bool navigateToFunction (FunctionRef func, uint64_t offset)
 
virtual bool goToReference (FunctionRef func, uint64_t source, uint64_t target)
 
virtual bool navigateToViewLocation (const ViewLocation &viewLocation, bool center=false)
 
bool navigateOnOtherPane (uint64_t offset)
 
bool navigateToFunctionOnOtherPane (FunctionRef func, uint64_t offset)
 
bool isBinaryDataNavigable ()
 
void setBinaryDataNavigable (bool navigable)
 
virtual bool closeRequest ()
 
virtual void closing ()
 
virtual void updateFonts ()
 
virtual void updateTheme ()
 
virtual void undo ()
 
virtual void redo ()
 
virtual bool canUndo ()
 
virtual bool canRedo ()
 
virtual void cut ()
 
virtual void copy (TransformRef xform=nullptr)
 
virtual void copyAddress ()
 
virtual void paste (TransformRef xform=nullptr)
 
virtual bool canCut ()
 
virtual bool canCopy ()
 
virtual bool canCopyWithTransform ()
 
virtual bool canCopyAddress ()
 
virtual bool canPaste ()
 
virtual bool canPasteWithTransform ()
 
virtual void transform (TransformRef xform, bool encode)
 
virtual bool canTransform ()
 
virtual void writeData (const BinaryNinja::DataBuffer &data, uint64_t addr)
 
virtual bool canDisplayAs (const UIActionContext &context, const BNIntegerDisplayType)
 
virtual void displayAs (const UIActionContext &context, BNIntegerDisplayType type)
 
virtual BinaryNinja::Ref< HistoryEntrygetHistoryEntry ()
 
virtual void navigateToHistoryEntry (BinaryNinja::Ref< HistoryEntry > entry)
 
virtual StatusBarWidgetgetStatusBarWidget ()
 
virtual ViewPaneHeaderSubtypeWidgetgetHeaderSubtypeWidget ()
 
virtual QWidget * getHeaderOptionsWidget ()
 
virtual FunctionRef getCurrentFunction ()
 
virtual BasicBlockRef getCurrentBasicBlock ()
 
virtual ArchitectureRef getCurrentArchitecture ()
 
virtual LowLevelILFunctionRef getCurrentLowLevelILFunction ()
 
virtual MediumLevelILFunctionRef getCurrentMediumLevelILFunction ()
 
virtual HighLevelILFunctionRef getCurrentHighLevelILFunction ()
 
virtual BinaryNinja::FunctionViewType getILViewType ()
 
virtual void setILViewType (const BinaryNinja::FunctionViewType &ilViewType)
 
virtual size_t getCurrentILInstructionIndex ()
 
virtual size_t getSelectionStartILInstructionIndex ()
 
virtual BNILIndexRange getILIndexRange ()
 
virtual QFont getFont ()=0
 
virtual DisassemblySettingsRef getDisassemblySettings ()
 
virtual void setDisassemblySettings (DisassemblySettingsRef settings)
 
virtual HighlightTokenState getHighlightTokenState ()
 
virtual UIActionContext actionContext ()
 
MenucontextMenu ()
 
UIActionHandleractionHandler ()
 
QWidget * widget ()
 
QString viewType ()
 
void updateCrossReferenceSelection (ViewFrame *frame=nullptr)
 
void forceSyncFromView (ViewFrame *frame=nullptr)
 
virtual void clearRelatedHighlights ()
 
virtual void setRelatedIndexHighlights (FunctionRef func, const std::set< size_t > &related)
 
virtual void setRelatedInstructionHighlights (FunctionRef func, const std::set< uint64_t > &related)
 
void notifyContextMenuCreated ()
 

Static Public Member Functions

static ViewgetViewFromWidget (QWidget *widget)
 
static void registerActions ()
 
static void registerLateActions ()
 

Protected Member Functions

bool writeDataToClipboard (const BinaryNinja::DataBuffer &data, bool binary, TransformRef xform)
 
BinaryNinja::DataBuffer readDataFromClipboard (TransformRef xform)
 
virtual std::string getNavigationMode ()
 
virtual void setNavigationMode (std::string mode)
 
virtual std::vector< std::string > getNavigationModes ()
 

Protected Attributes

Menu m_contextMenu
 
UIActionHandler m_actionHandler
 
bool m_binaryDataNavigable = false
 
QPointer< TransformParameterDialogm_transformParamDialog
 
bool m_quiesceState = true
 
QTimer * m_updateTimer = nullptr
 

Friends

class ViewNavigationMode
 

Constructor & Destructor Documentation

◆ View()

View::View ( )

◆ ~View()

virtual View::~View ( )
inlinevirtual

Member Function Documentation

◆ writeDataToClipboard()

bool View::writeDataToClipboard ( const BinaryNinja::DataBuffer & data,
bool binary,
TransformRef xform )
protected

◆ readDataFromClipboard()

BinaryNinja::DataBuffer View::readDataFromClipboard ( TransformRef xform)
protected

◆ getNavigationMode()

virtual std::string View::getNavigationMode ( )
inlineprotectedvirtual

◆ setNavigationMode()

virtual void View::setNavigationMode ( std::string mode)
inlineprotectedvirtual

◆ getNavigationModes()

virtual std::vector< std::string > View::getNavigationModes ( )
inlineprotectedvirtual

◆ enableRefreshTimer()

void View::enableRefreshTimer ( QWidget * owner,
int interval )

◆ setRefreshQuiesce()

void View::setRefreshQuiesce ( bool enable)

◆ isQuiesced()

bool View::isQuiesced ( ) const
inline

◆ notifyRefresh()

virtual void View::notifyRefresh ( )
inlinevirtual

◆ notifyQuiesce()

virtual void View::notifyQuiesce ( bool )
inlinevirtual

◆ setupView()

void View::setupView ( QWidget * widget)

◆ canAssemble()

virtual bool View::canAssemble ( )
inlinevirtual

Reimplemented in FlowGraphWidget, HexEditor, and LinearView.

◆ canCompile()

virtual bool View::canCompile ( )
inlinevirtual

Reimplemented in FlowGraphWidget, HexEditor, and LinearView.

◆ findNextData()

virtual bool View::findNextData ( uint64_t start,
uint64_t end,
const BinaryNinja::DataBuffer & data,
uint64_t & addr,
BNFindFlag flags,
const std::function< bool(size_t current, size_t total)> & cb )
virtual

◆ findNextText()

virtual bool View::findNextText ( uint64_t start,
uint64_t end,
const std::string & text,
uint64_t & addr,
DisassemblySettingsRef settings,
BNFindFlag flags,
const BinaryNinja::FunctionViewType & graph,
const std::function< bool(size_t current, size_t total)> & cb )
virtual

◆ findNextConstant()

virtual bool View::findNextConstant ( uint64_t start,
uint64_t end,
uint64_t constant,
uint64_t & addr,
DisassemblySettingsRef settings,
const BinaryNinja::FunctionViewType & graph,
const std::function< bool(size_t current, size_t total)> & cb )
virtual

◆ findAllData()

virtual bool View::findAllData ( uint64_t start,
uint64_t end,
const BinaryNinja::DataBuffer & data,
BNFindFlag flags,
const std::function< bool(size_t current, size_t total)> & cb,
const std::function< bool(uint64_t addr, const BinaryNinja::DataBuffer &match)> & matchCallback )
virtual

◆ findAllText()

virtual bool View::findAllText ( uint64_t start,
uint64_t end,
const std::string & data,
DisassemblySettingsRef settings,
BNFindFlag flags,
const BinaryNinja::FunctionViewType & graph,
const std::function< bool(size_t current, size_t total)> & cb,
const std::function< bool(uint64_t addr, const std::string &match, const BinaryNinja::LinearDisassemblyLine &line)> & matchCallback )
virtual

◆ findAllConstant()

virtual bool View::findAllConstant ( uint64_t start,
uint64_t end,
uint64_t constant,
DisassemblySettingsRef settings,
const BinaryNinja::FunctionViewType & graph,
const std::function< bool(size_t current, size_t total)> & cb,
const std::function< bool(uint64_t addr, const BinaryNinja::LinearDisassemblyLine &line)> & matchCallback )
virtual

◆ getData()

virtual BinaryViewRef View::getData ( )
pure virtual

◆ getCurrentOffset()

virtual uint64_t View::getCurrentOffset ( )
pure virtual

◆ getSelectionOffsets()

virtual BNAddressRange View::getSelectionOffsets ( )
virtual

◆ getSelectionForXref()

virtual SelectionInfoForXref View::getSelectionForXref ( )
virtual

◆ setSelectionOffsets()

virtual void View::setSelectionOffsets ( BNAddressRange range)
pure virtual

◆ navigate()

virtual bool View::navigate ( uint64_t offset)
pure virtual

◆ navigateToFunction()

virtual bool View::navigateToFunction ( FunctionRef func,
uint64_t offset )
virtual

Reimplemented in DisassemblyView, FlowGraphWidget, and LinearView.

◆ goToReference()

virtual bool View::goToReference ( FunctionRef func,
uint64_t source,
uint64_t target )
virtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ navigateToViewLocation()

virtual bool View::navigateToViewLocation ( const ViewLocation & viewLocation,
bool center = false )
virtual

Reimplemented in DisassemblyView, FlowGraphWidget, and LinearView.

◆ navigateOnOtherPane()

bool View::navigateOnOtherPane ( uint64_t offset)

◆ navigateToFunctionOnOtherPane()

bool View::navigateToFunctionOnOtherPane ( FunctionRef func,
uint64_t offset )

◆ isBinaryDataNavigable()

bool View::isBinaryDataNavigable ( )
inline

◆ setBinaryDataNavigable()

void View::setBinaryDataNavigable ( bool navigable)
inline

◆ closeRequest()

virtual bool View::closeRequest ( )
inlinevirtual

◆ closing()

virtual void View::closing ( )
inlinevirtual

Reimplemented in FlowGraphWidget.

◆ updateFonts()

virtual void View::updateFonts ( )
inlinevirtual

◆ updateTheme()

virtual void View::updateTheme ( )
inlinevirtual

◆ undo()

virtual void View::undo ( )
virtual

◆ redo()

virtual void View::redo ( )
virtual

◆ canUndo()

virtual bool View::canUndo ( )
virtual

◆ canRedo()

virtual bool View::canRedo ( )
virtual

◆ cut()

virtual void View::cut ( )
virtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ copy()

virtual void View::copy ( TransformRef xform = nullptr)
virtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ copyAddress()

virtual void View::copyAddress ( )
virtual

Reimplemented in LinearView, and TokenizedTextView.

◆ paste()

virtual void View::paste ( TransformRef xform = nullptr)
virtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ canCut()

virtual bool View::canCut ( )
virtual

Reimplemented in FlowGraphWidget.

◆ canCopy()

virtual bool View::canCopy ( )
virtual

Reimplemented in FlowGraphWidget, and StringsView.

◆ canCopyWithTransform()

virtual bool View::canCopyWithTransform ( )
virtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ canCopyAddress()

virtual bool View::canCopyAddress ( )
virtual

Reimplemented in FlowGraphWidget, and StackView.

◆ canPaste()

virtual bool View::canPaste ( )
virtual

Reimplemented in FlowGraphWidget, and StackView.

◆ canPasteWithTransform()

virtual bool View::canPasteWithTransform ( )
virtual

◆ transform()

virtual void View::transform ( TransformRef xform,
bool encode )
virtual

◆ canTransform()

virtual bool View::canTransform ( )
virtual

◆ writeData()

virtual void View::writeData ( const BinaryNinja::DataBuffer & data,
uint64_t addr )
virtual

Reimplemented in HexEditor.

◆ canDisplayAs()

virtual bool View::canDisplayAs ( const UIActionContext & context,
const BNIntegerDisplayType  )
virtual

◆ displayAs()

virtual void View::displayAs ( const UIActionContext & context,
BNIntegerDisplayType type )
virtual

◆ getHistoryEntry()

virtual BinaryNinja::Ref< HistoryEntry > View::getHistoryEntry ( )
virtual

◆ navigateToHistoryEntry()

virtual void View::navigateToHistoryEntry ( BinaryNinja::Ref< HistoryEntry > entry)
virtual

◆ getStatusBarWidget()

virtual StatusBarWidget * View::getStatusBarWidget ( )
inlinevirtual

◆ getHeaderSubtypeWidget()

virtual ViewPaneHeaderSubtypeWidget * View::getHeaderSubtypeWidget ( )
inlinevirtual

Reimplemented in DisassemblyView, and LinearView.

◆ getHeaderOptionsWidget()

virtual QWidget * View::getHeaderOptionsWidget ( )
inlinevirtual

◆ getViewFromWidget()

static View * View::getViewFromWidget ( QWidget * widget)
static

◆ getCurrentFunction()

virtual FunctionRef View::getCurrentFunction ( )
inlinevirtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ getCurrentBasicBlock()

virtual BasicBlockRef View::getCurrentBasicBlock ( )
inlinevirtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ getCurrentArchitecture()

virtual ArchitectureRef View::getCurrentArchitecture ( )
inlinevirtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ getCurrentLowLevelILFunction()

virtual LowLevelILFunctionRef View::getCurrentLowLevelILFunction ( )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ getCurrentMediumLevelILFunction()

virtual MediumLevelILFunctionRef View::getCurrentMediumLevelILFunction ( )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ getCurrentHighLevelILFunction()

virtual HighLevelILFunctionRef View::getCurrentHighLevelILFunction ( )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ getILViewType()

virtual BinaryNinja::FunctionViewType View::getILViewType ( )
inlinevirtual

Reimplemented in DisassemblyView, and LinearView.

◆ setILViewType()

virtual void View::setILViewType ( const BinaryNinja::FunctionViewType & ilViewType)
inlinevirtual

Reimplemented in DisassemblyView, and LinearView.

◆ getCurrentILInstructionIndex()

virtual size_t View::getCurrentILInstructionIndex ( )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ getSelectionStartILInstructionIndex()

virtual size_t View::getSelectionStartILInstructionIndex ( )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ getILIndexRange()

virtual BNILIndexRange View::getILIndexRange ( )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ getFont()

virtual QFont View::getFont ( )
pure virtual

◆ getDisassemblySettings()

virtual DisassemblySettingsRef View::getDisassemblySettings ( )
virtual

Reimplemented in DisassemblyView, and LinearView.

◆ setDisassemblySettings()

virtual void View::setDisassemblySettings ( DisassemblySettingsRef settings)
inlinevirtual

Reimplemented in DisassemblyView, and LinearView.

◆ getHighlightTokenState()

virtual HighlightTokenState View::getHighlightTokenState ( )
virtual

Reimplemented in FlowGraphWidget, LinearView, and TokenizedTextView.

◆ actionContext()

virtual UIActionContext View::actionContext ( )
virtual

Reimplemented in LinearView.

◆ contextMenu()

Menu & View::contextMenu ( )
inline

◆ actionHandler()

UIActionHandler * View::actionHandler ( )
inline

◆ widget()

QWidget * View::widget ( )
inline

◆ viewType()

QString View::viewType ( )

◆ updateCrossReferenceSelection()

void View::updateCrossReferenceSelection ( ViewFrame * frame = nullptr)

◆ forceSyncFromView()

void View::forceSyncFromView ( ViewFrame * frame = nullptr)

◆ clearRelatedHighlights()

virtual void View::clearRelatedHighlights ( )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ setRelatedIndexHighlights()

virtual void View::setRelatedIndexHighlights ( FunctionRef func,
const std::set< size_t > & related )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ setRelatedInstructionHighlights()

virtual void View::setRelatedInstructionHighlights ( FunctionRef func,
const std::set< uint64_t > & related )
inlinevirtual

Reimplemented in FlowGraphWidget, and LinearView.

◆ registerActions()

static void View::registerActions ( )
static

◆ registerLateActions()

static void View::registerLateActions ( )
static

◆ notifyContextMenuCreated()

void View::notifyContextMenuCreated ( )

Friends And Related Symbol Documentation

◆ ViewNavigationMode

friend class ViewNavigationMode
friend

Member Data Documentation

◆ m_contextMenu

Menu View::m_contextMenu
protected

◆ m_actionHandler

UIActionHandler View::m_actionHandler
protected

◆ m_binaryDataNavigable

bool View::m_binaryDataNavigable = false
protected

◆ m_transformParamDialog

QPointer<TransformParameterDialog> View::m_transformParamDialog
protected

◆ m_quiesceState

bool View::m_quiesceState = true
protected

◆ m_updateTimer

QTimer* View::m_updateTimer = nullptr
protected

◆ ViewNavigationMode

class ViewNavigationMode

Public Member Functions

 ViewNavigationMode (View *view, std::string mode)
 
 ~ViewNavigationMode ()
 

Constructor & Destructor Documentation

◆ ViewNavigationMode()

ViewNavigationMode::ViewNavigationMode ( View * view,
std::string mode )
inline

◆ ~ViewNavigationMode()

ViewNavigationMode::~ViewNavigationMode ( )
inline

◆ ViewLocation

class ViewLocation

Public Member Functions

 ViewLocation ()
 
 ViewLocation (const QString &viewType, uint64_t offset)
 
 ViewLocation (const QString &viewType, uint64_t offset, const BinaryNinja::FunctionViewType &ilViewType)
 
 ViewLocation (const QString &viewType, uint64_t offset, const BinaryNinja::FunctionViewType &ilViewType, size_t instrIndex)
 
 ViewLocation (const QString &viewType, FunctionRef function, uint64_t offset, const BinaryNinja::FunctionViewType &ilViewType, size_t instrIndex)
 
 ViewLocation (FunctionRef function, uint64_t offset, const BinaryNinja::FunctionViewType &ilViewType, size_t instrIndex=BN_INVALID_EXPR)
 
bool isValid () const
 
QString getViewType () const
 
uint64_t getOffset () const
 
const BinaryNinja::FunctionViewTypegetILViewType () const
 
size_t getInstrIndex () const
 
FunctionRef getFunction () const
 
void setViewType (const QString &viewType)
 
void setOffset (uint64_t offset)
 
void setILViewType (const BinaryNinja::FunctionViewType &ilViewType)
 
void setInstrIndex (uint64_t index)
 
void setFunction (FunctionRef function)
 
bool operator== (const ViewLocation &other) const
 
bool operator!= (const ViewLocation &other) const
 

Constructor & Destructor Documentation

◆ ViewLocation() [1/6]

ViewLocation::ViewLocation ( )
inline

◆ ViewLocation() [2/6]

ViewLocation::ViewLocation ( const QString & viewType,
uint64_t offset )
inline

◆ ViewLocation() [3/6]

ViewLocation::ViewLocation ( const QString & viewType,
uint64_t offset,
const BinaryNinja::FunctionViewType & ilViewType )
inline

◆ ViewLocation() [4/6]

ViewLocation::ViewLocation ( const QString & viewType,
uint64_t offset,
const BinaryNinja::FunctionViewType & ilViewType,
size_t instrIndex )
inline

◆ ViewLocation() [5/6]

ViewLocation::ViewLocation ( const QString & viewType,
FunctionRef function,
uint64_t offset,
const BinaryNinja::FunctionViewType & ilViewType,
size_t instrIndex )
inline

◆ ViewLocation() [6/6]

ViewLocation::ViewLocation ( FunctionRef function,
uint64_t offset,
const BinaryNinja::FunctionViewType & ilViewType,
size_t instrIndex = BN_INVALID_EXPR )
inline

Member Function Documentation

◆ isValid()

bool ViewLocation::isValid ( ) const
inline

◆ getViewType()

QString ViewLocation::getViewType ( ) const
inline

◆ getOffset()

uint64_t ViewLocation::getOffset ( ) const
inline

◆ getILViewType()

const BinaryNinja::FunctionViewType & ViewLocation::getILViewType ( ) const
inline

◆ getInstrIndex()

size_t ViewLocation::getInstrIndex ( ) const
inline

◆ getFunction()

FunctionRef ViewLocation::getFunction ( ) const
inline

◆ setViewType()

void ViewLocation::setViewType ( const QString & viewType)
inline

◆ setOffset()

void ViewLocation::setOffset ( uint64_t offset)
inline

◆ setILViewType()

void ViewLocation::setILViewType ( const BinaryNinja::FunctionViewType & ilViewType)
inline

◆ setInstrIndex()

void ViewLocation::setInstrIndex ( uint64_t index)
inline

◆ setFunction()

void ViewLocation::setFunction ( FunctionRef function)
inline

◆ operator==()

bool ViewLocation::operator== ( const ViewLocation & other) const
inline

◆ operator!=()

bool ViewLocation::operator!= ( const ViewLocation & other) const
inline

◆ ViewContainer

class ViewContainer

Public Member Functions

virtual ~ViewContainer ()
 
virtual ViewgetView ()=0
 

Constructor & Destructor Documentation

◆ ~ViewContainer()

virtual ViewContainer::~ViewContainer ( )
virtual

Member Function Documentation

◆ getView()

virtual View * ViewContainer::getView ( )
pure virtual

◆ ViewFrame

class ViewFrame

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 isGraphViewPreferred ()
 
void setPriorityView (const QString &viewType)
 
bool setViewType (const QString &viewType)
 
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)
 
void aboutToClose ()
 
bool isAboutToClose ()
 
bool closeRequest ()
 
void closing ()
 
void clearViewLocation ()
 
void updateFonts ()
 
void updateTheme ()
 
void addHistoryEntry ()
 
void readHistoryEntries (BinaryViewRef data, bool restoreLocation)
 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.
 
void writeHistoryEntries (BinaryViewRef data)
 Serialize history entries and current position, storing them in the raw data associated with a BinaryView.
 
bool canNavigateBack ()
 
bool canNavigateForward ()
 
void back ()
 
void forward ()
 
void setCurrentFunction (FunctionRef func)
 
void updateCrossReferences ()
 
void updateCrossReferenceSelection ()
 
void nextCrossReference ()
 
void prevCrossReference ()
 
void tryNavigateToMain ()
 
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.
 
bool tryMainSymbolsNavigation ()
 

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

◆ event()

bool ViewFrame::event ( QEvent * event)
overrideprotected

◆ mousePressEvent()

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

◆ gestureEvent()

bool ViewFrame::gestureEvent ( QGestureEvent * event)
protected

◆ setView()

void ViewFrame::setView ( QWidget * view)
protected

◆ 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

◆ tryMainSymbolsNavigation()

bool ViewFrame::tryMainSymbolsNavigation ( )
protected

◆ getFileContext()

FileContext * ViewFrame::getFileContext ( ) const
inline

◆ areFileContentsLocked()

bool ViewFrame::areFileContentsLocked ( bool showToolTip = false)

◆ setFileContentsLocked()

void ViewFrame::setFileContentsLocked ( bool enable)

◆ getDockHandler()

DockHandler * ViewFrame::getDockHandler ( )

◆ getTabName()

QString ViewFrame::getTabName ( )

◆ getShortFileName()

QString ViewFrame::getShortFileName ( )

◆ getAvailableTypes()

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

◆ getCurrentView()

QString ViewFrame::getCurrentView ( ) const

◆ getCurrentBinaryView()

BinaryViewRef ViewFrame::getCurrentBinaryView ( ) const

◆ getCurrentDataType()

QString ViewFrame::getCurrentDataType ( ) const

◆ getCurrentOffset()

uint64_t ViewFrame::getCurrentOffset ( ) const

◆ getSelectionOffsets()

BNAddressRange ViewFrame::getSelectionOffsets ( ) const

◆ getViewLocation()

ViewLocation ViewFrame::getViewLocation ( ) const

◆ setViewLocation()

void ViewFrame::setViewLocation ( const ViewLocation & viewLocation)

◆ getCurrentViewInterface()

View * ViewFrame::getCurrentViewInterface ( ) const
inline

◆ getCurrentWidget()

QWidget * ViewFrame::getCurrentWidget ( ) const
inline

◆ isGraphViewPreferred()

bool ViewFrame::isGraphViewPreferred ( )

◆ setPriorityView()

void ViewFrame::setPriorityView ( const QString & viewType)

◆ setViewType()

bool ViewFrame::setViewType ( const QString & viewType)

◆ focus()

void ViewFrame::focus ( )

◆ getExtendedView()

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

◆ getSidebar()

Sidebar * ViewFrame::getSidebar ( )

◆ getSidebarWidget()

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

◆ navigate() [1/3]

bool ViewFrame::navigate ( const QString & type,
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 ( BinaryViewRef data,
uint64_t offset,
bool updateInfo = true,
bool addHistoryEntry = true )

◆ navigateToFunction()

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

◆ goToReference()

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

◆ navigateToViewLocation()

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

◆ navigateToHistoryEntry()

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

◆ getTypeForView()

QString ViewFrame::getTypeForView ( QWidget * view) const

◆ getDataTypeForView() [1/2]

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

◆ getDataTypeForView() [2/2]

QString ViewFrame::getDataTypeForView ( QWidget * view) const

◆ getViewWidgetForType()

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

◆ getViewForType()

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

◆ aboutToClose()

void ViewFrame::aboutToClose ( )
inline

◆ isAboutToClose()

bool ViewFrame::isAboutToClose ( )
inline

◆ closeRequest()

bool ViewFrame::closeRequest ( )

◆ closing()

void ViewFrame::closing ( )

◆ clearViewLocation()

void ViewFrame::clearViewLocation ( )

◆ updateFonts()

void ViewFrame::updateFonts ( )

◆ updateTheme()

void ViewFrame::updateTheme ( )

◆ addHistoryEntry()

void ViewFrame::addHistoryEntry ( )

◆ readHistoryEntries()

void ViewFrame::readHistoryEntries ( BinaryViewRef data,
bool restoreLocation )

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
restoreLocationwhether or not to navigate to the location stored in the database

◆ 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

◆ canNavigateBack()

bool ViewFrame::canNavigateBack ( )

◆ canNavigateForward()

bool ViewFrame::canNavigateForward ( )

◆ back()

void ViewFrame::back ( )

◆ forward()

void ViewFrame::forward ( )

◆ getAddressFromString()

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

◆ 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

◆ 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

◆ setCurrentFunction()

void ViewFrame::setCurrentFunction ( FunctionRef func)

◆ updateCrossReferences()

void ViewFrame::updateCrossReferences ( )

◆ updateCrossReferenceSelection()

void ViewFrame::updateCrossReferenceSelection ( )

◆ nextCrossReference()

void ViewFrame::nextCrossReference ( )

◆ prevCrossReference()

void ViewFrame::prevCrossReference ( )

◆ tryNavigateToMain()

void ViewFrame::tryNavigateToMain ( )

◆ updateVariableList()

void ViewFrame::updateVariableList ( )

◆ updateStackView()

void ViewFrame::updateStackView ( )

◆ showTags()

void ViewFrame::showTags ( )

◆ editTag()

void ViewFrame::editTag ( TagRef tag)

◆ nextTag()

void ViewFrame::nextTag ( )

◆ prevTag()

void ViewFrame::prevTag ( )

◆ actionContext()

virtual UIActionContext ViewFrame::actionContext ( )
virtual

◆ bindActions()

void ViewFrame::bindActions ( )

◆ registerActions()

static void ViewFrame::registerActions ( )
static

◆ viewFrameForWidget()

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

◆ lineHasInstructionToken()

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

◆ getDisassemblyText()

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

◆ preferredSyncGroup()

int ViewFrame::preferredSyncGroup ( ) const
inline

◆ setPreferredSyncGroup()

void ViewFrame::setPreferredSyncGroup ( int syncGroup)
inline

◆ disableSync()

void ViewFrame::disableSync ( )

◆ enableSync() [1/2]

void ViewFrame::enableSync ( )

◆ enableSync() [2/2]

void ViewFrame::enableSync ( int id)

◆ newSyncGroup()

void ViewFrame::newSyncGroup ( )

◆ toggleSync()

void ViewFrame::toggleSync ( )

◆ syncGroup()

SyncGroup * ViewFrame::syncGroup ( )

◆ syncToOtherViews()

void ViewFrame::syncToOtherViews ( )

◆ forceSyncFromView()

void ViewFrame::forceSyncFromView ( )

◆ getOtherPane()

ViewFrame * ViewFrame::getOtherPane ( )

◆ assemble

virtual void ViewFrame::assemble ( )
virtualslot

◆ compile

virtual void ViewFrame::compile ( )
virtualslot

◆ notifyCloseFeatureMap

void ViewFrame::notifyCloseFeatureMap ( bool recreate)
signal

◆ notifyViewChanged

void ViewFrame::notifyViewChanged ( ViewFrame * frame)
signal

Member Data Documentation

◆ compileDialog

QPointer<CompileDialog> ViewFrame::compileDialog
protected