RenderContext Class Reference

Public Member Functions

 RenderContext (QWidget *parent, float fontScale=1.0f)
 
void update ()
 
FontParametersgetFontParamters ()
 
int getFontWidth () const
 
int getFontHeight () const
 
void init (QPainter &p)
 
QColor getColorForHexDumpByte (const HexEditorHighlightState &state, BNModificationStatus modification, uint8_t byte)
 
QColor getHighlightColor (BNHighlightColor color)
 
HighlightTokenState getTokenForDisassemblyLinePosition (int64_t col, const std::vector< BinaryNinja::InstructionTextToken > &tokens)
 
HighlightTokenState getTokenForDisassemblyTokenIndex (size_t tokenIndex, const std::vector< BinaryNinja::InstructionTextToken > &tokens)
 
HighlightTokenState getHighlightTokenForTextToken (const BinaryNinja::InstructionTextToken &token)
 
void drawText (QPainter &p, int x, int y, QColor color, const QString &text)
 
void drawUnderlinedText (QPainter &p, int x, int y, QColor color, const QString &text)
 
void drawSeparatorLine (QPainter &p, QColor top, QColor bottom, QColor line, const QRect &rect)
 
void drawInstructionHighlight (QPainter &p, const QRect &rect)
 
void drawLinearDisassemblyLineBackground (QPainter &p, BNLinearDisassemblyLineType type, const QRect &rect, int gutterWidth)
 
void drawDisassemblyLine (QPainter &p, int left, int top, const std::vector< BinaryNinja::InstructionTextToken > &tokens, HighlightTokenState &highlight, bool highlightOnly=false)
 
void drawHexEditorLine (QPainter &p, int left, int top, const HexEditorHighlightState &highlight, BinaryViewRef view, uint64_t lineStartAddr, size_t cols, size_t firstCol, size_t count, bool cursorVisible, bool cursorAscii, size_t cursorPos, bool byteCursor)
 
QFont getFont ()
 
QFont getEmojiFont ()
 
void setFont (const QFont &font)
 

Constructor & Destructor Documentation

◆ RenderContext()

RenderContext::RenderContext ( QWidget *  parent,
float  fontScale = 1.0f 
)

Member Function Documentation

◆ drawDisassemblyLine()

void RenderContext::drawDisassemblyLine ( QPainter &  p,
int  left,
int  top,
const std::vector< BinaryNinja::InstructionTextToken > &  tokens,
HighlightTokenState highlight,
bool  highlightOnly = false 
)

◆ drawHexEditorLine()

void RenderContext::drawHexEditorLine ( QPainter &  p,
int  left,
int  top,
const HexEditorHighlightState highlight,
BinaryViewRef  view,
uint64_t  lineStartAddr,
size_t  cols,
size_t  firstCol,
size_t  count,
bool  cursorVisible,
bool  cursorAscii,
size_t  cursorPos,
bool  byteCursor 
)

◆ drawInstructionHighlight()

void RenderContext::drawInstructionHighlight ( QPainter &  p,
const QRect &  rect 
)

◆ drawLinearDisassemblyLineBackground()

void RenderContext::drawLinearDisassemblyLineBackground ( QPainter &  p,
BNLinearDisassemblyLineType  type,
const QRect &  rect,
int  gutterWidth 
)

◆ drawSeparatorLine()

void RenderContext::drawSeparatorLine ( QPainter &  p,
QColor  top,
QColor  bottom,
QColor  line,
const QRect &  rect 
)

◆ drawText()

void RenderContext::drawText ( QPainter &  p,
int  x,
int  y,
QColor  color,
const QString &  text 
)

◆ drawUnderlinedText()

void RenderContext::drawUnderlinedText ( QPainter &  p,
int  x,
int  y,
QColor  color,
const QString &  text 
)

◆ getColorForHexDumpByte()

QColor RenderContext::getColorForHexDumpByte ( const HexEditorHighlightState state,
BNModificationStatus  modification,
uint8_t  byte 
)

◆ getEmojiFont()

QFont RenderContext::getEmojiFont ( )
inline

◆ getFont()

QFont RenderContext::getFont ( )
inline

◆ getFontHeight()

int RenderContext::getFontHeight ( ) const
inline

◆ getFontParamters()

FontParameters & RenderContext::getFontParamters ( )
inline

◆ getFontWidth()

int RenderContext::getFontWidth ( ) const
inline

◆ getHighlightColor()

QColor RenderContext::getHighlightColor ( BNHighlightColor  color)

◆ getHighlightTokenForTextToken()

HighlightTokenState RenderContext::getHighlightTokenForTextToken ( const BinaryNinja::InstructionTextToken token)

◆ getTokenForDisassemblyLinePosition()

HighlightTokenState RenderContext::getTokenForDisassemblyLinePosition ( int64_t  col,
const std::vector< BinaryNinja::InstructionTextToken > &  tokens 
)

◆ getTokenForDisassemblyTokenIndex()

HighlightTokenState RenderContext::getTokenForDisassemblyTokenIndex ( size_t  tokenIndex,
const std::vector< BinaryNinja::InstructionTextToken > &  tokens 
)

◆ init()

void RenderContext::init ( QPainter &  p)

◆ setFont()

void RenderContext::setFont ( const QFont &  font)

◆ update()

void RenderContext::update ( )

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