Layout Element#

LayoutElement

How much space a user interface element asks a Layout for.

Note

A layout gives every element its minimum size first. Any space left over is shared out to bring elements up to their preferred size, and anything still left over is shared between the elements with a flexible size, in proportion to it.

A LayoutElement object is returned as {"id": ..., "class": ...}, its identifier and the name of its own class. An argument is that object or the identifier alone. A path that acts on an object takes the identifier as (id).

GET /ui/layout-element/(id)/min-size#

The smallest size the element can be given, in pixels. A negative value in either direction leaves that direction unconstrained.

Parameters:
Response JSON Object:
  • value (tuple<double, double>)

PUT /ui/layout-element/(id)/min-size#

The smallest size the element can be given, in pixels. A negative value in either direction leaves that direction unconstrained.

Parameters:
Request JSON Object:
  • value (tuple<double, double>) – The new value.

GET /ui/layout-element/(id)/preferred-size#

The size the element asks for, in pixels. A negative value in either direction leaves that direction unconstrained.

Parameters:
Response JSON Object:
  • value (tuple<double, double>)

PUT /ui/layout-element/(id)/preferred-size#

The size the element asks for, in pixels. A negative value in either direction leaves that direction unconstrained.

Parameters:
Request JSON Object:
  • value (tuple<double, double>) – The new value.

GET /ui/layout-element/(id)/flexible-size#

The share the element takes of the space left over once every element has its preferred size. A negative value in either direction takes no share.

Parameters:
Response JSON Object:
  • value (tuple<double, double>)

PUT /ui/layout-element/(id)/flexible-size#

The share the element takes of the space left over once every element has its preferred size. A negative value in either direction takes no share.

Parameters:
Request JSON Object:
  • value (tuple<double, double>) – The new value.

GET /ui/layout-element/(id)/ignore-layout#

Whether the layout leaves the element out and lets it be positioned by hand.

Parameters:
Response JSON Object:
  • value (bool)

PUT /ui/layout-element/(id)/ignore-layout#

Whether the layout leaves the element out and lets it be positioned by hand.

Parameters:
Request JSON Object:
  • value (bool) – The new value.