mirror of
https://github.com/microsoft/terminal.git
synced 2026-02-03 18:17:40 -06:00
Refactor SCREEN_INFORMATION to use in-class initializers (#19645)
Related to #962
This commit is contained in:
parent
20cfb157f7
commit
fecd9087eb
@ -22,23 +22,9 @@ SCREEN_INFORMATION::SCREEN_INFORMATION(
|
||||
_In_ IWindowMetrics* pMetrics,
|
||||
const TextAttribute popupAttributes,
|
||||
const FontInfo fontInfo) :
|
||||
OutputMode{ ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT },
|
||||
WheelDelta{ 0 },
|
||||
HWheelDelta{ 0 },
|
||||
_textBuffer{ nullptr },
|
||||
Next{ nullptr },
|
||||
WriteConsoleDbcsLeadByte{ 0, 0 },
|
||||
FillOutDbcsLeadChar{ 0 },
|
||||
ScrollScale{ 1ul },
|
||||
_pConsoleWindowMetrics{ pMetrics },
|
||||
_api{ *this },
|
||||
_stateMachine{ nullptr },
|
||||
_viewport(Viewport::Empty()),
|
||||
_psiAlternateBuffer{ nullptr },
|
||||
_psiMainBuffer{ nullptr },
|
||||
_fAltWindowChanged{ false },
|
||||
_PopupAttributes{ popupAttributes },
|
||||
_virtualBottom{ 0 },
|
||||
_currentFont{ fontInfo },
|
||||
_desiredFont{ fontInfo }
|
||||
{
|
||||
|
||||
@ -166,20 +166,20 @@ public:
|
||||
InputBuffer* const GetActiveInputBuffer() const override;
|
||||
#pragma endregion
|
||||
|
||||
DWORD OutputMode;
|
||||
DWORD OutputMode{ ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT };
|
||||
|
||||
short WheelDelta;
|
||||
short HWheelDelta;
|
||||
short WheelDelta{ 0 };
|
||||
short HWheelDelta{ 0 };
|
||||
|
||||
private:
|
||||
std::unique_ptr<TextBuffer> _textBuffer;
|
||||
std::unique_ptr<TextBuffer> _textBuffer{ nullptr };
|
||||
|
||||
public:
|
||||
SCREEN_INFORMATION* Next;
|
||||
BYTE WriteConsoleDbcsLeadByte[2];
|
||||
BYTE FillOutDbcsLeadChar;
|
||||
SCREEN_INFORMATION* Next{ nullptr };
|
||||
BYTE WriteConsoleDbcsLeadByte[2]{ 0, 0 };
|
||||
BYTE FillOutDbcsLeadChar{ 0 };
|
||||
|
||||
UINT ScrollScale;
|
||||
UINT ScrollScale{ 1u };
|
||||
|
||||
bool IsActiveScreenBuffer() const;
|
||||
|
||||
@ -259,20 +259,20 @@ private:
|
||||
bool _IsInPtyMode() const;
|
||||
bool _IsInVTMode() const;
|
||||
|
||||
ConhostInternalGetSet _api;
|
||||
ConhostInternalGetSet _api{ *this };
|
||||
|
||||
std::shared_ptr<Microsoft::Console::VirtualTerminal::StateMachine> _stateMachine;
|
||||
std::shared_ptr<Microsoft::Console::VirtualTerminal::StateMachine> _stateMachine{ nullptr };
|
||||
|
||||
// Specifies which coordinates of the screen buffer are visible in the
|
||||
// window client (the "viewport" into the buffer)
|
||||
Microsoft::Console::Types::Viewport _viewport;
|
||||
|
||||
SCREEN_INFORMATION* _psiAlternateBuffer; // The VT "Alternate" screen buffer.
|
||||
SCREEN_INFORMATION* _psiMainBuffer; // A pointer to the main buffer, if this is the alternate buffer.
|
||||
SCREEN_INFORMATION* _psiAlternateBuffer{ nullptr }; // The VT "Alternate" screen buffer.
|
||||
SCREEN_INFORMATION* _psiMainBuffer{ nullptr }; // A pointer to the main buffer, if this is the alternate buffer.
|
||||
|
||||
til::rect _rcAltSavedClientNew;
|
||||
til::rect _rcAltSavedClientOld;
|
||||
bool _fAltWindowChanged;
|
||||
til::rect _rcAltSavedClientNew{};
|
||||
til::rect _rcAltSavedClientOld{};
|
||||
bool _fAltWindowChanged{ false };
|
||||
|
||||
TextAttribute _PopupAttributes;
|
||||
|
||||
@ -282,7 +282,7 @@ private:
|
||||
// Tracks the last virtual position the viewport was at. This is not
|
||||
// affected by the user scrolling the viewport, only when API calls cause
|
||||
// the viewport to move (SetBufferInfo, WriteConsole, etc)
|
||||
til::CoordType _virtualBottom;
|
||||
til::CoordType _virtualBottom{ 0 };
|
||||
|
||||
std::optional<til::size> _deferredPtyResize{ std::nullopt };
|
||||
std::atomic<bool> _conptyCursorPositionMayBeWrong = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user