docs: remove pure js explanation about session file, update containers, mention @ props

This commit is contained in:
jean-emmanuel 2017-06-09 01:20:01 +02:00
parent 5c09070265
commit 5d5b306c05
4 changed files with 3999 additions and 3838 deletions

File diff suppressed because it is too large Load diff

View file

@ -59,14 +59,13 @@ It relies on the use of several libraries :
## Documentation
- [Getting started](getting-started/)
- [Session File / Tabs](user-guide/session-file/)
- [Interface / Editor](user-guide/interface/)
- [Remote Control](user-guide/remote-control/)
- [Theming](user-guide/theming/)
- [Midi](user-guide/midi/)
- [Custom Module](user-guide/custom-module/)
- [Widgets Generics](user-guide/widgets-generics/)
- [Widgets Properties](user-guide/widgets-properties/)
- [Buttons](user-guide/widgets-specifics/buttons/)
- [Sliders](user-guide/widgets-specifics/sliders/)
- [Pads](user-guide/widgets-specifics/pads/)

View file

@ -1,86 +0,0 @@
# Session file
A valid session file is a javascript file that returns an array of [tab objects](#tab-object). It can be written as a javascript `array` :
```js
[// array
{// tab object
label:"A tab containing widgets",
widgets: [// array
{// widget object
// widget properties
},
{
// etc
}
]
},
{
label:"A tab containing tabs",
tabs: [
{// tab object
// tab properties
},
{
// etc
}
]
},
{
// tab properties
}
]
```
It can also be a javascript self invoking function that returns an array of [tab objects](#tab-object) :
```js
(function(){
var tabs = []
for (for i in [0,1,2,3]) {
tabs.push({
id:'tab'+i,
widgets: [
{
id:'tab'+i+'fader',
type:'fader'
}
// etc
]
})
}
return tabs
}()
```
----
## Tab object
A tab object is a javascript object which properties are described below.
```js
{
// tab properties
}
```
#### `label`
- type: `string`
- default: `Unnamed`
#### `id`
- type: `string`
- default: `empty`
- usage: this is only useful for [remote controlling](remote-control.md) the tabs states.
#### `widgets`
- type: `array`
- default: `[]`
- usage: each element of the `array` must be a `widget` object. A tab cannot contain widgets and tabs simultaneously.
#### `tabs`
- type: `array`
- default: `[]`
- usage: each element of the `array` must be a `tab` object. A tab cannot contain widgets and tabs simultaneously.

View file

@ -1,4 +1,4 @@
## Widgets generics
## Widgets properties
All widgets share a set of generic properties described below. Each widget type comes with an additional set of specific properties which are documented in these pages: