terminal/src/cascadia/TerminalSettingsModel/ColorScheme.idl
Carlos Zamora 2c22b68e15
Enable text search on combo boxes (#9206)
`ComboBox` has a text search function that allows users to type letters, and the `ComboBoxItem` starting with those letters is shown. In order to enable this functionality, the underlying items must be `IStringable`. This exposes a `ToString()` function and fixes all of our issues.

This PR adds the `IStringable` interface to `ColorScheme`, `Profile`, and `EnumEntry`.

## References
#6800 - Settings UI Epic
#8768 - Keyboard Navigation
https://github.com/microsoft/microsoft-ui-xaml/issues/4182 - discussion with WinUI about how to overcome this issue

## Validation Steps Performed
Tested...
- Launch > Default Profile
- Color Schemes > Name
- Profile > Appearance > Color scheme
- Profile > Appearance > Font weight

Also tested radio buttons, but those still don't work, unfortunately. Looks like they don't have the same underlying mechanism.
2021-02-19 18:11:07 +00:00

23 lines
712 B
Plaintext

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
namespace Microsoft.Terminal.Settings.Model
{
[default_interface] runtimeclass ColorScheme : Windows.Foundation.IStringable {
ColorScheme(String name);
String Name;
Windows.UI.Color Foreground;
Windows.UI.Color Background;
Windows.UI.Color SelectionBackground;
Windows.UI.Color CursorColor;
// winrt::com_arrays prevent data binding.
// Instead of representing Table as a property,
// we expose the getter as a function.
Windows.UI.Color[] Table();
void SetColorTableEntry(UInt8 index, Windows.UI.Color value);
}
}