docfx/includes/events-lexicon.md
| Term | Meaning |
|---|---|
| Action | A 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/Bridging | Routing a command across a non-containment boundary (e.g., MenuBarItem ↔ PopoverMenu). CommandBridge subscribes to a remote view's completion events and re-raises them on the owner with CommandRouting.Bridged. See Command Deep Dive. |
| Bubble/Bubbling | Propagating 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/Cancelled | Applies to scenarios where something can be cancelled. Changing the Orientation of a Slider is cancelable. |
| Cancellation | Mechanisms 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. |
| Command | A pattern that encapsulates a request as an object, allowing for parameterization and queuing of requests. See Command Deep Dive. |
| Context | Data 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 Behavior | A 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/Dispatching | Sending 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. |
| Event | A notification mechanism that allows objects to communicate when something of interest occurs. Terminal.Gui uses events extensively for UI interactions. |
| Handle/Handling/Handled | Applies 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. |
| Invoke | The act of calling or triggering an event, action, or method. |
| Listen | The act of subscribing to or registering for an event to receive notifications when it occurs. |
| Notifications | Events (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. |
| Raise | The act of triggering an event, notifying all registered event handlers that the event has occurred. |
| Routing | The 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. |
| Workflow | A 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). |