-
Notifications
You must be signed in to change notification settings - Fork 0
ScrollContainer
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.ScrollContainer |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Clips and scrolls direct child controls inside a viewport-sized rectangle.
public class Electron2D.ScrollContainer : Electron2D.ContainerProfile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: ScrollContainer
Scrollable clipped UI container with programmatic offsets, axis modes and descendant reveal helper.
ScrollContainer stores programmatic scroll offsets and offsets visible
child controls by those values. It does not create public scrollbar nodes in
the 0.1.0 Preview runtime.
This type is not synchronized. Create and mutate it on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.ContainerElectron2D.ScrollMode
| Member | Kind | Summary |
|---|---|---|
DrawFocusBorder |
Property | Gets or sets whether a focus border should be drawn by future widget renderers. |
FollowFocus |
Property | Gets or sets whether focused descendant controls should be revealed automatically. |
HorizontalScrollMode |
Property | Gets or sets the horizontal scroll mode. |
ScrollDeadzone |
Property | Gets or sets the deadzone used by future drag-scroll handling. |
ScrollHintMode |
Property | Gets or sets the scroll hint mode. |
ScrollHorizontal |
Property | Gets or sets the horizontal scroll offset. |
ScrollHorizontalByDefault |
Property | Gets or sets whether horizontal scrolling is preferred by default. |
ScrollHorizontalCustomStep |
Property | Gets or sets the custom horizontal scroll step. |
ScrollVertical |
Property | Gets or sets the vertical scroll offset. |
ScrollVerticalCustomStep |
Property | Gets or sets the custom vertical scroll step. |
TileScrollHint |
Property | Gets or sets whether scroll hints should be tiled by future renderers. |
VerticalScrollMode |
Property | Gets or sets the vertical scroll mode. |
Electron2D.ScrollContainer() |
Constructor | Initializes a new instance of the Electron2D.ScrollContainer type. |
EnsureControlVisible(Electron2D.Control) |
Method | Scrolls until the specified descendant control is visible. |
Kind: Property
public System.Boolean DrawFocusBorder { get; set; }Gets or sets whether a focus border should be drawn by future widget renderers.
The preview runtime stores this UI policy value but does not render a built-in focus border yet.
true to request a focus border; otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Kind: Property
public System.Boolean FollowFocus { get; set; }Gets or sets whether focused descendant controls should be revealed automatically.
Automatic focus following is stored for API compatibility. Manual
reveal is available through Electron2D.ScrollContainer.EnsureControlVisible(Electron2D.Control).
true to let future focus handling reveal focused descendants;
otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.ScrollContainer.EnsureControlVisible(Electron2D.Control)
Kind: Property
public Electron2D.ScrollMode HorizontalScrollMode { get; set; }Gets or sets the horizontal scroll mode.
Electron2D.ScrollMode.Disabled clamps Electron2D.ScrollContainer.ScrollHorizontal
to zero during layout. Other values keep programmatic scrolling enabled.
The current Electron2D.ScrollMode for the horizontal axis.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.ScrollContainer.VerticalScrollMode
Kind: Property
public System.Int32 ScrollDeadzone { get; set; }Gets or sets the deadzone used by future drag-scroll handling.
Drag-scroll input is outside this task. The value is validated and stored so higher-level controls can share the same public API.
A non-negative number of pixels.
-
System.ArgumentOutOfRangeException: Thrown when the value is less than zero.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Kind: Property
public Electron2D.ScrollHintMode ScrollHintMode { get; set; }Gets or sets the scroll hint mode.
The value is stored for future visual hint rendering and does not change layout in the 0.1.0 Preview runtime.
The current Electron2D.ScrollHintMode.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Kind: Property
public System.Int32 ScrollHorizontal { get; set; }Gets or sets the horizontal scroll offset.
The value is clamped during layout according to content size and
Electron2D.ScrollContainer.HorizontalScrollMode.
The non-negative horizontal offset in pixels.
-
System.ArgumentOutOfRangeException: Thrown when the value is less than zero.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.ScrollContainer.ScrollVertical
Kind: Property
public System.Boolean ScrollHorizontalByDefault { get; set; }Gets or sets whether horizontal scrolling is preferred by default.
The value is stored for input policy and does not affect layout.
true to prefer horizontal scroll gestures; otherwise,
false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Kind: Property
public System.Single ScrollHorizontalCustomStep { get; set; }Gets or sets the custom horizontal scroll step.
The preview runtime stores the step for future input handling.
A positive finite step value, or a negative value to use the default.
-
System.ArgumentOutOfRangeException: Thrown when the value is zero or not finite.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Kind: Property
public System.Int32 ScrollVertical { get; set; }Gets or sets the vertical scroll offset.
The value is clamped during layout according to content size and
Electron2D.ScrollContainer.VerticalScrollMode.
The non-negative vertical offset in pixels.
-
System.ArgumentOutOfRangeException: Thrown when the value is less than zero.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.ScrollContainer.ScrollHorizontal
Kind: Property
public System.Single ScrollVerticalCustomStep { get; set; }Gets or sets the custom vertical scroll step.
The preview runtime stores the step for future input handling.
A positive finite step value, or a negative value to use the default.
-
System.ArgumentOutOfRangeException: Thrown when the value is zero or not finite.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Kind: Property
public System.Boolean TileScrollHint { get; set; }Gets or sets whether scroll hints should be tiled by future renderers.
The value is stored for future visual hint rendering.
true to request tiled hints; otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Kind: Property
public Electron2D.ScrollMode VerticalScrollMode { get; set; }Gets or sets the vertical scroll mode.
Electron2D.ScrollMode.Disabled clamps Electron2D.ScrollContainer.ScrollVertical to
zero during layout. Other values keep programmatic scrolling enabled.
The current Electron2D.ScrollMode for the vertical axis.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.ScrollContainer.HorizontalScrollMode
Kind: Constructor
public Electron2D.ScrollContainer()Initializes a new instance of the Electron2D.ScrollContainer type.
The new scroll container enables Electron2D.Control.ClipContents so
pointer hit-testing is clipped to the viewport rectangle by default.
This constructor is not synchronized. Call it on the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.Control.ClipContents
Kind: Method
public System.Void EnsureControlVisible(Electron2D.Control)(Electron2D.Control control)Scrolls until the specified descendant control is visible.
The method adjusts Electron2D.ScrollContainer.ScrollHorizontal and
Electron2D.ScrollContainer.ScrollVertical so the descendant rectangle fits inside
this container's current Electron2D.Control.Size when possible.
-
control: The descendant control that should be made visible inside this scroll container.
-
System.ArgumentNullException: Thrown whencontrolisnull. -
System.InvalidOperationException: Thrown whencontrolis not a descendant of this scroll container.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.ScrollContainer.ScrollHorizontalElectron2D.ScrollContainer.ScrollVertical
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.