Interface IApplication
Interface for instances that provide backing functionality to static gateway class Application.
public interface IApplication
Properties
- CachedRunStateToplevel
Caches the Toplevel associated with the current RunState.
- ClearScreenNextIteration
Gets or sets whether the screen will be cleared, and all Views redrawn, during the next Application iteration.
- Driver
Gets or sets the console driver being used.
- Force16Colors
Gets or sets whether Driver will be forced to output only the 16 colors defined in ColorName16. The default is false, meaning 24-bit (TrueColor) colors will be output as long as the selected IConsoleDriver supports TrueColor.
- ForceDriver
Forces the use of the specified driver (one of "fake", "dotnet", "windows", or "unix"). If not specified, the driver is selected based on the platform.
- Initialized
Gets or sets whether the application has been initialized.
- Keyboard
Handles keyboard input and key bindings at the Application level.
- Mouse
Handles mouse event state and processing.
- Navigation
Gets or sets the navigation manager.
- Popover
Gets or sets the popover manager.
- Screen
Gets or sets the size of the screen. By default, this is the size of the screen as reported by the IConsoleDriver.
- Sixel
Collection of sixel images to write out to screen when updating. Only add to this collection if you are sure terminal supports sixel format.
- TimedEvents
Handles recurring events. These are invoked on the main UI thread - allowing for safe updates to View instances.
- Top
Gets the currently active Toplevel.
- TopLevels
Gets the stack of all Toplevels.
Methods
- AddTimeout(TimeSpan, Func<bool>)
Adds a timeout to the application.
- Init(IConsoleDriver?, string?)
Initializes a new instance of Terminal.Gui Application.
- Invoke(Action)
Runs
actionon the main UI loop thread
- LayoutAndDraw(bool)
Causes any Toplevels that need layout to be laid out. Then draws any Toplevels that need display. Only Views that need to be laid out (see NeedsLayout) will be laid out. Only Views that need to be drawn (see NeedsDraw) will be drawn.
- RemoveTimeout(object)
Removes a previously scheduled timeout
- RequestStop()
Requests that the application stop running.
- RequestStop(Toplevel?)
Stops the provided Toplevel, causing or the
topif provided.
- Run(Func<Exception, bool>?, IConsoleDriver?)
Runs the application by creating a Toplevel object and calling Run(Toplevel, Func<Exception, bool>?).
- Run(Toplevel, Func<Exception, bool>?)
Runs the Application using the provided Toplevel view.
- Run<T>(Func<Exception, bool>?, IConsoleDriver?)
Runs the application by creating a Toplevel-derived object of type
Tand calling Run(Toplevel, Func<Exception, bool>?).
- Shutdown()
Shutdown an application initialized with Init(IConsoleDriver?, string?).