Interface IRunnable
Non-generic base interface for runnable views. Provides common members without type parameter.
public interface IRunnable
Remarks
This interface enables storing heterogeneous runnables in collections (e.g., RunnableSessionStack) while preserving type safety at usage sites via IRunnable<TResult>.
Most code should use IRunnable<TResult> directly. This base interface is primarily for framework infrastructure (session management, stacking, etc.).
A runnable view executes as a self-contained blocking session with its own lifecycle, event loop iteration, and focus management./> blocks until RequestStop() is called.
This interface follows the Terminal.Gui Cancellable Work Pattern (CWP) for all lifecycle events.
Properties
- IsModal
Gets whether this runnable session is at the top of the RunnableSessionStack and thus exclusively receiving mouse and keyboard input.
- IsRunning
Gets whether this runnable session is currently running (i.e., on the RunnableSessionStack).
Methods
- RaiseIsModalChangedEvent(bool)
Called by the framework to raise the IsModalChanged event.
- RaiseIsModalChanging(bool, bool)
Called by the framework to raise the IsModalChanging event.
- RaiseIsRunningChangedEvent(bool)
Called by the framework to raise the IsRunningChanged event.
- RaiseIsRunningChanging(bool, bool)
Called by the framework to raise the IsRunningChanging event.
Events
- IsModalChanged
Raised after this runnable has become modal (top of stack) or ceased being modal.
- IsModalChanging
Raised when this runnable is about to become modal (top of stack) or cease being modal. Can be canceled by setting CancelEventArgs<T>.Cancel to true.
- IsRunningChanged
Raised after IsRunning has changed (after the runnable has been added to or removed from the RunnableSessionStack).
- IsRunningChanging
Raised when IsRunning is changing (e.g., when Begin(IRunnable) or End(RunnableSessionToken) is called). Can be canceled by setting CancelEventArgs<T>.Cancel to true.