terminal/src/cascadia/TerminalApp/CommandPalette.idl
Don-Vito 1aff3bc216
Bold matching text in the command palette (#7977)
* Created a ViewModel class in the Command Palette called
  FilteredCommand, aggregating the Command, the filter and the
  highlighted presentation of the command name
* This ListView of the filtered commands is bound to the vector of
  FilteredCommands
* Introduced HighlightedTextControl user control with HighlightedText
  view model
* Added this control to the ListView Item's grid
* Bound the FilteredCommand's highlighted command name to the user
  control

## Validation Steps Performed
* UT for matching algorithm
* Only manual tests
* Searching in CommandLine, SwitchTab and Nested Command modes
* Checking for bot matching an non matching filters
* Dogfooding

Closes #6646
2020-11-05 17:37:45 -08:00

35 lines
1.3 KiB
Plaintext

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "IDirectKeyListener.idl";
import "ShortcutActionDispatch.idl";
import "HighlightedTextControl.idl";
import "FilteredCommand.idl";
namespace TerminalApp
{
[default_interface] runtimeclass CommandPalette : Windows.UI.Xaml.Controls.UserControl, Windows.UI.Xaml.Data.INotifyPropertyChanged, IDirectKeyListener
{
CommandPalette();
String NoMatchesText { get; };
String SearchBoxPlaceholderText { get; };
String PrefixCharacter { get; };
String ControlName { get; };
String ParentCommandName { get; };
Windows.Foundation.Collections.IObservableVector<FilteredCommand> FilteredActions { get; };
void SetCommands(Windows.Foundation.Collections.IVector<Microsoft.Terminal.Settings.Model.Command> actions);
void SetTabActions(Windows.Foundation.Collections.IVector<Microsoft.Terminal.Settings.Model.Command> tabs, Boolean clearList);
void SetKeyBindings(Microsoft.Terminal.TerminalControl.IKeyBindings bindings);
void EnableCommandPaletteMode();
void SelectNextItem(Boolean moveDown);
void SetDispatch(ShortcutActionDispatch dispatch);
void EnableTabSwitcherMode(Boolean searchMode, UInt32 startIdx);
}
}