// These classes use a keybinding system based on the design implemented in Scintilla.Net which is an
// MIT licensed open source project https://github.com/jacobslusser/ScintillaNET/blob/master/src/ScintillaNET/Command.cs
namespace Terminal.Gui;
/// Actions which can be performed by the application or bound to keys in a control.
public enum Command
{
#region Default View Commands
/// Invoked when the HotKey for the View has been pressed.
HotKey,
/// Accepts the current state (e.g. list selection, button press, toggle, etc.).
Accept,
/// Selects an item (e.g. a list item or menu item) without necessarily accepting it.
Select,
#endregion
#region Movement Commands
/// Moves up one (cell, line, etc...).
Up,
/// Moves down one item (cell, line, etc...).
Down,
///
/// Moves left one (cell, line, etc...).
///
Left,
///
/// Moves right one (cell, line, etc...).
///
Right,
/// Move one page up.
PageUp,
/// Move one page down.
PageDown,
/// Moves to the left page.
PageLeft,
/// Moves to the right page.
PageRight,
/// Moves to the top of page.
StartOfPage,
/// Moves to the bottom of page.
EndOfPage,
/// Moves to the start (e.g. the top or home).
Start,
/// Moves to the end (e.g. the bottom).
End,
/// Moves left to the start on the current row/line.
LeftStart,
/// Moves right to the end on the current row/line.
RightEnd,
/// Moves to the start of the previous word.
WordLeft,
/// Moves the start of the next word.
WordRight,
#endregion
#region Movement With Extension Commands
/// Extends the selection up one item (cell, line, etc...).
UpExtend,
/// Extends the selection down one (cell, line, etc...).
DownExtend,
///
/// Extends the selection left one item (cell, line, etc...)
///
LeftExtend,
///
/// Extends the selection right one item (cell, line, etc...)
///
RightExtend,
/// Extends the selection to the start of the previous word.
WordLeftExtend,
/// Extends the selection to the start of the next word.
WordRightExtend,
/// Move one page down extending the selection to cover revealed objects/characters.
PageDownExtend,
/// Move one page up extending the selection to cover revealed objects/characters.
PageUpExtend,
/// Extends the selection to start (e.g. home or top).
StartExtend,
/// Extends the selection to end (e.g. bottom).
EndExtend,
/// Extends the selection to the start on the current row/line.
LeftStartExtend,
/// Extends the selection to the right on the current row/line.
RightEndExtend,
/// Toggles the selection.
ToggleExtend,
#endregion
#region Editing Commands
/// Deletes the characters forwards.
KillWordForwards,
/// Deletes the characters backwards.
KillWordBackwards,
///
/// Toggles overwrite mode such that newly typed text overwrites the text that is already there (typically
/// associated with the Insert key).
///
ToggleOverwrite,
// QUESTION: What is the difference between EnableOverwrite and ToggleOverwrite?
///
/// Enables overwrite mode such that newly typed text overwrites the text that is already there (typically
/// associated with the Insert key).
///
EnableOverwrite,
/// Disables overwrite mode ()
DisableOverwrite,
/// Deletes the character on the right.
DeleteCharRight,
/// Deletes the character on the left.
DeleteCharLeft,
/// Selects all objects.
SelectAll,
/// Deletes all objects.
DeleteAll,
/// Inserts a new item.
NewLine,
/// Unix emulation.
UnixEmulation,
#endregion
#region Tree Commands
/// Moves down to the last child node of the branch that holds the current selection.
LineDownToLastBranch,
/// Moves up to the first child node of the branch that holds the current selection.
LineUpToFirstBranch,
#endregion
#region Scroll Commands
/// Scrolls down one (cell, line, etc...).
ScrollDown,
/// Scrolls up one item (cell, line, etc...).
ScrollUp,
/// Scrolls one item (cell, character, etc...) to the left.
ScrollLeft,
/// Scrolls one item (cell, character, etc...) to the right.
ScrollRight,
#endregion
#region Clipboard Commands
/// Undo changes.
Undo,
/// Redo changes.
Redo,
/// Copies the current selection.
Copy,
/// Cuts the current selection.
Cut,
/// Pastes the current selection.
Paste,
/// Cuts to the clipboard the characters from the current position to the end of the line.
CutToEndLine,
/// Cuts to the clipboard the characters from the current position to the start of the line.
CutToStartLine,
#endregion
#region Navigation Commands
/// Moves focus to the next .
NextTabStop,
/// Moves focus to the previous .
PreviousTabStop,
/// Moves focus to the next .
NextTabGroup,
/// Moves focus to the next.
PreviousTabGroup,
/// Tabs to the next item.
Tab,
/// Tabs back to the previous item.
BackTab,
#endregion
#region Action Commands
/// Toggles something (e.g. the expanded or collapsed state of a list).
Toggle,
/// Expands a list or item (with subitems).
Expand,
/// Recursively Expands all child items and their child items (if any).
ExpandAll,
/// Collapses a list or item (with subitems).
Collapse,
/// Recursively collapses a list items of their children (if any).
CollapseAll,
/// Cancels an action or any temporary states on the control e.g. expanding a combo list.
Cancel,
/// Quit.
Quit,
/// Refresh.
Refresh,
/// Suspend an application (Only implemented in ).
Suspend,
/// Open the selected item or invoke a UI for opening something.
Open,
/// Saves the current document.
Save,
/// Saves the current document with a new name.
SaveAs,
/// Creates a new document.
New,
/// Shows context about the item (e.g. a context menu).
Context,
///
/// Invokes a user interface for editing or configuring something.
///
Edit,
#endregion
}