Enum ViewportSettingsFlags
Settings for how the Viewport behaves.
[Flags]
public enum ViewportSettingsFlags
Fields
AllowLocationGreaterThanContentSize = AllowXGreaterThanContentWidth | AllowYGreaterThanContentHeightIf set, Viewport
.Locationcan be set values greater than GetContentSize() enabling scrolling beyond the bottom-right of the content area.When not set, Viewport is constrained to GetContentSize()
-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.AllowNegativeLocation = AllowNegativeX | AllowNegativeYIf set, Viewport
.Sizecan be set to negative coordinates enabling scrolling beyond the top-left of the content area.When not set, Viewport
.Sizeis constrained to positive coordinates.AllowNegativeLocationWhenSizeGreaterThanContentSize = AllowNegativeXWhenWidthGreaterThanContentWidth | AllowNegativeYWhenHeightGreaterThanContentHeightThe combination of AllowNegativeXWhenWidthGreaterThanContentWidth and AllowNegativeYWhenHeightGreaterThanContentHeight.
AllowNegativeX = 1If set, Viewport
.Xcan be set to negative values enabling scrolling beyond the left of the content area.When not set, Viewport
.Xis constrained to positive values.AllowNegativeXWhenWidthGreaterThanContentWidth = 16If set and Viewport
.Widthis greater than GetContentSize().WidthViewport.Xcan be negative.When not set, Viewport
.Xwill be constrained to non-negative values when Viewport.Widthis greater than GetContentSize().Width, preventing scrolling beyond the left of the Viewport.This can be useful in infinite scrolling scenarios.
AllowNegativeY = 2If set, Viewport
.Ycan be set to negative values enabling scrolling beyond the top of the content area.When not set, Viewport
.Yis constrained to positive values.AllowNegativeYWhenHeightGreaterThanContentHeight = 32If set and Viewport
.Heightis greater than GetContentSize().HeightViewport.Ycan be negative.When not set, Viewport
.Ywill be constrained to non-negative values when Viewport.Heightis greater than GetContentSize().Height, preventing scrolling above the top of the Viewport.This can be useful in infinite scrolling scenarios.
AllowXGreaterThanContentWidth = 4If set, Viewport
.Xcan be set values greater than GetContentSize().Widthenabling scrolling beyond the right of the content area.When not set, Viewport
.Xis constrained to GetContentSize().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.
AllowYGreaterThanContentHeight = 8If set, Viewport
.Ycan be set values greater than GetContentSize().Heightenabling scrolling beyond the right of the content area.When not set, Viewport
.Yis constrained to GetContentSize().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.
ClearContentOnly = 128If set ClearViewport(DrawContext?) will clear only the portion of the content area that is visible within the 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. ClipContentOnly must be set for this setting to work (clipping beyond the visible area must be disabled).
ClipContentOnly = 64By default, clipping is applied to the Viewport. Setting this flag will cause clipping to be applied to the visible content area.
None = 0No settings.
Transparent = 256If set the View will be transparent: The Viewport will not be cleared when the View is drawn and the clip region will be set to clip the View's Text and SubViews.
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 TransparentMouse to get a view that is both visually transparent and transparent to the mouse.
TransparentMouse = 512If set the View will be transparent to mouse events: Specifically, any mouse event that occurs over the View that is NOT occupied by a SubView will not be captured by the View.
Combine this with Transparent to get a view that is both visually transparent and transparent to the mouse.
Remarks
See the Layout Deep Dive for more information: https://gui-cs.github.io/Terminal.Gui/docs/layout.html