Enum ViewportSettingsFlags
Settings for how the Viewport behaves.
[Flags]
public enum ViewportSettingsFlags
Fields
AllowLocationGreaterThanContentSize = AllowXGreaterThanContentWidth | AllowYGreaterThanContentHeightCombines AllowXGreaterThanContentWidth and AllowYGreaterThanContentHeight.
AllowLocationPlusSizeGreaterThanContentSize = AllowXPlusWidthGreaterThanContentWidth | AllowYPlusHeightGreaterThanContentHeightCombines AllowXPlusWidthGreaterThanContentWidth and AllowYPlusHeightGreaterThanContentHeight. Allows blank space to appear when scrolling in either direction.
AllowNegativeLocation = AllowNegativeX | AllowNegativeYCombines AllowNegativeX and AllowNegativeY.
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 exceedContentSize.Width - 1, enabling scrolling beyond the right of the content.When not set,
Viewport.Xis clamped to keep at least the last column visible.AllowXPlusWidthGreaterThanContentWidth = 64If set,
Viewport.X + Viewport.Widthcan exceedContentSize.Width, allowing blank space on the right when scrolling.When not set (default),
Viewport.Xis clamped so the content always fills the viewport horizontally.AllowYGreaterThanContentHeight = 8If set, Viewport
.Ycan exceedContentSize.Height - 1, enabling scrolling beyond the bottom of the content.When not set,
Viewport.Yis clamped to keep at least the last row visible.AllowYPlusHeightGreaterThanContentHeight = 128If set,
Viewport.Y + Viewport.Heightcan exceedContentSize.Height, allowing blank space at the bottom when scrolling.When not set (default),
Viewport.Yis clamped so the content always fills the viewport vertically.ClearContentOnly = 512If 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 = 256By 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 = 1024If 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 = 2048If 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