-
class neuroglancer.trackable_state.TrackableState[State](
ChangeNotifier
) State object that supports registering change notification callbacks.
Public members¶
- TrackableState(wrapper_type: type[State], ...)
Initialize self. See help(type(self)) for accurate signature.
-
txn(
overwrite: bool =False, lock: bool =True) -> Iterator[State] Context manager for a state modification transaction.
- add_changed_callback(callback: Callable[[], None])
Registers a callback to be invoked when the state changes.
- remove_changed_callback(callback: Callable[[], None])
Removes a previously-registered callback.
- change_count: int
Total number of changes that have occurred.