AppScreen
ConsoleMonster.Interactive
One screen of an AppScreens stack: its content (which may hold inputs), the title its breadcrumb shows and the key bindings that apply while it is the current screen.
Inheritance
- object
- AppScreen
Usage
Explore 25 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 11
- Extension method AppScreen.AddBinding
- Extension method AppScreen.AddBindings
- Extension method AppScreen.Configure
- Extension method AppScreen.Title
- Property AppScreens.Current
- Property AppScreens.Path
- Property AppScreens.Screens
- Method InteractiveFluent.AddBinding
- Method InteractiveFluent.AddBindings
- Method InteractiveFluent.Configure
- Method InteractiveFluent.Title
Accepted by parameters 14
- Extension method AppScreen.AddBinding
- Extension method AppScreen.AddBindings
- Extension method AppScreen.Configure
- Extension method AppScreen.Configure
- Extension method AppScreen.Title
- Constructor AppScreens.AppScreens
- Extension method AppScreens.Current
- Method AppScreens.Add
- Method InteractiveFluent.AddBinding
- Method InteractiveFluent.AddBindings
- Method InteractiveFluent.Configure
- Method InteractiveFluent.Configure
- Method InteractiveFluent.Current
- Method InteractiveFluent.Title
Constructors
public AppScreen(string key, string title, IWidget content) #Creates a screen.
Parameters
- key string
- The key that opens it, unique within the app.
- title string
- The breadcrumb title.
- content ConsoleMonster.Layout.IWidget
- The content, built once; inputs inside it keep their values while other screens show.
Inherited Methods
Properties
public Func<AppState, string>? TitleSource { get; set; } #Builds the title from state instead, for a screen that shows one item ("web-deploy"). Runs on the app thread.
public IList<KeyBinding> Bindings { get; } #Keys that apply while this is the current screen. They reach the screen after the focused input and feed the footer.
Extension Methods
public static AppScreen AddBinding(AppScreen appScreen, KeyBinding item) #Adds an item to AppScreen.Bindings: Keys that apply while this is the current screen. They reach the screen after the focused input and feed the footer.
Parameters
- appScreen ConsoleMonster.Interactive.AppScreen
- The instance.
- item ConsoleMonster.Interactive.KeyBinding
- The item.
public static AppScreen AddBindings(AppScreen appScreen, params KeyBinding[] items) #Adds items to AppScreen.Bindings: Keys that apply while this is the current screen. They reach the screen after the focused input and feed the footer.
Parameters
- appScreen ConsoleMonster.Interactive.AppScreen
- The instance.
- items ConsoleMonster.Interactive.KeyBinding[]
- The items, in order.
public static AppScreen AddBindings(AppScreen appScreen, IEnumerable<KeyBinding> items) #Adds items to AppScreen.Bindings: Keys that apply while this is the current screen. They reach the screen after the focused input and feed the footer.
Parameters
- appScreen ConsoleMonster.Interactive.AppScreen
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.KeyBinding>
- The items, in order.
public static AppScreen Configure(AppScreen appScreen, Action<AppScreen> configure) #Assigns callbacks and related configuration without invoking delegate-valued properties.
Parameters
- appScreen ConsoleMonster.Interactive.AppScreen
- The instance.
- configure System.Action<ConsoleMonster.Interactive.AppScreen>
- Assignments applied in order.
Examples
// C# initializer or property // C# fluent
appScreen.TitleSource = value; appScreen.Configure(configured => configured.TitleSource = value);public static AppScreen Title(AppScreen appScreen, string value) #Sets AppScreen.Title: The breadcrumb title.
Parameters
- appScreen ConsoleMonster.Interactive.AppScreen
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
appScreen.Title = value; appScreen.Title(value);