Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Settings UI Prototype #7370

Merged
106 commits merged into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from 98 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
e07667a
add settings ui prototype
cinnamon-msft May 20, 2020
9e40d01
fix packages filepaths
carlos-zamora Jul 23, 2020
bb07e3c
Add panel list items to match mockups
almedina-ms Jul 23, 2020
5e45058
add rudimentary object model
carlos-zamora Jul 23, 2020
4f888db
Merge pull request #1 from cinnamon-msft/almedina-ms/NavPanel
vineeththomasalex Jul 23, 2020
d6d835c
Replicate sub menus
almedina-ms Jul 23, 2020
d22616c
Fix submenus
almedina-ms Jul 23, 2020
fe1261b
Remove extra line
almedina-ms Jul 23, 2020
ad723f7
move objects to new folder; initialize XAML with settings object
carlos-zamora Jul 24, 2020
0160cdc
Rename VS Project to SettingsControl
carlos-zamora Jul 24, 2020
f053823
~polish~
carlos-zamora Jul 24, 2020
69f2b54
Update Top-Level Navigation Items
carlos-zamora Jul 24, 2020
e7c0a8c
merge master
carlos-zamora Jul 24, 2020
e3d1906
Add rudimentary object model
carlos-zamora Jul 24, 2020
c59bfcf
merge master
carlos-zamora Jul 24, 2020
b462e91
keep ObjectModel in TerminalSettings though
carlos-zamora Jul 24, 2020
bb61353
Rename VS Project to SettingsControl
carlos-zamora Jul 24, 2020
3c5fc97
Tweaking the UI to be closer to the mockups
vithoma Jul 24, 2020
6229da3
Merge pull request #5 from cinnamon-msft/vithoma/ObjectBinding_General
vineeththomasalex Jul 24, 2020
e5970a5
fix carlos
cinnamon-msft Jul 27, 2020
af572e2
Kayla broke the build
carlos-zamora Jul 27, 2020
48fad75
Profiles page almost done
vithoma Jul 27, 2020
ac9174f
Added more UI changes
vithoma Jul 27, 2020
75da7e1
cleanup
vithoma Jul 27, 2020
b435b53
add launch page
cinnamon-msft Jul 27, 2020
2864818
Add launch page
carlos-zamora Jul 27, 2020
b97af15
add interaction page
cinnamon-msft Jul 27, 2020
932ceda
Merge pull request #10 from cinnamon-msft/cinnamon/general-xaml
cinnamon-msft Jul 27, 2020
49b0080
add rendering page
cinnamon-msft Jul 27, 2020
53b3b16
add appearance - global page
cinnamon-msft Jul 27, 2020
ab56031
Merge pull request #11 from cinnamon-msft/cinnamon/general-xaml
vineeththomasalex Jul 27, 2020
a0643fd
Merge branch 'cinnamon/settings-ui-v2' into vithoma/ObjectBinding_Gen…
vineeththomasalex Jul 27, 2020
f8d91b8
Merge pull request #8 from cinnamon-msft/vithoma/ObjectBinding_General
vineeththomasalex Jul 27, 2020
fd36244
add home page
cinnamon-msft Jul 27, 2020
51a092e
merge with settings-ui-v2
cinnamon-msft Jul 27, 2020
76382a2
Adding a color picker
Jul 27, 2020
7597129
add some stuff to home page
cinnamon-msft Jul 27, 2020
502e0cf
Adding a border to the color picker button
Jul 27, 2020
2dfd8c0
Merge pull request #13 from cinnamon-msft/cinnamon/general-xaml
cinnamon-msft Jul 27, 2020
ecadd0e
Merge pull request #12 from cinnamon-msft/user/jograndl/ColorSchemes
xerootg Jul 27, 2020
ae48469
Adds AddProfile view
scott-armiger Jul 27, 2020
b196461
Merge pull request #14 from cinnamon-msft/hack/scott-armiger/add-new-…
cinnamon-msft Jul 27, 2020
c9b86d7
initial search bar functionality
cinnamon-msft Jul 28, 2020
5403873
Merge pull request #15 from cinnamon-msft/cinnamon/search-bar-2
vineeththomasalex Jul 28, 2020
0b4a9ea
fix casing on search query
cinnamon-msft Jul 28, 2020
a71567f
Merge pull request #16 from cinnamon-msft/cinnamon/search-bar-2
cinnamon-msft Jul 28, 2020
f2ddb3b
sort search results
cinnamon-msft Jul 28, 2020
d454e76
Merge pull request #17 from cinnamon-msft/cinnamon/search-bar-2
cinnamon-msft Jul 28, 2020
6a72b26
random visual improvements
cinnamon-msft Jul 28, 2020
1e121d6
Merge pull request #18 from cinnamon-msft/cinnamon/home-page
cinnamon-msft Jul 28, 2020
27b7ea9
Working data bindings!!!
Jul 29, 2020
499f741
Add keybindings v-
almedina-ms Jul 29, 2020
fb75160
Add small optimization on search
almedina-ms Jul 29, 2020
cf2c431
Revert "Add small optimization on search"
almedina-ms Jul 29, 2020
a8f4105
Add optimization for search
almedina-ms Jul 29, 2020
7270c91
Merge pull request #19 from cinnamon-msft/almedina-ms/SearchOptimization
cinnamon-msft Jul 29, 2020
1c57176
Merge branch 'cinnamon/settings-ui-v2' into almedina-ms/NavPanel
almedina-ms Jul 29, 2020
c3e2d13
implement part of tutorial
cinnamon-msft Jul 29, 2020
2b9c401
Merge branch 'cinnamon/settings-ui-v2' into cinnamon/home-page
cinnamon-msft Jul 29, 2020
265287e
Add databinding to profiles
carlos-zamora Jul 29, 2020
4683838
xaml data binding for home page
cinnamon-msft Jul 29, 2020
c6606e0
add databinding for profiles (most of them)
carlos-zamora Jul 29, 2020
f00c4a5
Background color all the ways John, all the ways.
Jul 29, 2020
70e0d91
Working data binding for GlobalSettings
scott-armiger Jul 29, 2020
8d07f5a
code cleanup
cinnamon-msft Jul 29, 2020
8a22432
Merge pull request #20 from cinnamon-msft/cinnamon/home-page
cinnamon-msft Jul 29, 2020
c9f8cc2
A model for all colors
Jul 29, 2020
eae0474
Hook the model up
Jul 29, 2020
2b24263
Merge branch 'cinnamon/settings-ui-v2' into user/jograndl/databound
Jul 29, 2020
7d9871a
Merge branch 'cinnamon/settings-ui-v2' into hack/scott-armiger/add-gl…
Jul 29, 2020
95e2fce
Merge pull request #22 from cinnamon-msft/hack/scott-armiger/add-glob…
xerootg Jul 29, 2020
de59e91
get home page nav working
cinnamon-msft Jul 29, 2020
6b3cd1c
code cleanup
cinnamon-msft Jul 29, 2020
6f3f30d
enable back button
cinnamon-msft Jul 29, 2020
45ab020
Add databinding to profiles
carlos-zamora Jul 29, 2020
8f83a5e
add databinding for profiles (most of them)
carlos-zamora Jul 29, 2020
1afeed7
finishing up merging
Jul 30, 2020
ee3a0d8
Merge pull request #21 from cinnamon-msft/hack/cazamor/profiles-datab…
xerootg Jul 30, 2020
a8776d4
Merge branch 'cinnamon/settings-ui-v2' into cinnamon/home-page
Jul 30, 2020
d7bc868
Merge pull request #24 from cinnamon-msft/cinnamon/home-page
xerootg Jul 30, 2020
ae82e74
Merge branch 'cinnamon/settings-ui-v2' into user/jograndl/databound
Jul 30, 2020
75bdfe6
I have no idea where this include came from, but its 1) not needed an…
Jul 30, 2020
a1839e4
Add decent keybindings pop up window
almedina-ms Jul 30, 2020
2f4e0c3
Merge branch 'cinnamon/settings-ui-v2' into almedina-ms/NavPanel
carlos-zamora Jul 30, 2020
c43ec17
Keybindings page
carlos-zamora Jul 30, 2020
20d466a
Merge branch 'cinnamon/settings-ui-v2' into user/jograndl/databound
carlos-zamora Jul 30, 2020
bdd6195
Databindings for Color Profiles
carlos-zamora Jul 30, 2020
c89088a
Add a file picker
carlos-zamora Jul 30, 2020
6debfe8
Accept .exe for commandline
carlos-zamora Jul 30, 2020
4b27b65
Merge pull request #26 from cinnamon-msft/hack/cazamor/file-picker
cinnamon-msft Jul 30, 2020
8d81740
I did a lot of polish
cinnamon-msft Aug 20, 2020
12d5ca5
Polish the thing
carlos-zamora Aug 20, 2020
d6f12a3
Merge branch 'master' into dev/cazamor/settings-ui
carlos-zamora Aug 20, 2020
3cd1945
Move project to OpenConsole.sln
carlos-zamora Aug 21, 2020
6d78fb2
Add Copyright Headers. Remove dead code. General cleanup.
carlos-zamora Aug 21, 2020
2be3a96
rename project and namespace
carlos-zamora Aug 21, 2020
47dfbf1
code format
carlos-zamora Aug 21, 2020
c69a4b5
fix build error and warnings
carlos-zamora Aug 24, 2020
4f9d926
Polish vcxproj, includes, and build
carlos-zamora Aug 25, 2020
3a599ef
address spell checker and CI failure
carlos-zamora Aug 26, 2020
351e1af
fix CI
carlos-zamora Aug 31, 2020
c14dea3
remove TODO CARLOS
carlos-zamora Sep 9, 2020
f214ebc
TODOs, cleanups, namespaces
leonMSFT Sep 14, 2020
b2e3da9
formatting
leonMSFT Sep 14, 2020
07d1480
ok fine i'll separate the word in two
leonMSFT Sep 14, 2020
3f4b2d2
Merge branch 'feature/settings-ui' into dev/cazamor/settings-ui
leonMSFT Sep 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
261 changes: 261 additions & 0 deletions OpenConsole.sln

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions src/cascadia/TerminalSettingsEditor/AddProfile.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#include "pch.h"
#include "AddProfile.h"
#include "AddProfile.g.cpp"

