2019-05-03 00:29:04 +02:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
#include "pch.h"
|
|
|
|
#include "TerminalSettings.h"
|
|
|
|
|
2019-05-23 19:36:29 +02:00
|
|
|
#include "TerminalSettings.g.cpp"
|
|
|
|
|
2019-05-03 00:29:04 +02:00
|
|
|
namespace winrt::Microsoft::Terminal::Settings::implementation
|
|
|
|
{
|
2020-01-03 19:44:27 +01:00
|
|
|
uint32_t TerminalSettings::GetColorTableEntry(int32_t index) const noexcept
|
2019-05-03 00:29:04 +02:00
|
|
|
{
|
2020-01-03 19:44:27 +01:00
|
|
|
return _colorTable.at(index);
|
2019-05-03 00:29:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TerminalSettings::SetColorTableEntry(int32_t index, uint32_t value)
|
|
|
|
{
|
2019-08-06 20:33:32 +02:00
|
|
|
auto const colorTableCount = gsl::narrow_cast<decltype(index)>(_colorTable.size());
|
|
|
|
THROW_HR_IF(E_INVALIDARG, index >= colorTableCount);
|
2020-01-03 19:44:27 +01:00
|
|
|
_colorTable.at(index) = value;
|
2019-05-03 00:29:04 +02:00
|
|
|
}
|
|
|
|
}
|