diff --git a/Terminal.Gui/View/Layout/PosDim.cs b/Terminal.Gui/View/Layout/PosDim.cs index f48888b02..4941f1363 100644 --- a/Terminal.Gui/View/Layout/PosDim.cs +++ b/Terminal.Gui/View/Layout/PosDim.cs @@ -43,7 +43,7 @@ /// /// /// -/// +/// /// /// /// Creates a object that is anchored to the end (right side or bottom) of @@ -142,7 +142,8 @@ public class Pos /// /// Creates a object that is anchored to the end (right side or bottom) of the SuperView, - /// useful to flush the layout from the right or bottom. + /// useful to flush the layout from the right or bottom. See also , which uses the view + /// dimension to ensure the view is fully visible. /// /// The object anchored to the end (the bottom or the right side). /// The view will be shifted left or up by the amount specified. @@ -315,6 +316,13 @@ public class Pos /// The that will be tracked. public static Pos Y (View view) { return new PosView (view, Side.Y); } + /// + /// Used to calculate a position that is anchored to a certain point in the layout. This method is typically used internally by the layout system to determine where a View should be positioned. + /// + /// The width of the area where the View is being positioned (Superview.ContentSize). + /// An integer representing the calculated position. The way this position is calculated depends on the specific + /// subclass of Pos that is used. For example, PosAbsolute returns a fixed position, PosAnchorEnd returns a + /// position that is anchored to the end of the layout, and so on. internal virtual int Anchor (int width) { return 0; } /// @@ -682,6 +690,15 @@ public class Dim /// The view that will be tracked. public static Dim Width (View view) { return new DimView (view, Side.Width); } + /// + /// Used to calculate a dimension that is anchored to a certain point in the layout. + /// This method is typically used internally by the layout system to determine the size of a View. + /// + /// The width of the area where the View is being sized (Superview.ContentSize). + /// An integer representing the calculated dimension. The way this dimension is calculated depends on the specific + /// subclass of Dim that is used. For example, DimAbsolute returns a fixed dimension, DimFactor returns a + /// dimension that is a certain percentage of the super view's size, and so on. + internal virtual int Anchor (int width) { return 0; } ///