get_preferred_width


Description:

[ Version ( since = "0.8" ) ]
public virtual void get_preferred_width (float for_height, out float min_width_p, out float natural_width_p)

Computes the requested minimum and natural widths for an actor, optionally depending on the specified height, or if they are already computed, returns the cached values.

An actor may not get its request - depending on the layout manager that's in effect.

A request should not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.

Parameters:

this

A Actor

for_height

available height when computing the preferred width, or a negative value to indicate that no height is defined

min_width_p

return location for minimum width, or null

natural_width_p

return location for the natural width, or null