cellmap_flow.viewer.keys

Keys bound in a neuroglancer viewer, and the status-bar messages they leave: each feature’s under a status key of its own, so that they do not overwrite one another.

Attributes

logger

Functions

bind_key(viewer, action, key, handler)

Bind key ("shift+keyg") in viewer to action, run by handler, once per viewer.

say(viewer, status_key, message)

Show message in the status bar under status_key (None clears it); never raises.

later(seconds, function, *args)

Run function(*args) in seconds, on a daemon timer. Tests replace this.

say_for(viewer, status_key, message, seconds)

say message for seconds.

Module Contents

cellmap_flow.viewer.keys.logger
cellmap_flow.viewer.keys.bind_key(viewer, action, key, handler)

Bind key (“shift+keyg”) in viewer to action, run by handler, once per viewer.

Two requests racing both bind it, which is harmless: neuroglancer keeps a set of handlers per action.

cellmap_flow.viewer.keys.say(viewer, status_key, message)

Show message in the status bar under status_key (None clears it); never raises.

cellmap_flow.viewer.keys.later(seconds, function, *args)

Run function(*args) in seconds, on a daemon timer. Tests replace this.

cellmap_flow.viewer.keys.say_for(viewer, status_key, message, seconds)

say message for seconds.