Repository: microsoft/terminal
File: src/cascadia/TerminalSettingsModel/MTSMSettings.h (C/C++)

Code before:
Copyright (c) Microsoft Corporation
Licensed under the MIT license.

Module Name:
- MTSMSettings.h

Abstract:
- Contains most of the settings within Terminal Settings Model (global, profile, font, appearance)
- To add a new setting to any one of those classes, simply add it to the respective list below, following the macro format

Author(s):
- Pankaj Bhojwani - October 2021

--*/
#pragma once

// Macro format (defaultArgs are optional):
// (type, name, jsonKey, defaultArgs)

#define MTSM_GLOBAL_SETTINGS(X)                                                                                                                                                                       \
    X(int32_t, InitialRows, "initialRows", 30)                                                                                                                                                        \
    X(int32_t, InitialCols, "initialCols", 80)                                                                                                                                                        \
    X(hstring, WordDelimiters, "wordDelimiters", DEFAULT_WORD_DELIMITERS)                                                                                                                             \
    X(bool, CopyOnSelect, "copyOnSelect", false)                                                                                                                                                      \
    X(bool, FocusFollowMouse, "focusFollowMouse", false)                                                                                                                                              \
    X(bool, ScrollToZoom, "experimental.scrollToZoom", false)                                                                                                                                         \
    X(winrt::Microsoft::Terminal::Control::GraphicsAPI, GraphicsAPI, "rendering.graphicsAPI")                                                                                                         \
    X(bool, DisablePartialInvalidation, "rendering.disablePartialInvalidation", false)                                                                                                                \
    X(bool, SoftwareRendering, "rendering.software", false)                                                                                                                                           \
    X(winrt::Microsoft::Terminal::Control::TextMeasurement, TextMeasurement, "compatibility.textMeasurement")                                                                                         \
    X(winrt::Microsoft::Terminal::Control::DefaultInputScope, DefaultInputScope, "defaultInputScope")                                                                                                 \
    X(bool, UseBackgroundImageForWindow, "experimental.useBackgroundImageForWindow", false)                                                                                                           \
    X(bool, TrimBlockSelection, "trimBlockSelection", true)                                                                                                                                           \
    X(bool, DetectURLs, "experimental.detectURLs", true)                                                                                                                                              \
    X(bool, AlwaysShowTabs, "alwaysShowTabs", true)                                                                                                                                                   \
    X(Model::NewTabPosition, NewTabPosition, "newTabPosition", Model::NewTabPosition::AfterLastTab)                                                                                                   \
    X(bool, ShowTitleInTitlebar, "showTerminalTitleInTitlebar", true)                                                                                                                                 \
    X(bool, ConfirmCloseAllTabs, "warning.confirmCloseAllTabs", true)                                                                                                                                 \
    X(Model::ThemePair, Theme, "theme")                                                                                                                                                               \
    X(hstring, Language, "language")                                                                                                                                                                  \
    X(winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, TabWidthMode, "tabWidthMode", winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode::Equal)                                            \
    X(bool, UseAcrylicInTabRow, "useAcrylicInTabRow", false)                                                                                                                                          \
    X(bool, ShowTabsInTitlebar, "showTabsInTitlebar", true)                                                                                                                                           \
    X(bool, InputServiceWarning, "warning.inputService", true)                                                                                                                                        \
    X(winrt::Microsoft::Terminal::Control::CopyFormat, CopyFormatting, "copyFormatting", 0)                                                                                                           \
    X(bool, WarnAboutLargePaste, "warning.largePaste", true)                                                                                                                                          \
    X(bool, WarnAboutMultiLinePaste, "warning.multiLinePaste", true)                                                                                                                                  \
    X(Model::LaunchPosition, InitialPosition, "initialPosition", nullptr, nullptr)                                                                                                                    \
    X(bool, CenterOnLaunch, "centerOnLaunch", false)                                                                                                                                                  \
    X(Model::FirstWindowPreference, FirstWindowPreference, "firstWindowPreference", FirstWindowPreference::DefaultProfile)                                                                            \
    X(Model::LaunchMode, LaunchMode, "launchMode", LaunchMode::DefaultMode)                                                                                                                           \

