|
@@ -3,6 +3,9 @@
|
|
|
/// <summary>
|
|
|
/// Settings for how the <see cref="View.Viewport"/> behaves relative to the View's Content area.
|
|
|
/// </summary>
|
|
|
+/// <remarks>
|
|
|
+/// See the Layout Deep Dive for more information: <see href="https://gui-cs.github.io/Terminal.GuiV2Docs/docs/layout.html"/>
|
|
|
+/// </remarks>
|
|
|
[Flags]
|
|
|
public enum ViewportSettings
|
|
|
{
|
|
@@ -15,43 +18,35 @@ public enum ViewportSettings
|
|
|
/// If set, <see cref="View.Viewport"/><c>.X</c> can be set to negative values enabling scrolling beyond the left of
|
|
|
/// the
|
|
|
/// content area.
|
|
|
- /// </summary>
|
|
|
- /// <remarks>
|
|
|
/// <para>
|
|
|
/// When not set, <see cref="View.Viewport"/><c>.X</c> is constrained to positive values.
|
|
|
/// </para>
|
|
|
- /// </remarks>
|
|
|
+ /// </summary>
|
|
|
AllowNegativeX = 1,
|
|
|
|
|
|
/// <summary>
|
|
|
/// If set, <see cref="View.Viewport"/><c>.Y</c> can be set to negative values enabling scrolling beyond the top of the
|
|
|
/// content area.
|
|
|
- /// </summary>
|
|
|
- /// <remarks>
|
|
|
/// <para>
|
|
|
/// When not set, <see cref="View.Viewport"/><c>.Y</c> is constrained to positive values.
|
|
|
/// </para>
|
|
|
- /// </remarks>
|
|
|
+ /// </summary>
|
|
|
AllowNegativeY = 2,
|
|
|
|
|
|
/// <summary>
|
|
|
/// If set, <see cref="View.Viewport"/><c>.Size</c> can be set to negative coordinates enabling scrolling beyond the
|
|
|
/// top-left of the
|
|
|
/// content area.
|
|
|
- /// </summary>
|
|
|
- /// <remarks>
|
|
|
/// <para>
|
|
|
/// When not set, <see cref="View.Viewport"/><c>.Size</c> is constrained to positive coordinates.
|
|
|
/// </para>
|
|
|
- /// </remarks>
|
|
|
+ /// </summary>
|
|
|
AllowNegativeLocation = AllowNegativeX | AllowNegativeY,
|
|
|
|
|
|
/// <summary>
|
|
|
/// If set, <see cref="View.Viewport"/><c>.X</c> can be set values greater than <see cref="View.GetContentSize ()"/>
|
|
|
/// <c>.Width</c> enabling scrolling beyond the right
|
|
|
/// of the content area.
|
|
|
- /// </summary>
|
|
|
- /// <remarks>
|
|
|
/// <para>
|
|
|
/// When not set, <see cref="View.Viewport"/><c>.X</c> is constrained to <see cref="View.GetContentSize ()"/>
|
|
|
/// <c>.Width - 1</c>.
|
|
@@ -61,15 +56,13 @@ public enum ViewportSettings
|
|
|
/// <para>
|
|
|
/// The practical effect of this is that the last column of the content will always be visible.
|
|
|
/// </para>
|
|
|
- /// </remarks>
|
|
|
+ /// </summary>
|
|
|
AllowXGreaterThanContentWidth = 4,
|
|
|
|
|
|
/// <summary>
|
|
|
/// If set, <see cref="View.Viewport"/><c>.Y</c> can be set values greater than <see cref="View.GetContentSize ()"/>
|
|
|
/// <c>.Height</c> enabling scrolling beyond the right
|
|
|
/// of the content area.
|
|
|
- /// </summary>
|
|
|
- /// <remarks>
|
|
|
/// <para>
|
|
|
/// When not set, <see cref="View.Viewport"/><c>.Y</c> is constrained to <see cref="View.GetContentSize ()"/>
|
|
|
/// <c>.Height - 1</c>.
|
|
@@ -79,21 +72,19 @@ public enum ViewportSettings
|
|
|
/// <para>
|
|
|
/// The practical effect of this is that the last row of the content will always be visible.
|
|
|
/// </para>
|
|
|
- /// </remarks>
|
|
|
+ /// </summary>
|
|
|
AllowYGreaterThanContentHeight = 8,
|
|
|
|
|
|
/// <summary>
|
|
|
/// If set, <see cref="View.Viewport"/><c>.Size</c> can be set values greater than <see cref="View.GetContentSize ()"/>
|
|
|
/// enabling scrolling beyond the bottom-right
|
|
|
/// of the content area.
|
|
|
- /// </summary>
|
|
|
- /// <remarks>
|
|
|
/// <para>
|
|
|
/// When not set, <see cref="View.Viewport"/> is constrained to <see cref="View.GetContentSize ()"/><c> -1</c>.
|
|
|
/// This means the last column and row of the content will remain visible even if there is an attempt to
|
|
|
/// scroll the Viewport past the last column or row.
|
|
|
/// </para>
|
|
|
- /// </remarks>
|
|
|
+ /// </summary>
|
|
|
AllowLocationGreaterThanContentSize = AllowXGreaterThanContentWidth | AllowYGreaterThanContentHeight,
|
|
|
|
|
|
/// <summary>
|
|
@@ -106,10 +97,10 @@ public enum ViewportSettings
|
|
|
/// If set <see cref="View.Clear()"/> will clear only the portion of the content
|
|
|
/// area that is visible within the <see cref="View.Viewport"/>. This is useful for views that have a
|
|
|
/// content area larger than the Viewport and want the area outside the content to be visually distinct.
|
|
|
+ /// <para>
|
|
|
+ /// <see cref="ClipContentOnly"/> must be set for this setting to work (clipping beyond the visible area must be
|
|
|
+ /// disabled).
|
|
|
+ /// </para>
|
|
|
/// </summary>
|
|
|
- /// <remarks>
|
|
|
- /// <see cref="ClipContentOnly"/> must be set for this setting to work (clipping beyond the visible area must be
|
|
|
- /// disabled).
|
|
|
- /// </remarks>
|
|
|
ClearContentOnly = 32
|
|
|
-}
|
|
|
+}
|