3cf7677d17
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.
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#pragma once
|
|
|
|
#include "Launch.g.h"
|
|
#include "LaunchPageNavigationState.g.h"
|
|
#include "Utils.h"
|
|
|
|
namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
|
{
|
|
struct LaunchPageNavigationState : LaunchPageNavigationStateT<LaunchPageNavigationState>
|
|
{
|
|
public:
|
|
LaunchPageNavigationState(const Model::CascadiaSettings& settings) :
|
|
_Settings{ settings } {}
|
|
|
|
WINRT_PROPERTY(Model::CascadiaSettings, Settings, nullptr)
|
|
};
|
|
|
|
struct Launch : LaunchT<Launch>
|
|
{
|
|
public:
|
|
Launch();
|
|
|
|
void OnNavigatedTo(const winrt::Windows::UI::Xaml::Navigation::NavigationEventArgs& e);
|
|
|
|
IInspectable CurrentDefaultProfile();
|
|
void CurrentDefaultProfile(const IInspectable& value);
|
|
|
|
WINRT_PROPERTY(Editor::LaunchPageNavigationState, State, nullptr);
|
|
|
|
GETSET_BINDABLE_ENUM_SETTING(LaunchMode, Model::LaunchMode, State().Settings().GlobalSettings, LaunchMode);
|
|
GETSET_BINDABLE_ENUM_SETTING(WindowingBehavior, Model::WindowingMode, State().Settings().GlobalSettings, WindowingBehavior);
|
|
};
|
|
}
|
|
|
|
namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
|
|
{
|
|
BASIC_FACTORY(Launch);
|
|
}
|