diff options
| author | Xusheng <xusheng@vector35.com> | 2024-09-25 11:09:26 -0400 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2024-09-25 11:09:26 -0400 |
| commit | 58936354f9adc194293e1b899bcd428ccb7a537b (patch) | |
| tree | b98aaeb270190e35163d7388870a451b071ec004 /python | |
| parent | c8f7d51460e5c9c19d40985c764d7dad6ff4ac72 (diff) | |
Add Python exampels for UIContextNotification::OnContextMenuCreated
Diffstat (limited to 'python')
| -rw-r--r-- | python/examples/ui_notifications.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/examples/ui_notifications.py b/python/examples/ui_notifications.py index c6809a32..a6739886 100644 --- a/python/examples/ui_notifications.py +++ b/python/examples/ui_notifications.py @@ -94,6 +94,10 @@ class UINotification(UIContextNotification): print(f"py GetNameForPath {path} {name}") return False + def OnContextMenuCreated(self, context, view, menu): + # This function only works in C++: Name is an out param (cpp: &name), and not modifiable by python. + print(f"py OnContextMenuCreated {context} {view} {menu}") + # Register as a global so it doesn't get destructed notif = UINotification() |
