TokenizedTextView Class Reference

Public Member Functions

 TokenizedTextView (QWidget *parent, BinaryViewRef data, const std::vector< BinaryNinja::LinearDisassemblyLine > &lines=std::vector< BinaryNinja::LinearDisassemblyLine >())
 
virtual ~TokenizedTextView ()
 
virtual BinaryViewRef getData () override
 
virtual uint64_t getCurrentOffset () override
 
virtual BNAddressRange getSelectionOffsets () override
 
virtual SelectionInfoForXref getSelectionForXref () override
 
virtual void setSelectionOffsets (BNAddressRange range) override
 
virtual FunctionRef getCurrentFunction () override
 
virtual BasicBlockRef getCurrentBasicBlock () override
 
virtual ArchitectureRef getCurrentArchitecture () override
 
virtual bool navigate (uint64_t pos) override
 
virtual BinaryNinja::Ref< HistoryEntrygetHistoryEntry () override
 
void populateDefaultHistoryEntry (TokenizedTextViewHistoryEntry *entry)
 
virtual void navigateToHistoryEntry (BinaryNinja::Ref< HistoryEntry > entry) override
 
virtual void OnBinaryDataWritten (BinaryNinja::BinaryView *data, uint64_t offset, size_t len) override
 
virtual void OnBinaryDataInserted (BinaryNinja::BinaryView *data, uint64_t offset, size_t len) override
 
virtual void OnBinaryDataRemoved (BinaryNinja::BinaryView *data, uint64_t offset, uint64_t len) override
 
virtual void OnAnalysisFunctionAdded (BinaryNinja::BinaryView *view, BinaryNinja::Function *func) override
 
virtual void OnAnalysisFunctionRemoved (BinaryNinja::BinaryView *view, BinaryNinja::Function *func) override
 
virtual void OnAnalysisFunctionUpdated (BinaryNinja::BinaryView *view, BinaryNinja::Function *func) override
 
virtual void OnDataVariableAdded (BinaryNinja::BinaryView *view, const BinaryNinja::DataVariable &var) override
 
virtual void OnDataVariableRemoved (BinaryNinja::BinaryView *view, const BinaryNinja::DataVariable &var) override
 
virtual void OnDataVariableUpdated (BinaryNinja::BinaryView *view, const BinaryNinja::DataVariable &var) override
 
virtual void OnDataMetadataUpdated (BinaryNinja::BinaryView *view, uint64_t offset) override
 
virtual void OnTagUpdated (BinaryNinja::BinaryView *data, const BinaryNinja::TagReference &tagRef) override
 
virtual void updateFonts () override
 
virtual void followPointer ()
 
virtual void cut () override
 
virtual void copy (TransformRef xform=nullptr) override
 
virtual void paste (TransformRef xform=nullptr) override
 
virtual void copyAddress () override
 
virtual HighlightTokenState getHighlightTokenState () override
 
virtual bool goToReference (FunctionRef func, uint64_t source, uint64_t target) override
 
QFont getFont () override
 
virtual void updateLines ()
 
void setLines (const std::vector< BinaryNinja::LinearDisassemblyLine > &lines)
 
void setUpdatedLines (const std::vector< BinaryNinja::LinearDisassemblyLine > &lines)
 
void setFunction (FunctionRef func)
 
- Public Member Functions inherited from View
 View ()
 
virtual ~View ()
 
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, BNFunctionGraphType 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, BNFunctionGraphType 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, BNFunctionGraphType 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, BNFunctionGraphType 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 BNFunctionGraphType getILViewType ()
 
virtual void setILViewType (BNFunctionGraphType ilViewType)
 
virtual size_t getCurrentILInstructionIndex ()
 
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)
 
- Public Member Functions inherited from BinaryNinja::BinaryDataNotification
 BinaryDataNotification ()
 
virtual ~BinaryDataNotification ()
 
BNBinaryDataNotificationGetCallbacks ()
 
virtual void OnBinaryDataWritten (BinaryView *view, uint64_t offset, size_t len)
 
virtual void OnBinaryDataInserted (BinaryView *view, uint64_t offset, size_t len)
 
virtual void OnBinaryDataRemoved (BinaryView *view, uint64_t offset, uint64_t len)
 
virtual void OnAnalysisFunctionAdded (BinaryView *view, Function *func)
 
virtual void OnAnalysisFunctionRemoved (BinaryView *view, Function *func)
 
virtual void OnAnalysisFunctionUpdated (BinaryView *view, Function *func)
 
virtual void OnAnalysisFunctionUpdateRequested (BinaryView *view, Function *func)
 
