3230b18020
## Summary of the Pull Request Introduces read-only panes. When pane is marked as read-only: 1. Attempt to provide user input results in a warning 2. Attempt to close pane - shows dialog 3. Attempt to close hosting tab shows dialog 4. The hosting tab has no close button ## PR Checklist * [x] Closes #6981 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated - not yet. * [x] Schema updated. * [ ] I've discussed this with core contributors already. ## Detailed Description of the Pull Request / Additional comments 1. The readonly logic implemented in `TermControl` (and prevents any send input) 2. Special handling is required to allow key-bindings 3. The "close-readonly" protections are in TerminalPage. 4. The indication that the pane is readonly is done using lock glyph 5. The indication that the tab contains readonly pane is done by hiding the close button of the tab 6. The readonly mode is enabled by keyboard shortcut (the followup might add this to the context menu) ## Validation Steps Performed
26 lines
767 B
Plaintext
26 lines
767 B
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
import "ShortcutActionDispatch.idl";
|
|
|
|
namespace TerminalApp
|
|
{
|
|
unsealed runtimeclass TabBase : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
|
{
|
|
String Title { get; };
|
|
String Icon { get; };
|
|
Boolean ReadOnly { get; };
|
|
|
|
Microsoft.UI.Xaml.Controls.TabViewItem TabViewItem { get; };
|
|
Windows.UI.Xaml.FrameworkElement Content { get; };
|
|
Windows.UI.Xaml.FocusState FocusState { get; };
|
|
|
|
UInt32 TabViewIndex;
|
|
UInt32 TabViewNumTabs;
|
|
|
|
overridable void Focus(Windows.UI.Xaml.FocusState focusState);
|
|
overridable void Shutdown();
|
|
|
|
void SetDispatch(ShortcutActionDispatch dispatch);
|
|
}
|
|
}
|