ICommanderHost
ConsoleMonster.Apps.Commander
What the Commander's screen provides to its commands: dialogs, the viewer and editor, the terminal handoff and background operations. The phase 3 app implements it; tests use a recording fake. Every method is called on the app thread, and callbacks it receives must be invoked on the app thread too.
Usage
Explore 2 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 1
- Property CommanderContext.Host
Accepted by parameters 1
- Constructor CommanderContext.CommanderContext
Methods
public abstract void ChooseRoot(CommanderSide side) #Lets the user pick a drive or root for one panel (Alt+F1, Alt+F2).
Parameters
- side ConsoleMonster.Apps.Commander.CommanderSide
- The panel.
public abstract void Edit(PanelEntry file) #Edits a file (F4): the text editor, or $EDITOR through the terminal handoff.
Parameters
- file ConsoleMonster.Apps.Commander.PanelEntry
- The file.
public abstract void Open(PanelEntry file) #Opens a file from Enter: runs it from the command line, asking first for scripts.
Parameters
- file ConsoleMonster.Apps.Commander.PanelEntry
- The file.
public abstract void Prompt(string title, string text, Action<string> accepted) #Asks for one line of text, such as a folder name or a mark pattern.
Parameters
- title string
- The dialog title.
- text string
- The initial text.
- accepted System.Action<string>
- Called with the text when the user accepts; never called on cancel.
public abstract void Quit() #Saves state and leaves the app (F10).
public abstract void ShowHelp() #Shows the help screen (F1).
public abstract void ShowOutput() #Hides the panels and shows the last command output until a key is pressed (Ctrl+O).
public abstract void ShowPalette() #Shows the command palette (F9) listing CommanderCommands.
public abstract void Start(FileOperation operation) #Confirms and runs a planned operation in the background with progress and a final summary. For copies and moves the dialog may change the destination and options; deletes default to No, and a permanent delete says so in its title. Afterwards the host calls CommanderModel.AfterOperation.
Parameters
- operation ConsoleMonster.FileSystem.FileOperation
- The planned operation.
public abstract bool Supports(string commandKey) #Whether the host implements a host-backed command; unsupported commands show dimmed on the key bar.
Parameters
- commandKey string
- The command's CommanderCommand.Key.
Returns
bool True when supported.public abstract void View(PanelEntry file) #Shows a file in the pager (F3).
Parameters
- file ConsoleMonster.Apps.Commander.PanelEntry
- The file.