virtual void OnDataVariableAdded (BinaryView *view, const DataVariable &var)
 
virtual void OnDataVariableRemoved (BinaryView *view, const DataVariable &var)
 
virtual void OnDataVariableUpdated (BinaryView *view, const DataVariable &var)
 
virtual void OnDataMetadataUpdated (BinaryView *view, uint64_t offset)
 
virtual void OnTagTypeUpdated (BinaryView *view, Ref< TagType > tagTypeRef)
 
virtual void OnTagAdded (BinaryView *view, const TagReference &tagRef)
 
virtual void OnTagUpdated (BinaryView *view, const TagReference &tagRef)
 
virtual void OnTagRemoved (BinaryView *view, const TagReference &tagRef)
 
virtual void OnSymbolAdded (BinaryView *view, Symbol *sym)
 
virtual void OnSymbolUpdated (BinaryView *view, Symbol *sym)
 
virtual void OnSymbolRemoved (BinaryView *view, Symbol *sym)
 
virtual void OnStringFound (BinaryView *data, BNStringType type, uint64_t offset, size_t len)
 
virtual void OnStringRemoved (BinaryView *data, BNStringType type, uint64_t offset, size_t len)
 
virtual void OnTypeDefined (BinaryView *data, const QualifiedName &name, Type *type)
 
virtual void OnTypeUndefined (BinaryView *data, const QualifiedName &name, Type *type)
 
virtual void OnTypeReferenceChanged (BinaryView *data, const QualifiedName &name, Type *type)
 
virtual void OnTypeFieldReferenceChanged (BinaryView *data, const QualifiedName &name, uint64_t offset)
 

Static Public Member Functions

static void registerActions ()
 
- Static Public Member Functions inherited from View
static ViewgetViewFromWidget (QWidget *widget)
 
static void registerActions ()
 
static void registerLateActions ()
 

Protected Member Functions

virtual void resizeEvent (QResizeEvent *event) override
 
virtual void paintEvent (QPaintEvent *event) override
 
