mkdocs almost there

This commit is contained in:
jean-emmanuel 2016-03-30 17:31:06 +02:00
parent 54c13c3ad3
commit f85c999915
4 changed files with 117 additions and 54 deletions

View file

@ -12,7 +12,7 @@ Buttons are exactly what you think they are.
}
```
### `on`
#### `on`
- type: `string|number|object`
- default: `1`
- usage: defines which value is sent on `on` position
@ -20,7 +20,7 @@ Buttons are exactly what you think they are.
- set to `false` to prevent sending any osc message
- can be an object if the type needs to be specified (see [preArgs](../widgets-generics.md#preargs))
### `off`
#### `off`
- type: `string|number|object`
- default: `0`
- usage: defines which value is sent on `off` position
@ -39,7 +39,7 @@ Buttons are exactly what you think they are.
}
```
### `on`
#### `on`
- type: `string|number|object`
- default: `1`
- usage: defines which value is sent when pushing the button
@ -47,7 +47,7 @@ Buttons are exactly what you think they are.
- set to `false` to prevent sending any osc message
- can be an object if the type needs to be specified (see [preArgs](../widgets-generics.md#preargs))
### `off`
#### `off`
- type: `string|number|object`
- default: `0`
- usage: defines which value is sent when releasing the button
@ -69,7 +69,7 @@ Setting the `push`'s value externally (via osc or widget linking/cloning) will t
}
```
### `values`
#### `values`
- type: `array|object`
- default: `{"Value 1":1,"Value 2":2}`
- usage:

View file

@ -1,24 +1,55 @@
# Containers
## Containers
Containers can contain any widgets
## strip :
----
## Strip
Strips can contain any number of widgets, which can't be absolutely positioned and whose size can't overflow their parent's.
```js
type:'strip',
horizontal:false, // [bool] set to true to display widgets horizontally
widgets: [] // [array] of widget objects
{
type:'strip',
// etc
}
```
## panel :
#### `horizontal`
- type: `boolean`
- default: `false`
- usage: set to `true` to display widgets horizontally
#### `widgets`
- type: `array`
- default: `[]`
- usage: each element of the `array` must be a widget object
----
## Panel
Panels can contains tabs or widgets. These can be absolutely positioned and can overflow their parent's size (which will then display scrollbars).
```js
type:'panel',
scroll:true, // [bool] set to false to disable scrollbars
widgets: [], // [array] of widget objects
tabs: [] // [array] of tab objects
{
type:'panel',
// etc
}
```
#### `scroll`
- type: `boolean`
- default: `true`
- usage: set to `false` to disable scrollbars
#### `widgets`
- type: `array`
- default: `[]`
- usage: each element of the `array` must be a widget object.A panel cannot contain widgets and tabs simultaneously.
#### `tabs`
- type: `array`
- default: `[]`
- usage: each element of the `array` must be a tab object. A panel cannot contain widgets and tabs simultaneously.

View file

@ -1,50 +1,82 @@
# Matrices
## Matrices
Matrices are special containers that only contain one type of widget. All contained widgets will be traversed by single dragging gestures.
## multifader
## Multifader
Multifader creates a row of vertical faders that respond to the same gestures.
```js
type:'multifader',
strips:2, // [integer] number of faders
range: {"min":0,"max":1}, // [object] defining the breakpoints of the fader
// keys can be percentages or 'min' / 'max'
logScale: false, // [bool] use logarithmic scale (log10)
unit: false, // [string] value suffix
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
```
*This creates a row of vertical faders that respond to the same gesture. Each of these faders will receive its parent's properties and the following (where X is the fader's index in the row) :*
```js
id:PARENT_ID_X,
label: X,
path: PARENT_PATH/X
{
type:'multifader',
// etc
}
```
## multitoggle
```js
type:'multitoggle',
matrix:[2,2], // [array] [number of columns, number of rows]
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
```
*This creates a matrix of toggles that respond to the same gesture. Each of these toggles will receive its parent's properties and the following (where X is the toggle's index in the row) :*
```js
id:PARENT_ID_X,
label: X,
path: PARENT_PATH/X
```
#### `strips`
- type: `integer`
- default: `2`
- usage: 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`
- `path`: same as the widget's with `/i` appended to it
## multipush
#### `range`
- see fader's [`range`](sliders/#fader)
#### `logScale`
- see fader's [`logScale`](sliders/#fader)
#### `unit`
- see fader's [`unit`](sliders/#fader)
----
## Multitoggle
```js
type:'multipush',
matrix:[2,2], // [array] [number of columns, number of rows]
on: 1, // [string|number|false] value sent when toggle is on (false to prevent sending )
off:0, // [string|number|false] value sent when toggle is off (false to prevent sending )
{
type:'multitoggle',
// etc
}
```
*This creates a matrix of push buttons that respond to the same gesture. Each of these buttons will receive its parent's properties and the following (where X is the button's index in the row) :*
#### `matrix`
- type: `array`
- default: `[2,2]`
- usage: defines the number of columns and and rows. Each cell will contain a toggle button that 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`
- `path`: same as the widget's with `/i` appended to it
#### `on`
- see toggle's [`on`](buttons/#toggle)
#### `off`
- see toggle's [`off`](buttons/#toggle)
----
## Multipush
```js
id:PARENT_ID_X,
label: X,
path: PARENT_PATH/X
{
type:'multipush',
// etc
}
```
#### `matrix`
- type: `array`
- default: `[2,2]`
- usage: defines the number of columns and and rows. Each cell will contain a push button that 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`
- `path`: same as the widget's with `/i` appended to it
#### `on`
- see push's [`on`](buttons/#push)
#### `off`
- see push's [`off`](buttons/#push)

View file

@ -69,7 +69,7 @@ range: {
- type: `boolean`
- default: `false`
- usage: set to true to display a vu-meter next in the fader
- the meter's `id` will be the same as the fader's with `#meter` appended to it
- the meter's `id` will be the same as the fader's with `/meter` appended to it
- the meter's `path `will be the same as the fader's with `/meter` appended to it