Back to Terminal Gui

Events Lexicon

docfx/includes/events-lexicon.md

2.0.13.8 KB
Original Source
TermMeaning
ActionA delegate type that represents a method that can be called with specific parameters but returns no value. Used for simple callbacks in Terminal.Gui.
Bridge/BridgingRouting a command across a non-containment boundary (e.g., MenuBarItemPopoverMenu). CommandBridge subscribes to a remote view's completion events and re-raises them on the owner with CommandRouting.Bridged. See Command Deep Dive.
Bubble/BubblingPropagating a command upward from a SubView to its SuperView. Opt-in via CommandsToBubbleUp. The upward direction is always "bubble" — never "dispatch." See Command Deep Dive.
Cancel/Cancelling/CancelledApplies to scenarios where something can be cancelled. Changing the Orientation of a Slider is cancelable.
CancellationMechanisms to halt a phase or workflow in the Cancellable Work Pattern, such as setting Cancel/Handled properties in event arguments or returning bool from virtual methods.
CommandA pattern that encapsulates a request as an object, allowing for parameterization and queuing of requests. See Command Deep Dive.
ContextData passed to observers for informed decision-making in the Cancellable Work Pattern, such as DrawContext (drawing), Key (keyboard), ICommandContext (commands), or CancelEventArgs<Orientation> (orientation).
Default BehaviorA standard implementation for each phase in the Cancellable Work Pattern, such as DrawText (drawing), InvokeCommands (keyboard and application-level), RaiseActivating (commands), or updating a property (OrientationHelper).
Dispatch/DispatchingSending a command downward from a SuperView to a specific SubView. The downward direction is always "dispatch" — never "bubble." DispatchDown sends with bubbling suppressed; TryDispatchToTarget uses GetDispatchTarget and ConsumeDispatch to automate dispatch for composite views. See Command Deep Dive.
EventA notification mechanism that allows objects to communicate when something of interest occurs. Terminal.Gui uses events extensively for UI interactions.
Handle/Handling/HandledApplies to scenarios where an event can either be handled by an event listener (or override) vs not handled. Events that originate from a user action like mouse moves and key presses are examples.
InvokeThe act of calling or triggering an event, action, or method.
ListenThe act of subscribing to or registering for an event to receive notifications when it occurs.
NotificationsEvents (e.g., DrawingText, KeyDown, Activating, OrientationChanging) and virtual methods (e.g., OnDrawingText, OnKeyDown, OnActivating, OnOrientationChanging) raised at each phase to notify observers in the Cancellable Work Pattern.
RaiseThe act of triggering an event, notifying all registered event handlers that the event has occurred.
RoutingThe CommandRouting enum describes how a command is being routed: Direct (local invocation), BubblingUp (upward to SuperView), DispatchingDown (downward to SubView), or Bridged (across non-containment boundary). Carried on ICommandContext.Routing. See Command Deep Dive.
WorkflowA sequence of phases in the Cancellable Work Pattern, which may be multi-phase (e.g., rendering in View.Draw), linear (e.g., key processing in View.Keyboard), per-unit (e.g., command execution in View.Command), or event-driven (e.g., key handling in Application.Keyboard, property changes in OrientationHelper).