summaryrefslogtreecommitdiff
path: root/python/examples/helloglobalarea.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2024-02-12 14:54:00 -0500
committerRusty Wagner <rusty.wagner@gmail.com>2024-02-12 14:54:00 -0500
commit7d7e0fcd27812a42286ba736ed6d5217d87080a5 (patch)
tree78518d3176635f3bab7fea433d6ca7cba3a46eb6 /python/examples/helloglobalarea.py
parent233e4395b5f6d56bb0c7a8da22f6c88480b260c2 (diff)
Add new sidebar APIs to the sidebar example
Diffstat (limited to 'python/examples/helloglobalarea.py')
-rw-r--r--python/examples/helloglobalarea.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/examples/helloglobalarea.py b/python/examples/helloglobalarea.py
index ca288525..1b7332fc 100644
--- a/python/examples/helloglobalarea.py
+++ b/python/examples/helloglobalarea.py
@@ -30,6 +30,12 @@ from PySide6.QtGui import QImage, QPixmap, QPainter, QFont, QColor
instance_id = 0
+# In Binary Ninja 4.0, global area widgets have been moved to the more flexible sidebar system.
+# Plugins should use SidebarWidget instead of GlobalAreaWidget. To provide the same functionality,
+# return `SidebarWidgetLocation.LeftBottom` from `SidebarWidgetType.defaultLocation` and return
+# `SidebarWidgetContextSensitivity.GlobalSidebarContext` from `SidebarWidgetType.contextSensitivity`.
+# See `hellosidebar.py` for an example of how to create a `SidebarWidget`.
+
# Global area widgets must derive from GlobalAreaWidget, not QWidget. GlobalAreaWidget is a QWidget but
# provides callbacks for global area events, and must be created with a title.
class HelloGlobalAreaWidget(GlobalAreaWidget):