ComputedViewSize

ceramic.ComputedViewSize (Class)

Represents computed size information for a View during the layout process.

This class is used internally by the View system to pass sizing constraints and computed dimensions between parent and child views during layout calculations. It supports object pooling for performance optimization.

The NO_SIZE constant indicates that a dimension has not been computed or constrained.

Static Members

ui
NO_SIZE: Float

Sentinel value indicating that a size dimension has not been set or computed. This special value is used to distinguish unset dimensions from zero dimensions.


Gets a ComputedViewSize instance from the object pool. The instance is reset to default values before being returned.

Returns Description
ComputedViewSize A reset ComputedViewSize instance ready for use

Instance Members

ui
parentLayoutMask: ViewLayoutMask

The layout mask from the parent view, indicating sizing constraints. Determines how the child view should calculate its dimensions. Default is FLEXIBLE.


ui
parentWidth: Float

The width constraint from the parent view. May be NO_SIZE if no width constraint is imposed.


ui
parentHeight: Float

The height constraint from the parent view. May be NO_SIZE if no height constraint is imposed.


ui
computedWidth: Float

The computed width for the view after layout calculation. Set by the view during its computeSize phase.


ui
computedHeight: Float

The computed height for the view after layout calculation. Set by the view during its computeSize phase.


ui
computedFitWidth: Float

Special computed width for content fitting scenarios. Used by views like TextView that need to calculate their ideal width based on content before applying constraints.


ui
recycle(): Void

Returns this instance to the object pool for reuse. Should be called when the instance is no longer needed.


ui
new(?parentLayoutMask: Null<ViewLayoutMask>, ?parentWidth: Null<Float>, ?parentHeight: Null<Float>, ?computedWidth: Null<Float>, ?computedHeight: Null<Float>, ?computedFitWidth: Null<Float>): Void
Name Type Default Description
parentLayoutMask Null<ViewLayoutMask> (optional) * The layout mask from the parent view, indicating sizing constraints. Determines how the child view should calculate its dimensions. Default is FLEXIBLE.
parentWidth Null<Float> (optional) * The width constraint from the parent view. May be NO_SIZE if no width constraint is imposed.
parentHeight Null<Float> (optional) * The height constraint from the parent view. May be NO_SIZE if no height constraint is imposed.
computedWidth Null<Float> (optional) * The computed width for the view after layout calculation. Set by the view during its computeSize phase.
computedHeight Null<Float> (optional) * The computed height for the view after layout calculation. Set by the view during its computeSize phase.
computedFitWidth Null<Float> (optional) * Special computed width for content fitting scenarios. Used by views like TextView that need to calculate their ideal width based on content before applying constraints.

Private Members

Metadata

Name Parameters
:structInit -