One instrument in an InstrumentDock - a titled panel the reader can put away. More...
| Import Statement: | import Clayground.Lab |
A LabPanel with a dismiss affordance in its corner. Put a face (Gauge, BarFace, ColumnFace, DigitFace) inside it, give it a key the lab's serialization can name it by, and the dock does the rest: dismissing folds the panel and drops a chip into the dock's tray, which offers it back.
Children stack in a column exactly as in a LabPanel; for a face that must fill the width, bind to <id>.body.width.
Example usage:
import Clayground.Lab DockedInstrument { id: levelBox key: "level" label: LabLang.t("inst.level") BarFace { width: levelBox.body.width; scale: levelScale; segments: 20 } }
See also InstrumentDock, InstrumentScale, and LabPanel.
accent : color |
Title colour.
body : Item |
The panel's content area - bind a face's width to body.width.
content : Item |
Stacked children (the default property).
dismissable : bool |
Offer the dismiss affordance. Turn it off for an instrument the lab considers essential.
dock : InstrumentDock |
The dock this belongs to.
key : string |
Stable name the dock and the lab's viewState() use.
Id-like and language-neutral, for the same reason a probe name is: the caption may be translated under it.
label : string |
Panel title, already translated.