Macro kas_macros::float
source · float!() { /* proc-macro */ }
Expand description
Make a float widget
All children occupy the same space with the first child on top.
Size is determined as the maximum required by any child for each axis.
All children are assigned this size. It is usually necessary to use pack!
or a similar mechanism to constrain a child to avoid it hiding the content
underneath (note that even if an unconstrained child does not visually
hide everything beneath, it may still “occupy” the assigned area, preventing
mouse clicks from reaching the widget beneath).
Children are navigated in order of declaration.
Items support widget layout syntax.
Example
ⓘ
let my_widget = kas::float! [
pack!(left top, "one"),
pack!(right bottom, "two"),
"some text\nin the\nbackground"
];