MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / __init__

Method __init__

python/examples/helloglobalarea.py:42–70  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

40# provides callbacks for global area events, and must be created with a title.
41class HelloGlobalAreaWidget(GlobalAreaWidget):
42 def __init__(self, name):
43 global instance_id
44 GlobalAreaWidget.__init__(self, name)
45 self.actionHandler = UIActionHandler()
46 self.actionHandler.setupActionHandler(self)
47 offset_layout = QHBoxLayout()
48 offset_layout.addWidget(QLabel("Offset: "))
49 self.offset = QLabel(hex(0))
50 offset_layout.addWidget(self.offset)
51 offset_layout.setAlignment(QtCore.Qt.AlignCenter)
52 datatype_layout = QHBoxLayout()
53 datatype_layout.addWidget(QLabel("Data Type: "))
54 self.datatype = QLabel("")
55 datatype_layout.addWidget(self.datatype)
56 datatype_layout.setAlignment(QtCore.Qt.AlignCenter)
57 layout = QVBoxLayout()
58 title = QLabel(name, self)
59 title.setAlignment(QtCore.Qt.AlignCenter)
60 instance = QLabel("Instance: " + str(instance_id), self)
61 instance.setAlignment(QtCore.Qt.AlignCenter)
62 layout.addStretch()
63 layout.addWidget(title)
64 layout.addWidget(instance)
65 layout.addLayout(datatype_layout)
66 layout.addLayout(offset_layout)
67 layout.addStretch()
68 self.setLayout(layout)
69 instance_id += 1
70 self.data = None
71
72 def notifyOffsetChanged(self, offset):
73 self.offset.setText(hex(offset))

Callers

nothing calls this directly

Calls 1

UIActionHandlerClass · 0.50

Tested by

no test coverage detected