Description

Hints for an object's weight.

This is a hint on how a container object should resize a given child within its area. Containers may adhere to the simpler logic of just expanding the child object's dimensions to fit its own (see the Efl.Gfx.Size.Hint.Expand helper weight macro) or the complete one of taking each child's weight hint as real weights to how much of its size to allocate for them in each axis. A container is supposed to, after normalizing the weights of its children (with weight hints), distribut the space it has to layout them by those factors -- most weighted children get larger in this process than the least ones.

Accepted values are zero or positive values. Some containers might use this hint as a boolean, but some others might consider it as a proportion, see documentation of each container.

Default weight hint values are 0.0, for both axis.

Values

  • x - Non-negative double value to use as horizontal weight hint.
  • y - Non-negative double value to use as vertical weight hint.

Signature

@property hint_weight @pure_virtual {
    get {
        values {
            x: double;
            y: double;
        }
    }
    set {
        values {
            x: double;
            y: double;
        }
    }
}

C signature

void efl_gfx_size_hint_weight_get(const Eo *obj, double *x, double *y);
void efl_gfx_size_hint_weight_set(Eo *obj, double x, double y);

Implemented by

  • Efl.Gfx.Size.Hint.hint_weight