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

Code before:
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, ForceFullRepaintRendering, "experimental.rendering.forceFullRepaint", false)                                                                   \
    X(bool, SoftwareRendering, "experimental.rendering.software", false)                                                                                   \
    X(bool, UseBackgroundImageForWindow, "experimental.useBackgroundImageForWindow", false)                                                                \
    X(bool, ReloadEnvironmentVariables, "experimental.reloadEnvironmentVariables", true)                                                                   \
    X(bool, ForceVTInput, "experimental.input.forceVT", 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, "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, "inputServiceWarning", true)                                                                                              \
    X(winrt::Microsoft::Terminal::Control::CopyFormat, CopyFormatting, "copyFormatting", 0)                                                                \
    X(bool, WarnAboutLargePaste, "largePasteWarning", true)                                                                                                \
    X(bool, WarnAboutMultiLinePaste, "multiLinePasteWarning", 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)                                                                                \
    X(bool, SnapToGridOnResize, "snapToGridOnResize", true)                                                                                                \
    X(bool, DebugFeaturesEnabled, "debugFeatures", debugFeaturesDefault)                                                                                   \
    X(bool, StartOnUserLogin, "startOnUserLogin", false)                                                                                                   \
    X(bool, AlwaysOnTop, "alwaysOnTop", false)                                                                                                             \
    X(bool, AutoHideWindow, "autoHideWindow", false)                                                                                                       \

Review comment (suggestion):
```suggestion
    X(bool, ReloadEnvironmentVariables, "compatibility.reloadEnvironmentVariables", true)                                                                   \
```

Code after:
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, ForceFullRepaintRendering, "experimental.rendering.forceFullRepaint", false)                                                                   \
    X(bool, SoftwareRendering, "experimental.rendering.software", false)                                                                                   \
    X(bool, UseBackgroundImageForWindow, "experimental.useBackgroundImageForWindow", false)                                                                \
    X(bool, ReloadEnvironmentVariables, "compatibility.reloadEnvironmentVariables", true)                                                                  \
    X(bool, ForceVTInput, "experimental.input.forceVT", 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, "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, "inputServiceWarning", true)                                                                                              \
    X(winrt::Microsoft::Terminal::Control::CopyFormat, CopyFormatting, "copyFormatting", 0)                                                                \
    X(bool, WarnAboutLargePaste, "largePasteWarning", true)                                                                                                \
    X(bool, WarnAboutMultiLinePaste, "multiLinePasteWarning", 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)                                                                                \
    X(bool, SnapToGridOnResize, "snapToGridOnResize", true)                                                                                                \
    X(bool, DebugFeaturesEnabled, "debugFeatures", debugFeaturesDefault)                                                                                   \
    X(bool, StartOnUserLogin, "startOnUserLogin", false)                                                                                                   \
    X(bool, AlwaysOnTop, "alwaysOnTop", false)                                                                                                             \
    X(bool, AutoHideWindow, "autoHideWindow", false)                                                                                                       \