-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
SettingContainer.h
51 lines (40 loc) · 1.55 KB
/
SettingContainer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*++
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Module Name:
- SettingContainer
Abstract:
- This is a XAML container that wraps settings in the Settings UI.
It interacts with the inheritance logic from the TerminalSettingsModel
and represents it in the Settings UI.
Author(s):
- Carlos Zamora - January 2021
--*/
#pragma once
#include "SettingContainer.g.h"
#include "Utils.h"
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
struct SettingContainer : SettingContainerT<SettingContainer>
{
public:
SettingContainer();
void OnApplyTemplate();
DEPENDENCY_PROPERTY(Windows::Foundation::IInspectable, Header);
DEPENDENCY_PROPERTY(hstring, HelpText);
DEPENDENCY_PROPERTY(hstring, CurrentValue);
DEPENDENCY_PROPERTY(bool, HasSettingValue);
DEPENDENCY_PROPERTY(bool, StartExpanded);
DEPENDENCY_PROPERTY(IInspectable, SettingOverrideSource);
TYPED_EVENT(ClearSettingValue, Editor::SettingContainer, Windows::Foundation::IInspectable);
private:
static void _InitializeProperties();
static void _OnHasSettingValueChanged(const Windows::UI::Xaml::DependencyObject& d, const Windows::UI::Xaml::DependencyPropertyChangedEventArgs& e);
static hstring _GenerateOverrideMessage(const IInspectable& settingOrigin);
void _UpdateOverrideSystem();
};
}
namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
{
BASIC_FACTORY(SettingContainer);
}