diff --git a/docs/plugin-ui-markup.md b/docs/plugin-ui-markup.md index 7d0dd3f16..0c17e932e 100644 --- a/docs/plugin-ui-markup.md +++ b/docs/plugin-ui-markup.md @@ -313,13 +313,14 @@ The two forms cannot be mixed on one list. selected="{SelectedMonster}" onchange="{SelectMonster}"> - + + ``` | Attribute | Column type | Required | Binding | |---|---|---|---| -| `type` | all | yes | `text`, `check`, or `icon` | +| `type` | all | yes | `text`, `check`, `icon`, or `button` | | `width` | all | see below | pixels, or `*` for auto | | `items` | `text` | yes | `IReadOnlyList` | | `colors` | `text` | no | `IReadOnlyList` or ``, `0xRRGGBB` per row | @@ -329,6 +330,9 @@ The two forms cannot be mixed on one list. | `values` | `icon` | yes | `IReadOnlyList` or `` | | `iconkind` | `icon` | no | `did` (default), `spell`, or `item` | | `onclick` | `icon` | yes | `Action` with the row index | +| `items` | `button` | yes | `IReadOnlyList`, each row's caption; an empty caption draws no button | +| `onclick` | `button` | yes | `Action` with the row index; the click does not select the row | +| `buttonw`, `buttonh` | `button` | no | pixels; the button's size, centred in its cell (default: the whole cell) | Widths: `*` shares the remaining width equally with every other `*` column. The last column is always automatic; it takes the whole remainder unless @@ -336,12 +340,34 @@ another column is also `*`. Every other column needs a positive `width` or `*`. Columns that would overflow the list are clamped and later ones draw nothing. Remainder pixels go to the last sharing column. -Rows: the row count is the longest bound column. A `text` or `icon` cell past -its own column's data draws nothing; a `check` cell draws unchecked. A click +Rows: the row count is the longest bound column. A `text`, `icon` or `button` +cell past its own column's data draws nothing; a `check` cell draws unchecked. A click in a `text` column without `onclick` selects the row and fires the list's `onchange`; any other click fires the column's own callback and leaves the selection alone. A click past a column's own data does nothing. +A `button` cell is drawn as a button one pixel inside its cell, or at +`buttonw` by `buttonh` centred in the cell (never larger than the cell; set +either alone to size only that side), with its caption centred in the list's +text colour and cut off at the button's edges. Without a theme its face and +border are those of an unthemed `