terminal/src/cascadia/TerminalApp/TerminalSettings.cpp
Carlos Zamora eb8bb09e5b
Move TerminalSettings object to TermApp Project (#7163)
Move TerminalSettings object from TerminalSettings project
(Microsoft.Terminal.Settings) to TerminalApp project. `TerminalSettings`
specifically operates as a bridge that exposes any necessary information
to a TerminalControl.

Closes #7139 
Related Epic: #885
Related Spec: #6904

## PR Checklist
* [X] Closes #7139 
* [X] CLA signed
* [X] Tests ~added~/passed (no additional tests necessary)
* [X] ~Documentation updated~
* [X] ~Schema updated~

## Validation Steps Performed
Deployed Windows Terminal and opened a few new tabs.
2020-08-03 22:54:22 +00:00

23 lines
642 B
C++

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "pch.h"
#include "TerminalSettings.h"
#include "TerminalSettings.g.cpp"
namespace winrt::TerminalApp::implementation
{
uint32_t TerminalSettings::GetColorTableEntry(int32_t index) const noexcept
{
return _colorTable.at(index);
}
void TerminalSettings::SetColorTableEntry(int32_t index, uint32_t value)
{
auto const colorTableCount = gsl::narrow_cast<decltype(index)>(_colorTable.size());
THROW_HR_IF(E_INVALIDARG, index >= colorTableCount);
_colorTable.at(index) = value;
}
}