Skip to content

Commit a7cc9f2

Browse files
committed
Subview -> SubView
1 parent 461a29e commit a7cc9f2

File tree

149 files changed

+958
-958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+958
-958
lines changed

Terminal.Gui/Application/Application.Run.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static Key ArrangeKey
7171
/// <param name="toplevel">The <see cref="Toplevel"/> to prepare execution for.</param>
7272
/// <remarks>
7373
/// This method prepares the provided <see cref="Toplevel"/> for running with the focus, it adds this to the list
74-
/// of <see cref="Toplevel"/>s, lays out the Subviews, focuses the first element, and draws the <see cref="Toplevel"/>
74+
/// of <see cref="Toplevel"/>s, lays out the SubViews, focuses the first element, and draws the <see cref="Toplevel"/>
7575
/// in the screen. This is usually followed by executing the <see cref="RunLoop"/> method, and then the
7676
/// <see cref="End(RunState)"/> method upon termination which will undo these changes.
7777
/// </remarks>

Terminal.Gui/Application/ApplicationNavigation.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ApplicationNavigation ()
3333
}
3434

3535
/// <summary>
36-
/// Gets whether <paramref name="view"/> is in the Subview hierarchy of <paramref name="start"/>.
36+
/// Gets whether <paramref name="view"/> is in the SubView hierarchy of <paramref name="start"/>.
3737
/// </summary>
3838
/// <param name="start"></param>
3939
/// <param name="view"></param>
@@ -50,7 +50,7 @@ public static bool IsInHierarchy (View? start, View? view)
5050
return true;
5151
}
5252

