RenderLayer is a plugin class that allows you to customize the presentation of Linear and Graph view output, adding, changing, or removing lines before they are presented in the UI. More...
RenderLayer is a plugin class that allows you to customize the presentation of Linear and Graph view output, adding, changing, or removing lines before they are presented in the UI.
Public Member Functions | |
std::string | GetName () const |
Get the name of a Render Layer. | |
BNRenderLayerDefaultEnableState | GetDefaultEnableState () const |
Get whether the Render Layer is enabled by default. | |
virtual void | ApplyToDisassemblyBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines) |
Apply this Render Layer to a single Basic Block of Disassembly lines. | |
virtual void | ApplyToLowLevelILBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines) |
Apply this Render Layer to a single Basic Block of Low Level IL lines. | |
virtual void | ApplyToMediumLevelILBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines) |
Apply this Render Layer to a single Basic Block of Medium Level IL lines. | |
virtual void | ApplyToHighLevelILBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines) |
Apply this Render Layer to a single Basic Block of High Level IL lines. | |
virtual void | ApplyToHighLevelILBody (Ref< Function > function, std::vector< LinearDisassemblyLine > &lines) |
Apply this Render Layer to the entire body of a High Level IL function. | |
virtual void | ApplyToMiscLinearLines (Ref< LinearViewObject > obj, Ref< LinearViewObject > prev, Ref< LinearViewObject > next, std::vector< LinearDisassemblyLine > &lines) |
Apply to lines generated by Linear View that are not part of a function. | |
virtual void | ApplyToBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines) |
Apply to lines generated by a Basic Block, of any type. | |
virtual void | ApplyToFlowGraph (Ref< FlowGraph > graph) |
Apply this Render Layer to a Flow Graph, potentially modifying its nodes, their edges, their lines, and their lines' content. | |
virtual void | ApplyToLinearViewObject (Ref< LinearViewObject > obj, Ref< LinearViewObject > prev, Ref< LinearViewObject > next, std::vector< LinearDisassemblyLine > &lines) |
Apply this Render Layer to the lines produced by a LinearViewObject for rendering in Linear View, potentially modifying the lines and their contents. | |
![]() | |
StaticCoreRefCountObject () | |
virtual | ~StaticCoreRefCountObject () |
BNRenderLayer * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Static Public Member Functions | |
static void | Register (RenderLayer *layer, BNRenderLayerDefaultEnableState enableState=DisabledByDefaultRenderLayerDefaultEnableState) |
Register a custom Render Layer. | |
static std::vector< Ref< RenderLayer > > | GetList () |
Get the list of all currently registered Render Layers. | |
static Ref< RenderLayer > | GetByName (const std::string &name) |
Look up a Render Layer by its name. | |
![]() | |
static BNRenderLayer * | GetObject (StaticCoreRefCountObject *obj) |
Protected Member Functions | |
RenderLayer (const std::string &name) | |
RenderLayer (BNRenderLayer *layer) | |
virtual | ~RenderLayer ()=default |
Static Protected Member Functions | |
static void | ApplyToFlowGraphCallback (void *ctxt, BNFlowGraph *graph) |
static void | ApplyToLinearViewObjectCallback (void *ctxt, BNLinearViewObject *obj, BNLinearViewObject *prev, BNLinearViewObject *next, BNLinearDisassemblyLine *inLines, size_t inLineCount, BNLinearDisassemblyLine **outLines, size_t *outLineCount) |
static void | FreeLinesCallback (void *ctxt, BNLinearDisassemblyLine *lines, size_t count) |
Additional Inherited Members | |
![]() | |
std::atomic< int > | m_refs |
BNRenderLayer * | m_object |
|
explicitprotected |
|
protected |
|
protectedvirtualdefault |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
static |
Register a custom Render Layer.
Specify enableState to change whether the layer is enabled by default in the UI. If it is set to AlwaysEnabled, the Render Layer will always be enabled and will not be displayed in the UI.
layer | Render Layer to register |
enableState | Whether the layer should be enabled by default |
|
static |
Get the list of all currently registered Render Layers.
|
static |
Look up a Render Layer by its name.
name | Name of Render Layer |
std::string RenderLayer::GetName | ( | ) | const |
Get the name of a Render Layer.
BNRenderLayerDefaultEnableState RenderLayer::GetDefaultEnableState | ( | ) | const |
Get whether the Render Layer is enabled by default.
|
inlinevirtual |
Apply this Render Layer to a single Basic Block of Disassembly lines.
Subclasses should modify the input `lines` list to make modifications to the presentation of the block.
block | Basic Block containing those lines |
lines | Lines of text for the block, to be modified by this function |
|
inlinevirtual |
Apply this Render Layer to a single Basic Block of Low Level IL lines.
Subclasses should modify the input `lines` list to make modifications to the presentation of the block.
block | Basic Block containing those lines |
lines | Lines of text for the block, to be modified by this function |
|
inlinevirtual |
Apply this Render Layer to a single Basic Block of Medium Level IL lines.
Subclasses should modify the input `lines` list to make modifications to the presentation of the block.
block | Basic Block containing those lines |
lines | Lines of text for the block, to be modified by this function |
|
inlinevirtual |
Apply this Render Layer to a single Basic Block of High Level IL lines.
Subclasses should modify the input `lines` list to make modifications to the presentation of the block.
block | Basic Block containing those lines |
lines | Lines of text for the block, to be modified by this function |
|
inlinevirtual |
Apply this Render Layer to the entire body of a High Level IL function.
Subclasses should modify the input `lines` list to make modifications to the presentation of the function.
function | Function containing those lines |
lines | Lines of text for the function, to be modified by this function |
|
inlinevirtual |
|
virtual |
Apply to lines generated by a Basic Block, of any type.
If not overridden, this function will call the appropriate ApplyToXLevelILBlock function.
block | Basic Block containing those lines |
lines | Lines of text for the block, to be modified by this function |
Apply this Render Layer to a Flow Graph, potentially modifying its nodes, their edges, their lines, and their lines' content.
graph | Graph to modify |
Reimplemented in BinaryNinja::CoreRenderLayer.
|
virtual |
Apply this Render Layer to the lines produced by a LinearViewObject for rendering in Linear View, potentially modifying the lines and their contents.
obj | Linear View Object being rendered |
prev | Linear View Object located directly above this one |
next | Linear View Object located directly below this one |
lines | Lines originally rendered by the Linear View Object |
Reimplemented in BinaryNinja::CoreRenderLayer.