From 97aee11d8a217698022285f8bc4c176627731aff Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 20 Nov 2018 10:04:52 +0100 Subject: [PATCH] docs: update widgets ref --- resources/docs/widgets-reference.md | 87 ++++------------------------- 1 file changed, 11 insertions(+), 76 deletions(-) diff --git a/resources/docs/widgets-reference.md b/resources/docs/widgets-reference.md index 97c2ac45..0a2f827c 100644 --- a/resources/docs/widgets-reference.md +++ b/resources/docs/widgets-reference.md @@ -219,62 +219,6 @@ |

border

| `boolean` | true | Set to `false` to disables the widgets' borders | |

props

| `object` | {} | Defines a set of property to override the widgets' defaults.

Formulas in this field are resolved with an extra variable representing each widget's index: `$` | -### multifader - -| property | type |default | description | -| --- | --- | --- | --- | -|

matrix

|||| -|

strips

| `integer` | 2 | Number of faders in the row, each fader will inherit its parent's properties and the following ones (where i is the fader's index in the row)
- `id`: same as the widget's with /i appended to it
- `label`: i
- `address`: see split | -|

start

| `integer` | 0 | First widget's index | -|

traversing

| `boolean` | true | Set to `false` to disable traversing gestures | -|

fader

|||| -|

range

| `object` | {
 "min": 0,
 "max": 1
}
| See fader's `range` | -|

logScale

| `boolean` | false | See fader's `logScale` | -|

origin

| `number` | "auto" | See fader's `origin` | -|

unit

| `string` | "" | See fader's `unit` | -|

alignRight

| `boolean` | false | See fader's `alignRight` | -|

horizontal

| `boolean` | false | See fader's `horizontal` | -|

pips

| `boolean` | false | See fader's `pips` | -|

dashed

| `boolean` | false | See fader's `dashed` | -|

snap

| `boolean` | true | See fader's `snap` | -|

meter

| `boolean` | false | See fader's `meter` | -|

input

| `boolean` | true | See fader's `input` | -|

compact

| `boolean` | false | See fader's `compact` | -|

osc

|||| -|

split

| `boolean`\|
`string` | false | - `true`: the widget's index will be appended to the matrice's osc address
- `false`: it will be prepended to the widget's preArgs
- `string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) | - -### multitoggle - -| property | type |default | description | -| --- | --- | --- | --- | -|

matrix

|||| -|

matrix

| `array` | [
 2,
 2
]
| Defines the number of columns and and rows in the matrix. Each cell will contain a toggle button that will inherit its parent's properties and the following ones (where i is the toggle's index)
- `id`: same as the widget's with /i appended to it
- `label`: i
- `address`: see split | -|

start

| `integer` | 0 | First widget's index | -|

spacing

| `integer` | 0 | Adds space between widgets | -|

traversing

| `boolean` | true | Set to `false` to disable traversing gestures | -|

toggle

|||| -|

led

| `boolean` | false | Set to `true` to display the toggle's state with a led | -|

on

| `*` | 1 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | -|

off

| `*` | 0 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see `preArgs`) | -|

osc

|||| -|

split

| `boolean`\|
`string` | false | `true`: the widget's index will be appended to the matrice's osc address

`false`: it will be prepended to the widget's `preArgs`

`string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) | - -### multipush - -| property | type |default | description | -| --- | --- | --- | --- | -|

matrix

|||| -|

matrix

| `array` | [
 2,
 2
]
| Defines the number of columns and and rows in the matrix. Each cell will contain a push button that will inherit its parent's properties and the following ones (where i is the push's index)
- `id`: same as the widget's with /i appended to it
- `label`: i
- `address`: see split | -|

start

| `integer` | 0 | First widget's index | -|

traversing

| `boolean` | true | Set to `false` to disable traversing gestures | -|

spacing

| `integer` | 0 | Adds space between widgets | -|

push

|||| -|

on

| `*` | 1 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | -|

