Namespace Terminal.Gui.App
The App
namespace holds @Terminal.Gui.Application and associated classes.
@Terminal.Gui.Application provides the main entry point and core application logic for Terminal.Gui applications. This static singleton class is responsible for initializing and shutting down the Terminal.Gui environment, managing the main event loop, handling input and output, and providing access to global application state.
Typical usage involves calling Application.Init()
to initialize the application, creating and running a Window
, and then calling Application.Shutdown()
to clean up resources. The class also provides methods for culture support, idle handlers, and rendering the application state as a string.
Example Usage
Application.Init();
var win = new Window()
{
Title = $"Example App ({Application.QuitKey} to quit)"
};
Application.Run(win);
win.Dispose();
Application.Shutdown();
See Also
Classes
- Application
A static, singleton class representing the application. This class is the entry point for the application.
- ApplicationImpl
Original Terminal.Gui implementation of core Application methods.
- ApplicationNavigation
Helper class for Application navigation. Held by Navigation
- ApplicationPopover
Helper class for support of IPopover views for Application. Held by Popover
- CWPEventHelper
Provides helper methods for executing event-driven workflows in the Cancellable Work Pattern (CWP).
- CWPPropertyHelper
Provides helper methods for executing property change workflows in the Cancellable Work Pattern (CWP).
- CWPWorkflowHelper
Provides helper methods for executing single-phase and result-producing workflows in the Cancellable Work Pattern (CWP).
- CancelEventArgs<T>
Provides data for events that can be cancelled without a changeable result in a cancellable workflow in the Cancellable Work Pattern (CWP).
- Clipboard
Provides cut, copy, and paste support for the OS clipboard.
- ClipboardBase
Shared abstract class to enforce rules from the implementation of the IClipboard interface.
- EventArgs<T>
Provides data for events that convey the current value of a property or other value in a cancellable workflow (CWP).
- GlobalResources
Provide static access to the ResourceManagerWrapper
- IterationEventArgs
Event arguments for the Iteration event.
- Logging
Singleton logging instance class. Do not use console loggers with this class as it will interfere with Terminal.Gui screen output (i.e. use a file logger).
- MainLoop
The MainLoop monitors timers and idle handlers.
- PopoverBaseImpl
Abstract base class for popover views in Terminal.Gui.
- ResultEventArgs<T>
Provides data for events that produce a result in a cancellable workflow in the Cancellable Work Pattern (CWP).
- RunStateEventArgs
Event arguments for events about RunState
- TimedEvents
Handles timeouts and idles
- Timeout
Provides data for timers running manipulation.
- TimeoutEventArgs
EventArgs for timeout events (e.g. TimeoutAdded)
- ValueChangedEventArgs<T>
Provides data for events that notify of a completed property change in the Cancellable Work Pattern (CWP).
- ValueChangingEventArgs<T>
Provides data for events that allow modification or cancellation of a property change in the Cancellable Work Pattern (CWP).
Interfaces
- IApplication
Interface for instances that provide backing functionality to static gateway class Application.
- IClipboard
Definition to interact with the OS clipboard.
- IPopover
Defines the contract for a popover view in Terminal.Gui.
- ITimedEvents
Manages timers and idles