HexEditor Class Reference

Public Slots

void disassembly ()
 
void createFunc ()
 
void createFuncWithPlatform (PlatformRef platform, bool autoSelect=false)
 

Public Member Functions

 HexEditor (BinaryViewRef data, ViewFrame *view, uint64_t startAddr=0)
 
virtual ~HexEditor ()
 
virtual bool canAssemble () override
 
virtual bool canCompile () override
 
virtual BinaryViewRef getData () override
 
virtual uint64_t getCurrentOffset () override
 
virtual BNAddressRange getSelectionOffsets () override
 
virtual bool navigate (uint64_t pos) 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 writeData (const BinaryNinja::DataBuffer &data, uint64_t addr) override
 
virtual void selectAll ()
 
virtual void selectNone ()
 
void setSelectionRange (uint64_t begin, uint64_t end)
 
virtual void setSelectionOffsets (BNAddressRange range) override
 
virtual void updateFonts () override
 
virtual StatusBarWidgetgetStatusBarWidget () override
 
virtual QWidget * getHeaderOptionsWidget () override
 
virtual void followPointer ()
 
void setHighlightMode (HexEditorHighlightMode mode)
 
void setColorMode (HexEditorColorMode mode)
 
void setContrast (HexEditorHighlightContrast mode)
 
virtual void sendWheelEvent (QWheelEvent *event) override
 
QFont getFont () override
 
- 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 PreviewScrollHandler
virtual ~PreviewScrollHandler ()
 
virtual void sendWheelEvent (QWheelEvent *event)=0
 
- 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 focusInEvent (QFocusEvent *event) override
 
virtual void focusOutEvent (QFocusEvent *event) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 
virtual void keyReleaseEvent (QKeyEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual bool event (QEvent *event) override
 
virtual void wheelEvent (QWheelEvent *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

◆ HexEditor()

HexEditor::HexEditor ( BinaryViewRef  data,
ViewFrame view,
uint64_t  startAddr = 0 
)
explicit

◆ ~HexEditor()

virtual HexEditor::~HexEditor ( )
virtual

Member Function Documentation

◆ canAssemble()

virtual bool HexEditor::canAssemble ( )
inlineoverridevirtual

Reimplemented from View.

◆ canCompile()

virtual bool HexEditor::canCompile ( )
inlineoverridevirtual

Reimplemented from View.

◆ createFunc

void HexEditor::createFunc ( )
slot

◆ createFuncWithPlatform

void HexEditor::createFuncWithPlatform ( PlatformRef  platform,
bool  autoSelect = false 
)
slot

◆ disassembly

void HexEditor::disassembly ( )
slot

◆ event()

virtual bool HexEditor::event ( QEvent *  event)
overrideprotectedvirtual

◆ focusInEvent()

virtual void HexEditor::focusInEvent ( QFocusEvent *  event)
overrideprotectedvirtual

◆ focusOutEvent()

virtual void HexEditor::focusOutEvent ( QFocusEvent *  event)
overrideprotectedvirtual

◆ followPointer()

virtual void HexEditor::followPointer ( )
virtual

◆ getCurrentOffset()

virtual uint64_t HexEditor::getCurrentOffset ( )
overridevirtual

Implements View.

◆ getData()

virtual BinaryViewRef HexEditor::getData ( )
inlineoverridevirtual

Implements View.

◆ getFont()

QFont HexEditor::getFont ( )
inlineoverridevirtual

Implements View.

◆ getHeaderOptionsWidget()

virtual QWidget * HexEditor::getHeaderOptionsWidget ( )
overridevirtual

Reimplemented from View.

◆ getSelectionOffsets()

virtual BNAddressRange HexEditor::getSelectionOffsets ( )
overridevirtual

Reimplemented from View.

◆ getStatusBarWidget()

virtual StatusBarWidget * HexEditor::getStatusBarWidget ( )
overridevirtual

Reimplemented from View.

◆ keyPressEvent()

virtual void HexEditor::keyPressEvent ( QKeyEvent *  event)
overrideprotectedvirtual

◆ keyReleaseEvent()

virtual void HexEditor::keyReleaseEvent ( QKeyEvent *  event)
overrideprotectedvirtual

◆ mouseMoveEvent()

virtual void HexEditor::mouseMoveEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ mousePressEvent()

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

◆ navigate()

virtual bool HexEditor::navigate ( uint64_t  pos)
overridevirtual

Implements View.

◆ OnBinaryDataInserted()

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

◆ OnBinaryDataRemoved()

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

◆ OnBinaryDataWritten()

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

◆ paintEvent()

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

◆ registerActions()

static void HexEditor::registerActions ( )
static

◆ resizeEvent()

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

◆ selectAll()

virtual void HexEditor::selectAll ( )
virtual

◆ selectNone()

virtual void HexEditor::selectNone ( )
virtual

◆ sendWheelEvent()

virtual void HexEditor::sendWheelEvent ( QWheelEvent *  event)
overridevirtual

Implements PreviewScrollHandler.

◆ setColorMode()

void HexEditor::setColorMode ( HexEditorColorMode  mode)

◆ setContrast()

void HexEditor::setContrast ( HexEditorHighlightContrast  mode)

◆ setHighlightMode()

void HexEditor::setHighlightMode ( HexEditorHighlightMode  mode)

◆ setSelectionOffsets()

virtual void HexEditor::setSelectionOffsets ( BNAddressRange  range)
overridevirtual

Implements View.

◆ setSelectionRange()

void HexEditor::setSelectionRange ( uint64_t  begin,
uint64_t  end 
)

◆ updateFonts()

virtual void HexEditor::updateFonts ( )
overridevirtual

Reimplemented from View.

◆ wheelEvent()

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

◆ writeData()

virtual void HexEditor::writeData ( const BinaryNinja::DataBuffer data,
uint64_t  addr 
)
overridevirtual

Reimplemented from View.


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