off

| `*` | 0 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | -|

norelease

| `boolean` | false | Set to `true` to prevent sending any osc message when releasing the button | -|

osc

|||| -|

split

| `boolean`\|
`string` | false | `true`: the widget's index will be appended to the matrice's osc address

`false`: it will be prepended to the widget's preArgs

`string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) | - ### keyboard | property | type |default | description | @@ -354,25 +298,16 @@ | --- | --- | --- | --- | |

style

|||| |

css

| `string` | "" | Available CSS variables:
- `--color-gauge: color;`
- `--color-knob: color;`
- `--color-pips: color;`
- `--gauge-opacity: number;` | -|

fader

|||| -|

horizontal

| `boolean` | false | Set to `true` to display the fader horizontally | -|

alignRight

| `boolean` | false | Set to `true` to invert the pip's and fader's position | -|

pips

| `boolean` | true | Set to `false` to hide the scale | -|

input

| `boolean` | true | Set to `false` to hide the built-in input | -|

meter

| `boolean` | false | Set to true to display a vu-meter next in the fader
- the meter's `id` will be the same as the widget's with `/meter` appended to it
- the meter's `id` will be the same as the widget's with `/meter` appended to it | -|

compact

| `boolean` | false | Set to `true` to display a compact alternative for the widget. Disables default mouse/touch focusing on the value display. | -|

dashed

| `boolean` | false | Set to `true` to display a dashed gauge | -|

snap

| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position | -|

spring

| `boolean` | false | When set to `true`, the widget will go back to its `default` value when released | -|

doubleTap

| `boolean` | false | Set to `true` to make the fader reset to its `default` value when receiving a double tap.

Can also be an osc address, in which case the widget will just send an osc message (`/ `) | -|

range

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the breakpoints of the fader's scale:
- keys can be percentages and/or `min` / `max`
- values can be `number` or `object` if a custom label is needed

Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) | -|

steps

| `string`\|
`number`\|
`array` | "" | Restricts the widget's value:
- `auto`: use values defined in `range`
- `number`: define a number of evenly spaced steps
- `array`: use arbitrary values | -|

logScale

| `boolean` | false | Set to `true` to use logarithmic scale | -|

unit

| `string` | "" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) | -|

origin

| `number` | "auto" | Defines the starting point's value of the fader's gauge | -|

osc

|||| -|

touchAddress

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` | -|

meterAddress

| `string` | "" | OSC address for the built-in meter | +|

meter

|||| +|

range

| `object` | {
 "min": 0,
 "max": 1
}
| See fader's `range` | +|

logScale

| `boolean` | false | See fader's `logScale` | +|

origin

| `number` | "auto" | See fader's `origin` | +|

unit

| `string` | "auto" | See fader's `unit` | +|

alignRight

| `boolean` | false | See fader's `alignRight` | +|

horizontal

| `boolean` | false | See fader's `horizontal` | +|

pips

| `boolean` | false | See fader's `pips` | +|

dashed

| `boolean` | false | See fader's `dashed` | +|

gradient

| `array`\|
`object` | [] | When set, the meter's gauge will be filled with a linear color gradient
- each item must be a CSS color string.
- as an `object`: each key must be a number between 0 and 1
- each item must be a CSS color string.

Examples: `['blue', 'red']`, {'0': 'blue', '0.9': 'blue', '1': 'red'} | ### text @@ -437,7 +372,7 @@ |

strip

|||| |

scroll

| `boolean` | true | Set to `false` to disable scrollbars | |

horizontal

| `boolean` | false | Set to `true` to display widgets horizontally | -|

stretch

| `boolean` | true | Set to `true` to stretch widgets evenly | +|

stretch

| `boolean` | false | Set to `true` to stretch widgets evenly | |

border

| `boolean` | true | By default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the panel too | |

spacing

| `integer`\|
`percentage` | 0 | Adds space between widgets. Percents are always relative to the strips width | |

children

||||