namespace Terminal.Gui; /// /// Settings for how the behaves relative to the View's Content area. /// /// /// See the Layout Deep Dive for more information: /// /// [Flags] public enum ViewportSettings { /// /// No settings. /// None = 0, /// /// If set, .X can be set to negative values enabling scrolling beyond the left of /// the /// content area. /// /// When not set, .X is constrained to positive values. /// /// AllowNegativeX = 1, /// /// If set, .Y can be set to negative values enabling scrolling beyond the top of the /// content area. /// /// When not set, .Y is constrained to positive values. /// /// AllowNegativeY = 2, /// /// If set, .Size can be set to negative coordinates enabling scrolling beyond the /// top-left of the /// content area. /// /// When not set, .Size is constrained to positive coordinates. /// /// AllowNegativeLocation = AllowNegativeX | AllowNegativeY, /// /// If set, .X can be set values greater than /// .Width enabling scrolling beyond the right /// of the content area. /// /// When not set, .X is constrained to /// .Width - 1. /// This means the last column of the content will remain visible even if there is an attempt to scroll the /// Viewport past the last column. /// /// /// The practical effect of this is that the last column of the content will always be visible. /// /// AllowXGreaterThanContentWidth = 4, /// /// If set, .Y can be set values greater than /// .Height enabling scrolling beyond the right /// of the content area. /// /// When not set, .Y is constrained to /// .Height - 1. /// This means the last row of the content will remain visible even if there is an attempt to scroll the Viewport /// past the last row. /// /// /// The practical effect of this is that the last row of the content will always be visible. /// /// AllowYGreaterThanContentHeight = 8, /// /// If set, .Location can be set values greater than /// /// enabling scrolling beyond the bottom-right /// of the content area. /// /// When not set, is constrained to -1. /// 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. /// /// AllowLocationGreaterThanContentSize = AllowXGreaterThanContentWidth | AllowYGreaterThanContentHeight, /// /// If set and .Width is greater than /// .Width .X can be negative. /// /// When not set, .X will be constrained to non-negative values when /// .Width is greater than /// .Width, preventing /// scrolling beyond the left of the Viewport. /// /// /// This can be useful in infinite scrolling scenarios. /// /// AllowNegativeXWhenWidthGreaterThanContentWidth = 16, /// /// If set and .Height is greater than /// .Height .Y can be negative. /// /// When not set, .Y will be constrained to non-negative values when /// .Height is greater than /// .Height, preventing /// scrolling above the top of the Viewport. /// /// /// This can be useful in infinite scrolling scenarios. /// /// AllowNegativeYWhenHeightGreaterThanContentHeight = 32, /// /// The combination of and /// . /// AllowNegativeLocationWhenSizeGreaterThanContentSize = AllowNegativeXWhenWidthGreaterThanContentWidth | AllowNegativeYWhenHeightGreaterThanContentHeight, /// /// By default, clipping is applied to the . Setting this flag will cause clipping to be /// applied to the visible content area. /// ClipContentOnly = 64, /// /// If set will clear only the portion of the content /// area that is visible within the . 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. /// must be set for this setting to work (clipping beyond the visible area must be /// disabled). /// ClearContentOnly = 128 }