← Back to Docs
  • index.html
  • Clayground
  • Clayground.Lab
  • BoardPalette
  • Clayground 2026.7
  • BoardPalette QML Type

    The build lab's top-left panel: presets, the parts to take, the tools - in foldable sections. More...

    Import Statement: import Clayground.Lab
    Inherits:

    LabPanel

    Properties

    Methods

    Detailed Description

    Eleven parts, eleven presets and four tools stopped fitting a laptop screen, and shrinking the type would be the wrong fix. So the reader folds away the half they are not using, and what stays open is theirs - it rides in viewState() (sectionsOpen) rather than resetting on every reload. The panel is bounded and flickable, so nothing in here can ever be off the bottom of the screen; folding is the fast way to make room, this is the guarantee that the slow way always exists.

    Turn the text size up and the column stops fitting: with compact the parts and tools go two across and drop their one-line hints - captions give way before things you click.

    The domain supplies the catalog (which types, in which colour) and an icon component drawn beside each name - the palette is where a kit can teach "this lump is that squiggle" for free.

    BoardPalette {
        id: palette
        board: board; lab: root; flow: root.currentFlow; hands: hands
        placer: placer; grid: grid; overlay: overlay
        catalog: Parts.catalog
        icon: Component { SymbolIcon {} }
    }

    See also Board, PartPlacer, ScenarioBar, FlowChip, and LabPanel.

    Property Documentation

    board : Board


    catalog : var

    [{ type, color }] - the parts on offer, in this order, each with its board colour.


    columnWidth : real [read-only]


    columnWidth \brief The content width. : real [read-only]


    compact : bool

    Two-across layout without hints; measured from the window height by default.


    flow : var


    flow \brief The flow the \l FlowChip offers. : var


    grid : var


    grid \brief The \l GridMode the grid button toggles. : var


    hands : var


    hands \brief The \l InstrumentBelt the placer lives on. : var


    icon : Component

    Drawn beside each part; gets type and ink set on it. Optional.


    lab : var


    lab \brief The sandbox root, for the \l ScenarioBar. : var


    overlay : var


    overlay \brief The \l BoardOverlay the values button cycles. : var


    placer : var


    placer \brief The \l PartPlacer. : var


    sectionsOpen : var

    Which sections are unfolded, { presets, parts, tools }; put it in viewState().


    tools : var

    Which of the standard tools to show, in order: "eraser", "values", "grid", "clear".


    Method Documentation

    bool sectionOpen(string key)


    void toggleSection(string key)