virtual void wheelEvent (QWheelEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseDoubleClickEvent (QMouseEvent *event) override
 
- Protected Member Functions inherited from View
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 ()
 

Additional Inherited Members

- Protected Attributes inherited from View
Menu m_contextMenu
 
UIActionHandler m_actionHandler
 
bool m_binaryDataNavigable = false
 
QPointer< TransformParameterDialogm_transformParamDialog
 

Constructor & Destructor Documentation

◆ TokenizedTextView()

TokenizedTextView::TokenizedTextView ( QWidget *  parent,
BinaryViewRef  data,
const std::vector< BinaryNinja::LinearDisassemblyLine > &  lines = std::vector< BinaryNinja::LinearDisassemblyLine >() 
)
explicit

◆ ~TokenizedTextView()

virtual TokenizedTextView::~TokenizedTextView ( )
virtual

Member Function Documentation

◆ copy()

virtual void TokenizedTextView::copy ( TransformRef  xform = nullptr)
overridevirtual

Reimplemented from View.

◆ copyAddress()

virtual void TokenizedTextView::copyAddress ( )
overridevirtual

Reimplemented from View.

◆ cut()

virtual void TokenizedTextView::cut ( )
overridevirtual

Reimplemented from View.

◆ followPointer()

virtual void TokenizedTextView::followPointer ( )
virtual

◆ getCurrentArchitecture()

virtual ArchitectureRef TokenizedTextView::getCurrentArchitecture ( )
overridevirtual

Reimplemented from View.

◆ getCurrentBasicBlock()

virtual BasicBlockRef TokenizedTextView::getCurrentBasicBlock ( )
overridevirtual

Reimplemented from View.

◆ getCurrentFunction()

virtual FunctionRef TokenizedTextView::getCurrentFunction ( )
overridevirtual

Reimplemented from View.

◆ getCurrentOffset()

virtual uint64_t TokenizedTextView::getCurrentOffset ( )
overridevirtual

Implements View.

◆ getData()

virtual BinaryViewRef TokenizedTextView::getData ( )
inlineoverridevirtual

Implements View.

◆ getFont()

QFont TokenizedTextView::getFont ( )
inlineoverridevirtual

Implements View.

◆ getHighlightTokenState()

virtual HighlightTokenState TokenizedTextView::getHighlightTokenState ( )
inlineoverridevirtual

Reimplemented from View.

◆ getHistoryEntry()

virtual BinaryNinja::Ref< HistoryEntry > TokenizedTextView::getHistoryEntry ( )
overridevirtual

Reimplemented from View.

◆ getSelectionForXref()

virtual SelectionInfoForXref TokenizedTextView::getSelectionForXref ( )
overridevirtual

Reimplemented from View.

◆ getSelectionOffsets()

virtual BNAddressRange TokenizedTextView::getSelectionOffsets ( )
overridevirtual

Reimplemented from View.

◆ goToReference()

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

Reimplemented from View.

◆ mouseDoubleClickEvent()

virtual void TokenizedTextView::mouseDoubleClickEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ mousePressEvent()

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

◆ navigate()

virtual bool TokenizedTextView::navigate ( uint64_t  pos)
overridevirtual

Implements View.

◆ navigateToHistoryEntry()

virtual void TokenizedTextView::navigateToHistoryEntry ( BinaryNinja::Ref< HistoryEntry entry)
overridevirtual

Reimplemented from View.

◆ OnAnalysisFunctionAdded()

virtual void TokenizedTextView::OnAnalysisFunctionAdded ( BinaryNinja::BinaryView view,
BinaryNinja::Function func 
)
overridevirtual

◆ OnAnalysisFunctionRemoved()

virtual void TokenizedTextView::OnAnalysisFunctionRemoved ( BinaryNinja::BinaryView view,
BinaryNinja::Function func 
)
overridevirtual

◆ OnAnalysisFunctionUpdated()

virtual void TokenizedTextView::OnAnalysisFunctionUpdated ( BinaryNinja::BinaryView view,
BinaryNinja::Function func 
)
overridevirtual

◆ OnBinaryDataInserted()

virtual void TokenizedTextView::OnBinaryDataInserted ( BinaryNinja::BinaryView data,
uint64_t  offset,
size_t  len 
)
overridevirtual

◆ OnBinaryDataRemoved()

virtual void TokenizedTextView::OnBinaryDataRemoved ( BinaryNinja::BinaryView data,
uint64_t  offset,
uint64_t  len 
)
overridevirtual

◆ OnBinaryDataWritten()

virtual void TokenizedTextView::OnBinaryDataWritten ( BinaryNinja::BinaryView data,
uint64_t  offset,
size_t  len 
)
overridevirtual

◆ OnDataMetadataUpdated()

virtual void TokenizedTextView::OnDataMetadataUpdated ( BinaryNinja::BinaryView view,
uint64_t  offset 
)
overridevirtual

◆ OnDataVariableAdded()

virtual void TokenizedTextView::OnDataVariableAdded ( BinaryNinja::BinaryView view,
const BinaryNinja::DataVariable var 
)
overridevirtual

◆ OnDataVariableRemoved()

virtual void TokenizedTextView::OnDataVariableRemoved ( BinaryNinja::BinaryView view,
const BinaryNinja::DataVariable var 
)
overridevirtual

◆ OnDataVariableUpdated()

virtual void TokenizedTextView::OnDataVariableUpdated ( BinaryNinja::BinaryView view,
const BinaryNinja::DataVariable var 
)
overridevirtual

◆ OnTagUpdated()

virtual void TokenizedTextView::OnTagUpdated ( BinaryNinja::BinaryView data,
const BinaryNinja::TagReference tagRef 
)
overridevirtual

◆ paintEvent()

virtual void TokenizedTextView::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

◆ paste()

virtual void TokenizedTextView::paste ( TransformRef  xform = nullptr)
overridevirtual

Reimplemented from View.

◆ populateDefaultHistoryEntry()

void TokenizedTextView::populateDefaultHistoryEntry ( TokenizedTextViewHistoryEntry entry)

◆ registerActions()

static void TokenizedTextView::registerActions ( )
static

◆ resizeEvent()

virtual void TokenizedTextView::resizeEvent ( QResizeEvent *  event)
overrideprotectedvirtual

◆ setFunction()

void TokenizedTextView::setFunction ( FunctionRef  func)

◆ setLines()

void TokenizedTextView::setLines ( const std::vector< BinaryNinja::LinearDisassemblyLine > &  lines)

◆ setSelectionOffsets()

virtual void TokenizedTextView::setSelectionOffsets ( BNAddressRange  range)
overridevirtual

Implements View.

◆ setUpdatedLines()

void TokenizedTextView::setUpdatedLines ( const std::vector< BinaryNinja::LinearDisassemblyLine > &  lines)

◆ updateFonts()

virtual void TokenizedTextView::updateFonts ( )
overridevirtual

Reimplemented from View.

◆ updateLines()

virtual void TokenizedTextView::updateLines ( )
virtual

◆ wheelEvent()

virtual void TokenizedTextView::wheelEvent ( QWheelEvent *  event)
overrideprotectedvirtual

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