namespace Terminal.Gui; /// /// Settings for how the behaves. /// /// /// See the Layout Deep Dive for more information: /// /// [Flags] public enum ViewportSettings { /// /// No settings. /// None = 0b_0000, /// /// 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 = 0b_0001, /// /// 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 = 0b_0010, /// /// 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 = 0b_0100, /// /// 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 = 0b_1000, /// /// 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 = 0b_0001_0000, /// /// 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 = 0b_0010_0000, /// /// 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 = 0b_0100_0000, /// /// 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 = 0b_1000_0000, /// /// If set the View will be transparent: The will not be cleared when the View is drawn and the clip region /// will be set to clip the View's and . /// /// Only the topmost View in a SubView Hierarchy can be transparent. Any subviews of the topmost transparent view /// will have indeterminate draw behavior. /// /// /// Combine this with to get a view that is both visually transparent and transparent to the mouse. /// /// Transparent = 0b_0001_0000_0000, /// /// If set the View will be transparent to mouse events: Any mouse event that occurs over the View (and it's SubViews) will be passed to the /// Views below it. /// /// Combine this with to get a view that is both visually transparent and transparent to the mouse. /// /// TransparentMouse = 0b_0010_0000_0000, }