Skip to content

Commit fd8b083

Browse files
committed
get rid of this file
1 parent 6789ec0 commit fd8b083

File tree

6 files changed

+22
-34
lines changed

6 files changed

+22
-34
lines changed

src/cascadia/TerminalApp/IPaneContent.idl

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace TerminalApp
1313
{
1414
Windows.UI.Xaml.FrameworkElement GetRoot();
1515

16-
Windows.Foundation.Size MinSize { get; };
16+
Windows.Foundation.Size MinimumSize { get; };
1717

1818
String Title { get; };
1919
UInt64 TaskbarState { get; };
@@ -47,6 +47,6 @@ namespace TerminalApp
4747
interface ISnappable
4848
{
4949
Single SnapDownToGrid(PaneSnapDirection direction, Single sizeToSnap);
50-
Windows.Foundation.Size GridSize { get; };
50+
Windows.Foundation.Size GridUnitSize { get; };
5151
};
5252
}

src/cascadia/TerminalApp/Pane.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#include "pch.h"
55
#include "Pane.h"
66

7-
#include "BellEventArgs.g.cpp"
8-
97
#include "AppLogic.h"
108

119
#include "Utils.h"
@@ -2642,7 +2640,7 @@ Pane::SnapSizeResult Pane::_CalcSnappedDimension(const bool widthOrHeight, const
26422640
}
26432641
else
26442642
{
2645-
const auto cellSize = snappable.GridSize();
2643+
const auto cellSize = snappable.GridUnitSize();
26462644
const auto higher = lower + (direction == PaneSnapDirection::Width ?
26472645
cellSize.Width :
26482646
cellSize.Height);
@@ -2703,13 +2701,11 @@ void Pane::_AdvanceSnappedDimension(const bool widthOrHeight, LayoutSizeNode& si
27032701
// be, say, half a character, or fixed 10 pixels), so snap it upward. It might
27042702
// however be already snapped, so add 1 to make sure it really increases
27052703
// (not strictly necessary but to avoid surprises).
2706-
sizeNode.size = _CalcSnappedDimension(widthOrHeight,
2707-
sizeNode.size + 1)
2708-
.higher;
2704+
sizeNode.size = _CalcSnappedDimension(widthOrHeight, sizeNode.size + 1).higher;
27092705
}
27102706
else
27112707
{
2712-
const auto cellSize = snappable.GridSize();
2708+
const auto cellSize = snappable.GridUnitSize();
27132709
sizeNode.size += widthOrHeight ? cellSize.Width : cellSize.Height;
27142710
}
27152711
}
@@ -2825,7 +2821,7 @@ Size Pane::_GetMinSize() const
28252821
{
28262822
if (_IsLeaf())
28272823
{
2828-
auto controlSize = _content.MinSize();
2824+
auto controlSize = _content.MinimumSize();
28292825
auto newWidth = controlSize.Width;
28302826
auto newHeight = controlSize.Height;
28312827

src/cascadia/TerminalApp/Pane.h

-13
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#include "TaskbarState.h"
2424
#include "TerminalPaneContent.h"
25-
#include "BellEventArgs.g.h"
2625

2726
// fwdecl unittest classes
2827
namespace TerminalAppLocalTests
@@ -60,18 +59,6 @@ struct PaneResources
6059
winrt::Windows::UI::Xaml::Media::SolidColorBrush broadcastBorderBrush{ nullptr };
6160
};
6261

63-
namespace winrt::TerminalApp::implementation
64-
{
65-
struct BellEventArgs : public BellEventArgsT<BellEventArgs>
66-
{
67-
public:
68-
BellEventArgs(bool flashTaskbar) :
69-
FlashTaskbar(flashTaskbar) {}
70-
71-
til::property<bool> FlashTaskbar;
72-
};
73-
};
74-
7562
class Pane : public std::enable_shared_from_this<Pane>
7663
{
7764
public:

src/cascadia/TerminalApp/TerminalAppLib.vcxproj

-6
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@
131131
</ClInclude>
132132
<ClInclude Include="FilteredCommand.h" />
133133
<ClInclude Include="Pane.h" />
134-
<ClInclude Include="PaneArgs.h">
135-
<DependentUpon>IPaneContent.idl</DependentUpon>
136-
</ClInclude>
137134
<ClInclude Include="ColorHelper.h" />
138135
<ClInclude Include="pch.h" />
139136
<ClInclude Include="ShortcutActionDispatch.h">
@@ -236,9 +233,6 @@
236233
</ClCompile>
237234
<ClCompile Include="FilteredCommand.cpp" />
238235
<ClCompile Include="Pane.cpp" />
239-
<ClCompile Include="PaneArgs.cpp">
240-
<DependentUpon>IPaneContent.idl</DependentUpon>
241-
</ClCompile>
242236
<ClCompile Include="Pane.LayoutSizeNode.cpp" />
243237
<ClCompile Include="ColorHelper.cpp">
244238
<PrecompiledHeader>NotUsing</PrecompiledHeader>

src/cascadia/TerminalApp/TerminalPaneContent.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33

44
#include "pch.h"
55
#include "TerminalPaneContent.h"
6-
#include "PaneArgs.h"
76
#include "TerminalPaneContent.g.cpp"
87

8+
#include "BellEventArgs.g.cpp"
9+
910
#include <Mmsystem.h>
1011
using namespace winrt::Windows::Foundation;
1112
using namespace winrt::Windows::UI::Xaml;
@@ -49,7 +50,7 @@ namespace winrt::TerminalApp::implementation
4950
{
5051
return _control;
5152
}
52-
winrt::Windows::Foundation::Size TerminalPaneContent::MinSize()
53+
winrt::Windows::Foundation::Size TerminalPaneContent::MinimumSize()
5354
{
5455
return _control.MinimumSize();
5556
}
@@ -324,7 +325,7 @@ namespace winrt::TerminalApp::implementation
324325
{
325326
return _control.SnapDimensionToGrid(direction == PaneSnapDirection::Width, sizeToSnap);
326327
}
327-
Windows::Foundation::Size TerminalPaneContent::GridSize()
328+
Windows::Foundation::Size TerminalPaneContent::GridUnitSize()
328329
{
329330
return _control.CharacterDimensions();
330331
}

src/cascadia/TerminalApp/TerminalPaneContent.h

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,27 @@
33

44
#pragma once
55
#include "TerminalPaneContent.g.h"
6+
#include "BellEventArgs.g.h"
67

78
namespace winrt::TerminalApp::implementation
89
{
10+
struct BellEventArgs : public BellEventArgsT<BellEventArgs>
11+
{
12+
public:
13+
BellEventArgs(bool flashTaskbar) :
14+
FlashTaskbar(flashTaskbar) {}
15+
16+
til::property<bool> FlashTaskbar;
17+
};
18+
919
struct TerminalPaneContent : TerminalPaneContentT<TerminalPaneContent>
1020
{
1121
TerminalPaneContent(const winrt::Microsoft::Terminal::Settings::Model::Profile& profile,
1222
const winrt::Microsoft::Terminal::Control::TermControl& control);
1323

1424
winrt::Windows::UI::Xaml::FrameworkElement GetRoot();
1525
winrt::Microsoft::Terminal::Control::TermControl GetTerminal();
16-
winrt::Windows::Foundation::Size MinSize();
26+
winrt::Windows::Foundation::Size MinimumSize();
1727
void Focus(winrt::Windows::UI::Xaml::FocusState reason = winrt::Windows::UI::Xaml::FocusState::Programmatic);
1828
void Close();
1929

@@ -35,7 +45,7 @@ namespace winrt::TerminalApp::implementation
3545
bool ReadOnly() { return _control.ReadOnly(); }
3646

3747
float SnapDownToGrid(const TerminalApp::PaneSnapDirection direction, const float sizeToSnap);
38-
Windows::Foundation::Size GridSize();
48+
Windows::Foundation::Size GridUnitSize();
3949

4050
til::typed_event<TerminalApp::TerminalPaneContent, winrt::Windows::Foundation::IInspectable> RestartTerminalRequested;
4151
til::typed_event<> CloseRequested;

0 commit comments

Comments
 (0)