using namespace winrt;
using namespace Windows::UI::Xaml;

namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
AddProfile::AddProfile()
{
InitializeComponent();
}
}
20 changes: 20 additions & 0 deletions src/cascadia/TerminalSettingsEditor/AddProfile.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#pragma once

#include "AddProfile.g.h"
#include "Utils.h"

namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
struct AddProfile : AddProfileT<AddProfile>
{
AddProfile();
};
}

namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
{
BASIC_FACTORY(AddProfile);
}
7 changes: 7 additions & 0 deletions src/cascadia/TerminalSettingsEditor/AddProfile.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Microsoft.Terminal.Settings.Editor
{
[default_interface] runtimeclass AddProfile : Windows.UI.Xaml.Controls.Page
{
AddProfile();
}
}
265 changes: 265 additions & 0 deletions src/cascadia/TerminalSettingsEditor/AddProfile.xaml

Large diffs are not rendered by default.

129 changes: 129 additions & 0 deletions src/cascadia/TerminalSettingsEditor/App.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#include "pch.h"

#include "App.h"
#include "MainPage.h"
#include "Home.h"
#include "Globals.h"
leonMSFT marked this conversation as resolved.
Show resolved Hide resolved
#include "Launch.h"
#include "Interaction.h"
#include "Rendering.h"
#include "Profiles.h"
#include "GlobalAppearance.h"
#include "ColorSchemes.h"
#include "Keybindings.h"

