-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add updates to the project from
dev/migrie/oop/the-whole-thing
- Loading branch information
1 parent
07c731d
commit 71d445b
Showing
7 changed files
with
152 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
#include "pch.h" | ||
|
||
#include "MySettings.h" | ||
#include "MySettings.g.cpp" | ||
|
||
namespace winrt::SampleApp::implementation | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/*++ | ||
Copyright (c) Microsoft Corporation | ||
Licensed under the MIT license. | ||
--*/ | ||
#pragma once | ||
#include "../../inc/cppwinrt_utils.h" | ||
// #include "../../src/inc/cppwinrt_utils.h" | ||
#include <DefaultSettings.h> | ||
#include <conattrs.hpp> | ||
#include "MySettings.g.h" | ||
|
||
namespace winrt::SampleApp::implementation | ||
{ | ||
struct MySettings : MySettingsT<MySettings> | ||
{ | ||
public: | ||
MySettings() = default; | ||
|
||
// --------------------------- Core Settings --------------------------- | ||
// All of these settings are defined in ICoreSettings. | ||
|
||
WINRT_PROPERTY(til::color, DefaultForeground, DEFAULT_FOREGROUND); | ||
WINRT_PROPERTY(til::color, DefaultBackground, DEFAULT_BACKGROUND); | ||
WINRT_PROPERTY(til::color, SelectionBackground, DEFAULT_FOREGROUND); | ||
WINRT_PROPERTY(int32_t, HistorySize, DEFAULT_HISTORY_SIZE); | ||
WINRT_PROPERTY(int32_t, InitialRows, 30); | ||
WINRT_PROPERTY(int32_t, InitialCols, 80); | ||
|
||
WINRT_PROPERTY(bool, SnapOnInput, true); | ||
WINRT_PROPERTY(bool, AltGrAliasing, true); | ||
WINRT_PROPERTY(til::color, CursorColor, DEFAULT_CURSOR_COLOR); | ||
WINRT_PROPERTY(winrt::Microsoft::Terminal::Core::CursorStyle, CursorShape, winrt::Microsoft::Terminal::Core::CursorStyle::Vintage); | ||
WINRT_PROPERTY(uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT); | ||
WINRT_PROPERTY(winrt::hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS); | ||
WINRT_PROPERTY(bool, CopyOnSelect, false); | ||
WINRT_PROPERTY(bool, InputServiceWarning, true); | ||
WINRT_PROPERTY(bool, FocusFollowMouse, false); | ||
|
||
WINRT_PROPERTY(winrt::Windows::Foundation::IReference<winrt::Microsoft::Terminal::Core::Color>, TabColor, nullptr); | ||
|
||
WINRT_PROPERTY(winrt::Windows::Foundation::IReference<winrt::Microsoft::Terminal::Core::Color>, StartingTabColor, nullptr); | ||
|
||
winrt::Microsoft::Terminal::Core::ICoreAppearance UnfocusedAppearance() { return {}; }; | ||
|
||
WINRT_PROPERTY(bool, TrimBlockSelection, false); | ||
// ------------------------ End of Core Settings ----------------------- | ||
|
||
WINRT_PROPERTY(winrt::hstring, ProfileName); | ||
WINRT_PROPERTY(bool, UseAcrylic, false); | ||
WINRT_PROPERTY(double, TintOpacity, 0.5); | ||
WINRT_PROPERTY(winrt::hstring, Padding, DEFAULT_PADDING); | ||
WINRT_PROPERTY(winrt::hstring, FontFace, L"Consolas"); | ||
WINRT_PROPERTY(int32_t, FontSize, DEFAULT_FONT_SIZE); | ||
|
||
WINRT_PROPERTY(winrt::Windows::UI::Text::FontWeight, FontWeight); | ||
|
||
WINRT_PROPERTY(winrt::hstring, BackgroundImage); | ||
WINRT_PROPERTY(double, BackgroundImageOpacity, 1.0); | ||
|
||
WINRT_PROPERTY(winrt::Windows::UI::Xaml::Media::Stretch, BackgroundImageStretchMode, winrt::Windows::UI::Xaml::Media::Stretch::UniformToFill); | ||
WINRT_PROPERTY(winrt::Windows::UI::Xaml::HorizontalAlignment, BackgroundImageHorizontalAlignment, winrt::Windows::UI::Xaml::HorizontalAlignment::Center); | ||
WINRT_PROPERTY(winrt::Windows::UI::Xaml::VerticalAlignment, BackgroundImageVerticalAlignment, winrt::Windows::UI::Xaml::VerticalAlignment::Center); | ||
|
||
WINRT_PROPERTY(winrt::Microsoft::Terminal::Control::IKeyBindings, KeyBindings, nullptr); | ||
|
||
WINRT_PROPERTY(winrt::hstring, Commandline); | ||
WINRT_PROPERTY(winrt::hstring, StartingDirectory); | ||
WINRT_PROPERTY(winrt::hstring, StartingTitle); | ||
WINRT_PROPERTY(bool, SuppressApplicationTitle); | ||
WINRT_PROPERTY(winrt::hstring, EnvironmentVariables); | ||
|
||
WINRT_PROPERTY(winrt::Microsoft::Terminal::Control::ScrollbarState, ScrollState, winrt::Microsoft::Terminal::Control::ScrollbarState::Visible); | ||
|
||
WINRT_PROPERTY(winrt::Microsoft::Terminal::Control::TextAntialiasingMode, AntialiasingMode, winrt::Microsoft::Terminal::Control::TextAntialiasingMode::Grayscale); | ||
|
||
WINRT_PROPERTY(bool, RetroTerminalEffect, false); | ||
WINRT_PROPERTY(bool, ForceFullRepaintRendering, false); | ||
WINRT_PROPERTY(bool, SoftwareRendering, false); | ||
WINRT_PROPERTY(bool, ForceVTInput, false); | ||
|
||
WINRT_PROPERTY(winrt::hstring, PixelShaderPath); | ||
|
||
private: | ||
std::array<winrt::Microsoft::Terminal::Core::Color, COLOR_TABLE_SIZE> _ColorTable; | ||
|
||
public: | ||
winrt::Microsoft::Terminal::Core::Color GetColorTableEntry(int32_t index) noexcept { return _ColorTable.at(index); } | ||
std::array<winrt::Microsoft::Terminal::Core::Color, 16> ColorTable() { return _ColorTable; } | ||
void ColorTable(std::array<winrt::Microsoft::Terminal::Core::Color, 16> /*colors*/) {} | ||
}; | ||
} | ||
|
||
namespace winrt::SampleApp::factory_implementation | ||
{ | ||
BASIC_FACTORY(MySettings); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
namespace SampleApp | ||
{ | ||
[default_interface] runtimeclass MySettings : Microsoft.Terminal.Core.ICoreSettings, | ||
Microsoft.Terminal.Control.IControlSettings, | ||
Microsoft.Terminal.Core.ICoreAppearance, | ||
Microsoft.Terminal.Control.IControlAppearance | ||
|
||
{ | ||
MySettings(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as resolved.
Sorry, something went wrong.