pub struct MeasureInput {
pub known_width: Option<f32>,
pub known_height: Option<f32>,
pub available_width: AvailableSpace,
pub available_height: AvailableSpace,
pub scale: f32,
}Expand description
What one measure call offers a widget.
Fields§
§known_width: Option<f32>The width of the content box the layout engine treats as fixed for this call, inside the node’s padding and border.
A fixed size comes from the node’s style or from a container that stretches the node across this axis. It can be absent even when the node’s style fixes a width: the engine’s final layout pass passes no fixed size at all.
known_height: Option<f32>The height of the content box the layout engine treats as fixed for this call, inside the node’s padding and border.
A fixed size comes from the node’s style or from a container that stretches the node across this axis. It can be absent even when the node’s style fixes a height: the engine’s final layout pass passes no fixed size at all.
available_width: AvailableSpaceThe space offered on the x axis, inside the node’s padding and border.
available_height: AvailableSpaceThe space offered on the y axis, inside the node’s padding and border.
scale: f32The number of physical pixels per logical pixel the window runs at, so a widget that sizes itself from pixel data, such as an image, can divide it out.