As mentioned in https://github.com/microsoft/terminal/issues/9354#issuecomment-790034728 `GETSET_SETTING` is too visually similar to `GETSET_PROPERTY`, but with a _VERY_ different meaning. I think that merely changing the name of the macro would make it harder for us to make this mistake again.
35 lines
1 KiB
C++
35 lines
1 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#pragma once
|
|
|
|
#include "PaletteItem.h"
|
|
#include "TabPaletteItem.g.h"
|
|
#include "inc/cppwinrt_utils.h"
|
|
|
|
namespace winrt::TerminalApp::implementation
|
|
{
|
|
struct TabPaletteItem : TabPaletteItemT<TabPaletteItem, PaletteItem>
|
|
{
|
|
TabPaletteItem() = default;
|
|
TabPaletteItem(winrt::TerminalApp::TabBase const& tab);
|
|
|
|
winrt::TerminalApp::TabBase Tab() const noexcept
|
|
{
|
|
return _tab.get();
|
|
}
|
|
|
|
WINRT_OBSERVABLE_PROPERTY(winrt::TerminalApp::TerminalTabStatus, TabStatus, _PropertyChangedHandlers);
|
|
|
|
private:
|
|
winrt::weak_ref<winrt::TerminalApp::TabBase> _tab;
|
|
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _tabChangedRevoker;
|
|
Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged_revoker _tabStatusChangedRevoker;
|
|
};
|
|
}
|
|
|
|
namespace winrt::TerminalApp::factory_implementation
|
|
{
|
|
BASIC_FACTORY(TabPaletteItem);
|
|
}
|