53-
foreach (View subView in start.Subviews)
53+
foreach (View subView in start.SubViews)
5454
{
5555
if (view == subView)
5656
{

Terminal.Gui/ConsoleDrivers/V2/MainLoop.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ internal void IterationImpl ()
122122

123123
if (Application.Top != null)
124124
{
125-
bool needsDrawOrLayout = AnySubviewsNeedDrawn (Application.Top);
125+
bool needsDrawOrLayout = AnySubViewsNeedDrawn (Application.Top);
126126

127127
bool sizeChanged = WindowSizeMonitor.Poll ();
128128

@@ -174,7 +174,7 @@ private void SetCursor ()
174174
}
175175
}
176176

177-
private bool AnySubviewsNeedDrawn (View v)
177+
private bool AnySubViewsNeedDrawn (View v)
178178
{
179179
if (v.NeedsDraw || v.NeedsLayout)
180180
{
@@ -183,9 +183,9 @@ private bool AnySubviewsNeedDrawn (View v)
183183
return true;
184184
}
185185

186-
foreach (View subview in v.Subviews)
186+
foreach (View subview in v.SubViews)
187187
{
188-
if (AnySubviewsNeedDrawn (subview))
188+
if (AnySubViewsNeedDrawn (subview))
189189
{
190190
return true;
191191
}

Terminal.Gui/Text/Autocomplete/PopupAutocomplete.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ private void AddPopupToTop ()
554554

555555
private void RemovePopupFromTop ()
556556
{
557-
if (_popup is { } && _top.Subviews.Contains (_popup))
557+
if (_popup is { } && _top.SubViews.Contains (_popup))
558558
{
559559
_top?.Remove (_popup);
560560
_popup.Dispose ();

Terminal.Gui/View/Adornment/Adornment.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Terminal.Gui;
1111
/// <para>
1212
/// Each of <see cref="Margin"/>, <see cref="Border"/>, and <see cref="Padding"/> has slightly different
1313
/// behavior relative to <see cref="ColorScheme"/>, <see cref="View.SetFocus()"/>, keyboard input, and
14-
/// mouse input. Each can be customized by manipulating their Subviews.
14+
/// mouse input. Each can be customized by manipulating their SubViews.
1515
/// </para>
1616
/// </remarsk>
1717
public class Adornment : View, IDesignable
@@ -165,7 +165,7 @@ protected override bool OnClearingViewport ()
165165
protected override bool OnDrawingText () { return Thickness == Thickness.Empty; }
166166

167167
/// <inheritdoc/>
168-
protected override bool OnDrawingSubviews () { return Thickness == Thickness.Empty; }
168+
protected override bool OnDrawingSubViews () { return Thickness == Thickness.Empty; }
169169

170170

171171
/// <summary>Does nothing for Adornment</summary>

Terminal.Gui/View/Adornment/Border.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ protected override bool OnDrawingContent ()
711711
{
712712
Attribute focus = Parent.GetNormalColor ();
713713

714-
if (Parent.SuperView is { } && Parent.SuperView?.Subviews!.Count (s => s.CanFocus) > 1)
714+
if (Parent.SuperView is { } && Parent.SuperView?.SubViews!.Count (s => s.CanFocus) > 1)
715715
{
716716
// Only use focus color if there are multiple focusable views
717717
focus = GetFocusColor ();

Terminal.Gui/View/Adornment/Margin.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public Margin (View parent) : base (parent)
3232
// BUGBUG: We should not set HighlightStyle.Pressed here, but wherever it is actually needed
3333
// HighlightStyle |= HighlightStyle.Pressed;
3434
Highlight += Margin_Highlight;
35-
SubviewLayout += Margin_LayoutStarted;
35+
SubViewLayout += Margin_LayoutStarted;
3636

3737
// Margin should not be focusable
3838
CanFocus = false;
@@ -82,7 +82,7 @@ internal static bool DrawMargins (IEnumerable<View> margins)
8282

8383
view.NeedsDraw = false;
8484

85-
foreach (var subview in view.Subviews)
85+
foreach (var subview in view.SubViews)
8686
{
8787
stack.Push (subview);
8888
}

Terminal.Gui/View/Layout/Dim.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public abstract record Dim : IEqualityOperators<Dim, Dim, bool>
9696
public static Dim? Absolute (int size) { return new DimAbsolute (size); }
9797

9898
/// <summary>
99-
/// Creates a <see cref="Dim"/> object that automatically sizes the view to fit all the view's Content, Subviews, and/or Text.
99+
/// Creates a <see cref="Dim"/> object that automatically sizes the view to fit all the view's Content, SubViews, and/or Text.
100100
/// </summary>
101101
/// <remarks>
102102
/// <para>

Terminal.Gui/View/Layout/DimAuto.cs

+23-23
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ internal override int Calculate (int location, int superviewContentSize, View us
7272
{
7373
maxCalculatedSize = textSize;
7474

75-
if (us is { ContentSizeTracksViewport: false, InternalSubviews.Count: 0 })
75+
if (us is { ContentSizeTracksViewport: false, InternalSubViews.Count: 0 })
7676
{
7777
// ContentSize was explicitly set. Use `us.ContentSize` to determine size.
7878
maxCalculatedSize = dimension == Dimension.Width ? us.GetContentSize ().Width : us.GetContentSize ().Height;
@@ -81,12 +81,12 @@ internal override int Calculate (int location, int superviewContentSize, View us
8181
{
8282
// TOOD: All the below is a naive implementation. It may be possible to optimize this.
8383

84-
List<View> includedSubviews = us.InternalSubviews.ToList ();
84+
List<View> includedSubViews = us.InternalSubViews.ToList ();
8585

8686
// If [x] it can cause `us.ContentSize` to change.
8787
// If [ ] it doesn't need special processing for us to determine `us.ContentSize`.
8888

89-
// -------------------- Pos types that are dependent on `us.Subviews`
89+
// -------------------- Pos types that are dependent on `us.SubViews`
9090
// [ ] PosAlign - Position is dependent on other views with `GroupId` AND `us.ContentSize`
9191
// [x] PosView - Position is dependent on `subview.Target` - it can cause a change in `us.ContentSize`
9292
// [x] PosCombine - Position is dependent if `Pos.Has [one of the above]` - it can cause a change in `us.ContentSize`
@@ -98,11 +98,11 @@ internal override int Calculate (int location, int superviewContentSize, View us
9898
// [ ] PosPercent - Position is dependent `us.ContentSize` - Will always be 0 if there is no other content that makes the superview have a size.
9999
// [x] PosCombine - Position is dependent if `Pos.Has [one of the above]` - it can cause a change in `us.ContentSize`
100100

101-
// -------------------- Pos types that are not dependent on either `us.Subviews` or `us.ContentSize`
101+
// -------------------- Pos types that are not dependent on either `us.SubViews` or `us.ContentSize`
102102
// [ ] PosAbsolute - Position is fixed.
103103
// [ ] PosFunc - Position is internally calculated.
104104

105-
// -------------------- Dim types that are dependent on `us.Subviews`
105+
// -------------------- Dim types that are dependent on `us.SubViews`
106106
// [x] DimView - Dimension is dependent on `subview.Target`
107107
// [x] DimCombine - Dimension is dependent if `Dim.Has [one of the above]` - it can cause a change in `us.ContentSize`
108108

@@ -111,7 +111,7 @@ internal override int Calculate (int location, int superviewContentSize, View us
111111
// [ ] DimPercent - Dimension is dependent on `us.ContentSize` - Will always be 0 if there is no other content that makes the superview have a size.
112112
// [ ] DimCombine - Dimension is dependent if `Dim.Has [one of the above]`
113113

114-
// -------------------- Dim types that are not dependent on either `us.Subviews` or `us.ContentSize`
114+
// -------------------- Dim types that are not dependent on either `us.SubViews` or `us.ContentSize`
115115
// [ ] DimAuto - Dimension is internally calculated
116116
// [ ] DimAbsolute - Dimension is fixed
117117
// [ ] DimFunc - Dimension is internally calculated
@@ -128,7 +128,7 @@ internal override int Calculate (int location, int superviewContentSize, View us
128128

129129
if (dimension == Dimension.Width)
130130
{
131-
notDependentSubViews = includedSubviews.Where (
131+
notDependentSubViews = includedSubViews.Where (
132132
v => v.Width is { }
133133
&& (v.X is PosAbsolute or PosFunc
134134
|| v.Width is DimAuto
@@ -144,7 +144,7 @@ or DimAbsolute
144144
}
145145
else
146146
{
147-
notDependentSubViews = includedSubviews.Where (
147+
notDependentSubViews = includedSubViews.Where (
148148
v => v.Height is { }
149149
&& (v.Y is PosAbsolute or PosFunc
150150
|| v.Height is DimAuto
@@ -197,11 +197,11 @@ or DimAbsolute
197197

198198
if (dimension == Dimension.Width)
199199
{
200-
centeredSubViews = us.InternalSubviews.Where (v => v.X.Has<PosCenter> (out _)).ToList ();
200+
centeredSubViews = us.InternalSubViews.Where (v => v.X.Has<PosCenter> (out _)).ToList ();
201201
}
202202
else
203203
{
204-
centeredSubViews = us.InternalSubviews.Where (v => v.Y.Has<PosCenter> (out _)).ToList ();
204+
centeredSubViews = us.InternalSubViews.Where (v => v.Y.Has<PosCenter> (out _)).ToList ();
205205
}
206206

207207
viewsNeedingLayout.AddRange (centeredSubViews);
@@ -241,7 +241,7 @@ or DimAbsolute
241241
var maxAlign = 0;
242242

243243
// Use Linq to get a list of distinct GroupIds from the subviews
244-
List<int> groupIds = includedSubviews.Select (
244+
List<int> groupIds = includedSubViews.Select (
245245
v =>
246246
{
247247
return dimension switch
@@ -259,7 +259,7 @@ Dimension.Height when v.Y.Has<PosAlign> (out PosAlign posAlign) =>
259259
foreach (int groupId in groupIds.Where (g => g != -1))
260260
{
261261
// PERF: If this proves a perf issue, consider caching a ref to this list in each item
262-
List<PosAlign?> posAlignsInGroup = includedSubviews.Where (v => PosAlign.HasGroupId (v, dimension, groupId))
262+
List<PosAlign?> posAlignsInGroup = includedSubViews.Where (v => PosAlign.HasGroupId (v, dimension, groupId))
263263
.Select (v => dimension == Dimension.Width ? v.X as PosAlign : v.Y as PosAlign)
264264
.ToList ();
265265

@@ -268,7 +268,7 @@ Dimension.Height when v.Y.Has<PosAlign> (out PosAlign posAlign) =>
268268
continue;
269269
}
270270

271-
maxAlign = PosAlign.CalculateMinDimension (groupId, includedSubviews, dimension);
271+
maxAlign = PosAlign.CalculateMinDimension (groupId, includedSubViews, dimension);
272272
}
273273

274274
maxCalculatedSize = int.Max (maxCalculatedSize, maxAlign);
@@ -282,11 +282,11 @@ Dimension.Height when v.Y.Has<PosAlign> (out PosAlign posAlign) =>
282282

283283
if (dimension == Dimension.Width)
284284
{
285-
anchoredSubViews = includedSubviews.Where (v => v.X.Has<PosAnchorEnd> (out _)).ToList ();
285+
anchoredSubViews = includedSubViews.Where (v => v.X.Has<PosAnchorEnd> (out _)).ToList ();
286286
}
287287
else
288288
{
289-
anchoredSubViews = includedSubviews.Where (v => v.Y.Has<PosAnchorEnd> (out _)).ToList ();
289+
anchoredSubViews = includedSubViews.Where (v => v.Y.Has<PosAnchorEnd> (out _)).ToList ();
290290
}
291291

292292
viewsNeedingLayout.AddRange (anchoredSubViews);
@@ -324,11 +324,11 @@ Dimension.Height when v.Y.Has<PosAlign> (out PosAlign posAlign) =>
324324

325325
if (dimension == Dimension.Width)
326326
{
327-
posViewSubViews = includedSubviews.Where (v => v.X.Has<PosView> (out _)).ToList ();
327+
posViewSubViews = includedSubViews.Where (v => v.X.Has<PosView> (out _)).ToList ();
328328
}
329329
else
330330
{
331-
posViewSubViews = includedSubviews.Where (v => v.Y.Has<PosView> (out _)).ToList ();
331+
posViewSubViews = includedSubViews.Where (v => v.Y.Has<PosView> (out _)).ToList ();
332332
}
333333

334334
for (var i = 0; i < posViewSubViews.Count; i++)
@@ -358,11 +358,11 @@ Dimension.Height when v.Y.Has<PosAlign> (out PosAlign posAlign) =>
358358

359359
if (dimension == Dimension.Width)
360360
{
361-
dimViewSubViews = includedSubviews.Where (v => v.Width is { } && v.Width.Has<DimView> (out _)).ToList ();
361+
dimViewSubViews = includedSubViews.Where (v => v.Width is { } && v.Width.Has<DimView> (out _)).ToList ();
362362
}
363363
else
364364
{
365-
dimViewSubViews = includedSubviews.Where (v => v.Height is { } && v.Height.Has<DimView> (out _)).ToList ();
365+
dimViewSubViews = includedSubViews.Where (v => v.Height is { } && v.Height.Has<DimView> (out _)).ToList ();
366366
}
367367

368368
for (var i = 0; i < dimViewSubViews.Count; i++)
@@ -391,11 +391,11 @@ Dimension.Height when v.Y.Has<PosAlign> (out PosAlign posAlign) =>
391391

392392
if (dimension == Dimension.Width)
393393
{
394-
dimAutoSubViews = includedSubviews.Where (v => v.Width is { } && v.Width.Has<DimAuto> (out _)).ToList ();
394+
dimAutoSubViews = includedSubViews.Where (v => v.Width is { } && v.Width.Has<DimAuto> (out _)).ToList ();
395395
}
396396
else
397397
{
398-
dimAutoSubViews = includedSubviews.Where (v => v.Height is { } && v.Height.Has<DimAuto> (out _)).ToList ();
398+
dimAutoSubViews = includedSubViews.Where (v => v.Height is { } && v.Height.Has<DimAuto> (out _)).ToList ();
399399
}
400400

401401
for (var i = 0; i < dimAutoSubViews.Count; i++)
@@ -423,11 +423,11 @@ Dimension.Height when v.Y.Has<PosAlign> (out PosAlign posAlign) =>
423423

424424
//if (dimension == Dimension.Width)
425425
//{
426-
// DimFillSubViews = includedSubviews.Where (v => v.Width is { } && v.Width.Has<DimFill> (out _)).ToList ();
426+
// DimFillSubViews = includedSubViews.Where (v => v.Width is { } && v.Width.Has<DimFill> (out _)).ToList ();
427427
//}
428428
//else
429429
//{
430-
// DimFillSubViews = includedSubviews.Where (v => v.Height is { } && v.Height.Has<DimFill> (out _)).ToList ();
430+
// DimFillSubViews = includedSubViews.Where (v => v.Height is { } && v.Height.Has<DimFill> (out _)).ToList ();
431431
//}
432432

433433
//for (var i = 0; i < DimFillSubViews.Count; i++)

Terminal.Gui/View/Layout/DimAutoStyle.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ namespace Terminal.Gui;
1010
public enum DimAutoStyle
1111
{
1212
/// <summary>
13-
/// The dimensions will be computed based on the View's <see cref="View.GetContentSize ()"/> and/or <see cref="View.Subviews"/>.
13+
/// The dimensions will be computed based on the View's <see cref="View.GetContentSize ()"/> and/or <see cref="View.SubViews"/>.
1414
/// <para>
1515
/// If <see cref="View.ContentSizeTracksViewport"/> is <see langword="true"/>, <see cref="View.GetContentSize ()"/> will be used to determine the dimension.
1616
/// </para>
1717
/// <para>
18-
/// Otherwise, the Subview in <see cref="View.Subviews"/> with the largest corresponding position plus dimension
18+
/// Otherwise, the SubView in <see cref="View.SubViews"/> with the largest corresponding position plus dimension
1919
/// will determine the dimension.
2020
/// </para>
2121
/// <para>
@@ -31,7 +31,7 @@ public enum DimAutoStyle
3131
/// will be used to determine the dimension.
3232
/// </para>
3333
/// <para>
34-
/// The corresponding dimensions of <see cref="View.GetContentSize ()"/> and/or <see cref="View.Subviews"/> will be ignored.
34+
/// The corresponding dimensions of <see cref="View.GetContentSize ()"/> and/or <see cref="View.SubViews"/> will be ignored.
3535
/// </para>
3636
/// <para>
3737
/// If <see cref="DimAuto.MaximumContentDim"/> is set, the dimension will be the maximum of the formatted text and the
@@ -42,7 +42,7 @@ public enum DimAutoStyle
4242

4343
/// <summary>
4444
/// The dimension will be computed using the largest of the view's <see cref="View.Text"/>, <see cref="View.GetContentSize ()"/>, and
45-
/// <see cref="View.Subviews"/> corresponding dimension
45+
/// <see cref="View.SubViews"/> corresponding dimension
4646
/// </summary>
4747
Auto = Content | Text,
4848
}

Terminal.Gui/View/Layout/LayoutEventArgs.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace Terminal.Gui;
22

3-
/// <summary>Event arguments for the <see cref="View.SubviewsLaidOut"/> event.</summary>
3+
/// <summary>Event arguments for the <see cref="View.SubViewsLaidOut"/> event.</summary>
44
public class LayoutEventArgs : EventArgs
55
{
66
/// <summary>Creates a new instance of the <see cref="Terminal.Gui.LayoutEventArgs"/> class.</summary>

Terminal.Gui/View/Layout/PosAlign.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ internal override int Calculate (int superviewDimension, Dim dim, View us, Dimen
117117
}
118118
else
119119
{
120-
groupViews = us.SuperView!.Subviews.Where (v => HasGroupId (v, dimension, GroupId)).ToList ();
120+
groupViews = us.SuperView!.SubViews.Where (v => HasGroupId (v, dimension, GroupId)).ToList ();
121121
}
122122

123123
AlignAndUpdateGroup (GroupId, groupViews, dimension, superviewDimension);

0 commit comments

Comments
 (0)