From a46902ef8bbde08221ffd869054e206c0dfc2234 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 24 May 2021 22:37:09 -0400 Subject: Updated examples and docs --- python/examples/ui_notifications.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'python') diff --git a/python/examples/ui_notifications.py b/python/examples/ui_notifications.py index 2dad11a3..d0c414a1 100644 --- a/python/examples/ui_notifications.py +++ b/python/examples/ui_notifications.py @@ -77,6 +77,16 @@ class UINotification(UIContextNotification): else: print(f"py OnAddressChange {location.getOffset()}") + def GetNameForFile(self, context, file, name): + # This function only works in C++: Name is an out param (cpp: &name), and not modifiable by python. + print(f"py GetNameForFile {file.getFilename()} {name}") + return False + + def GetNameForPath(self, context, path, name): + # This function only works in C++: Name is an out param (cpp: &name), and not modifiable by python. + print(f"py GetNameForPath {path} {name}") + return False + # Register as a global so it doesn't get destructed notif = UINotification() -- cgit v1.3.1