using namespace winrt;
using namespace Windows::ApplicationModel;
using namespace Windows::ApplicationModel::Activation;
using namespace Windows::Foundation;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Navigation;
using namespace Microsoft::Terminal::Settings::Editor::implementation;

/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
App::App()
{
InitializeComponent();
Suspending({ this, &App::OnSuspending });

#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException([this](IInspectable const&, UnhandledExceptionEventArgs const& e) {
if (IsDebuggerPresent())
{
auto errorMessage = e.Message();
__debugbreak();
}
});
#endif
}

/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
void App::OnLaunched(LaunchActivatedEventArgs const& e)
{
Frame rootFrame{ nullptr };
auto content = Window::Current().Content();
if (content)
{
rootFrame = content.try_as<Frame>();
}

// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == nullptr)
{
// Create a Frame to act as the navigation context and associate it with
// a SuspensionManager key
rootFrame = Frame();

rootFrame.NavigationFailed({ this, &App::OnNavigationFailed });

if (e.PreviousExecutionState() == ApplicationExecutionState::Terminated)
{
// Restore the saved session state only when appropriate, scheduling the
// final launch steps after the restore is complete
}

if (e.PrelaunchActivated() == false)
{
if (rootFrame.Content() == nullptr)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(xaml_typename<Editor::MainPage>(), box_value(e.Arguments()));
}
// Place the frame in the current Window
Window::Current().Content(rootFrame);
// Ensure the current window is active
Window::Current().Activate();
}
}
else
{
if (e.PrelaunchActivated() == false)
{
if (rootFrame.Content() == nullptr)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(xaml_typename<Editor::MainPage>(), box_value(e.Arguments()));
}
// Ensure the current window is active
Window::Current().Activate();
}
}
}

/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
void App::OnSuspending([[maybe_unused]] IInspectable const& sender, [[maybe_unused]] SuspendingEventArgs const& e)
{
// Save application state and stop any background activity
}

/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void App::OnNavigationFailed(IInspectable const&, NavigationFailedEventArgs const& e)
{
throw hresult_error(E_FAIL, hstring(L"Failed to load Page ") + e.SourcePageType().Name);
}
18 changes: 18 additions & 0 deletions src/cascadia/TerminalSettingsEditor/App.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#pragma once
#include "App.xaml.g.h"
#include "winrt/Microsoft.UI.Xaml.XamlTypeInfo.h"

namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
struct App : AppT<App>
{
App();

void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs const&);
void OnSuspending(IInspectable const&, Windows::ApplicationModel::SuspendingEventArgs const&);
void OnNavigationFailed(IInspectable const&, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs const&);
};
}
6 changes: 6 additions & 0 deletions src/cascadia/TerminalSettingsEditor/App.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

namespace Microsoft.Terminal.Settings.Editor
leonMSFT marked this conversation as resolved.
Show resolved Hide resolved
{
}
33 changes: 33 additions & 0 deletions src/cascadia/TerminalSettingsEditor/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
the MIT License. See LICENSE in the project root for license information. -->
<Application
x:Class="Microsoft.Terminal.Settings.Editor.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Terminal.Settings.Editor">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
</ResourceDictionary.MergedDictionaries>

<Style x:Key="GridViewItemStyle" TargetType="GridViewItem">
<Setter Property="Margin" Value="0,0,12,12" />
</Style>

<Style x:Key="IndentedGridViewItemStyle" TargetType="GridViewItem">
<Setter Property="Margin" Value="12,0,0,12" />
</Style>

<Style x:Key="GridViewItemStyleSmall" TargetType="GridViewItem">
<Setter Property="Margin" Value="0,0,0,12" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>

<Style x:Key="IndentedGridViewItemStyleSmall" TargetType="GridViewItem">
<Setter Property="Margin" Value="12,0,12,12" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
leonMSFT marked this conversation as resolved.
Show resolved Hide resolved
</ResourceDictionary>
</Application.Resources>
</Application>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions src/cascadia/TerminalSettingsEditor/ColorSchemes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#include "pch.h"
#include "ColorSchemes.h"
#if __has_include("ColorSchemes.g.cpp")
#include "ColorSchemes.g.cpp"
#endif
#include <ObjectModel\ColorScheme.h>

using namespace winrt;
using namespace Windows::UI;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Media;

namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
ColorSchemes::ColorSchemes()
{
m_colorSchemeModel = winrt::make<Model::implementation::ColorSchemeModel>();
InitializeComponent();
}

Model::ColorSchemeModel ColorSchemes::ColorSchemeModel()
{
return m_colorSchemeModel;
}

void ColorSchemes::ClickHandler(IInspectable const&, RoutedEventArgs const&)
{
}

void ColorSchemes::Background_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Background(event.NewColor());
}
void ColorSchemes::Foreground_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Foreground(event.NewColor());
}
void ColorSchemes::Black_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Black(event.NewColor());
}
void ColorSchemes::BrightBlack_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightBlack(event.NewColor());
}
void ColorSchemes::Blue_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Blue(event.NewColor());
}
void ColorSchemes::BrightBlue_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightBlue(event.NewColor());
}
void ColorSchemes::Cyan_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Cyan(event.NewColor());
}
void ColorSchemes::BrightCyan_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightCyan(event.NewColor());
}
void ColorSchemes::Green_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Green(event.NewColor());
}
void ColorSchemes::BrightGreen_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightGreen(event.NewColor());
}
void ColorSchemes::Purple_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Purple(event.NewColor());
}
void ColorSchemes::BrightPurple_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightPurple(event.NewColor());
}
void ColorSchemes::Red_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Red(event.NewColor());
}
void ColorSchemes::BrightRed_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightRed(event.NewColor());
}
void ColorSchemes::White_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().White(event.NewColor());
}
void ColorSchemes::BrightWhite_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightWhite(event.NewColor());
}
void ColorSchemes::Yellow_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().Yellow(event.NewColor());
}
void ColorSchemes::BrightYellow_ColorChanged(ColorPicker const&, ColorChangedEventArgs const& event)
{
m_colorSchemeModel.ColorScheme().BrightYellow(event.NewColor());
}
}
45 changes: 45 additions & 0 deletions src/cascadia/TerminalSettingsEditor/ColorSchemes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#pragma once

#include "ColorSchemes.g.h"
#include "ObjectModel/ColorSchemeModel.h"
#include "Utils.h"

namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
struct ColorSchemes : ColorSchemesT<ColorSchemes>
{
ColorSchemes();
Model::ColorSchemeModel ColorSchemeModel();

void ClickHandler(Windows::Foundation::IInspectable const& sender, Windows::UI::Xaml::RoutedEventArgs const& args);
void Background_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Foreground_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Black_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightBlack_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Blue_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightBlue_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Cyan_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightCyan_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Green_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightGreen_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Purple_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightPurple_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Red_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightRed_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void White_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightWhite_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void Yellow_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);
void BrightYellow_ColorChanged(Windows::UI::Xaml::Controls::ColorPicker const&, Windows::UI::Xaml::Controls::ColorChangedEventArgs const&);

private:
Model::ColorSchemeModel m_colorSchemeModel{ nullptr };
};
}

namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation
{
BASIC_FACTORY(ColorSchemes);
}
Loading