Review comment (suggestion):
```suggestion
    X(bool, ScrollToZoom, "experimental.scrollToZoom", true)                                                                                                                                         \
```

Code after:
Copyright (c) Microsoft Corporation
Licensed under the MIT license.

Module Name:
- MTSMSettings.h

Abstract:
- Contains most of the settings within Terminal Settings Model (global, profile, font, appearance)
- To add a new setting to any one of those classes, simply add it to the respective list below, following the macro format

Author(s):
- Pankaj Bhojwani - October 2021

--*/
#pragma once

// Macro format (defaultArgs are optional):
// (type, name, jsonKey, defaultArgs)

#define MTSM_GLOBAL_SETTINGS(X)                                                                                                                                                                       \
    X(int32_t, InitialRows, "initialRows", 30)                                                                                                                                                        \
    X(int32_t, InitialCols, "initialCols", 80)                                                                                                                                                        \
    X(hstring, WordDelimiters, "wordDelimiters", DEFAULT_WORD_DELIMITERS)                                                                                                                             \
    X(bool, CopyOnSelect, "copyOnSelect", false)                                                                                                                                                      \
    X(bool, FocusFollowMouse, "focusFollowMouse", false)                                                                                                                                              \
    X(bool, ScrollToZoom, "experimental.scrollToZoom", true)                                                                                                                                          \
    X(winrt::Microsoft::Terminal::Control::GraphicsAPI, GraphicsAPI, "rendering.graphicsAPI")                                                                                                         \
    X(bool, DisablePartialInvalidation, "rendering.disablePartialInvalidation", false)                                                                                                                \
    X(bool, SoftwareRendering, "rendering.software", false)                                                                                                                                           \
    X(winrt::Microsoft::Terminal::Control::TextMeasurement, TextMeasurement, "compatibility.textMeasurement")                                                                                         \
    X(winrt::Microsoft::Terminal::Control::DefaultInputScope, DefaultInputScope, "defaultInputScope")                                                                                                 \
    X(bool, UseBackgroundImageForWindow, "experimental.useBackgroundImageForWindow", false)                                                                                                           \
    X(bool, TrimBlockSelection, "trimBlockSelection", true)                                                                                                                                           \
    X(bool, DetectURLs, "experimental.detectURLs", true)                                                                                                                                              \
    X(bool, AlwaysShowTabs, "alwaysShowTabs", true)                                                                                                                                                   \
    X(Model::NewTabPosition, NewTabPosition, "newTabPosition", Model::NewTabPosition::AfterLastTab)                                                                                                   \
    X(bool, ShowTitleInTitlebar, "showTerminalTitleInTitlebar", true)                                                                                                                                 \
    X(bool, ConfirmCloseAllTabs, "warning.confirmCloseAllTabs", true)                                                                                                                                 \
    X(Model::ThemePair, Theme, "theme")                                                                                                                                                               \
    X(hstring, Language, "language")                                                                                                                                                                  \
    X(winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode, TabWidthMode, "tabWidthMode", winrt::Microsoft::UI::Xaml::Controls::TabViewWidthMode::Equal)                                            \
    X(bool, UseAcrylicInTabRow, "useAcrylicInTabRow", false)                                                                                                                                          \
    X(bool, ShowTabsInTitlebar, "showTabsInTitlebar", true)                                                                                                                                           \
    X(bool, InputServiceWarning, "warning.inputService", true)                                                                                                                                        \
    X(winrt::Microsoft::Terminal::Control::CopyFormat, CopyFormatting, "copyFormatting", 0)                                                                                                           \
    X(bool, WarnAboutLargePaste, "warning.largePaste", true)                                                                                                                                          \
    X(bool, WarnAboutMultiLinePaste, "warning.multiLinePaste", true)                                                                                                                                  \
    X(Model::LaunchPosition, InitialPosition, "initialPosition", nullptr, nullptr)                                                                                                                    \
    X(bool, CenterOnLaunch, "centerOnLaunch", false)                                                                                                                                                  \
    X(Model::FirstWindowPreference, FirstWindowPreference, "firstWindowPreference", FirstWindowPreference::DefaultProfile)                                                                            \
    X(Model::LaunchMode, LaunchMode, "launchMode", LaunchMode::DefaultMode)                                                                                                                           \