-
Notifications
You must be signed in to change notification settings - Fork 0
Container
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Container |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Provides the base control for nodes that arrange direct child controls.
public class Electron2D.Container : Electron2D.ControlContainer is the common base for layout controls in the 0.1.0 Preview
UI surface. It only arranges direct children that inherit from
Electron2D.Control and leaves other child nodes untouched.
Layout is recalculated during the scene tree process step. Call
Electron2D.Container.QueueSort after changing custom container state when an
immediate frame has not already been scheduled by the caller.
This type is not synchronized. Create and mutate containers on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.ControlElectron2D.HBoxContainerElectron2D.VBoxContainer
| Member | Kind | Summary |
|---|---|---|
Electron2D.Container() |
Constructor | Initializes a new instance of the Electron2D.Container type. |
FitChildInRect(Electron2D.Control, Electron2D.Rect2) |
Method | Fits a direct child control inside a local rectangle. |
QueueSort() |
Method | Queues this container for a layout recalculation. |
_Process(System.Double) |
Method | Called every process frame to recalculate queued container layout. |
Kind: Constructor
public Electron2D.Container()Initializes a new instance of the Electron2D.Container type.
The new container starts with layout queued so its children are arranged on the next scene tree process step.
This constructor is not synchronized. Call it on the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.Container.QueueSort
Kind: Method
public System.Void FitChildInRect(Electron2D.Control, Electron2D.Rect2)(Electron2D.Control child, Electron2D.Rect2 rect)Fits a direct child control inside a local rectangle.
This method resets the child anchors to the local rectangle mode used by
containers, then writes the final position and size through the public
Electron2D.Control.Position and Electron2D.Control.Size API.
A child is never made smaller than
Electron2D.Control.GetCombinedMinimumSize. If rect
is too small, the child may extend past the rectangle.
-
child: The direct child control to place. -
rect: The local rectangle assigned tochild.
-
System.ArgumentNullException: Thrown whenchildisnull. -
System.ArgumentOutOfRangeException: Thrown whenrectcontains a negative size or a non-finite component. -
System.InvalidOperationException: Thrown whenchildis not a direct child of this container.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Container.QueueSortElectron2D.Control.GetCombinedMinimumSize
Kind: Method
public System.Void QueueSort()()Queues this container for a layout recalculation.
The preview runtime recalculates container layout during
Electron2D.Node._Process(System.Double). Multiple calls before a frame are
coalesced.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Container.FitChildInRect(Electron2D.Control,Electron2D.Rect2)
Kind: Method
public System.Void _Process(System.Double)(System.Double delta)Called every process frame to recalculate queued container layout.
Container layout is recalculated every process frame in the preview runtime so parent size changes are reflected without requiring a hidden resize notification system.
-
delta: The elapsed frame time in seconds.
This method is not synchronized. The scene tree calls it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Container.QueueSort
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.