diff --git a/resources/README.md b/resources/README.md index 470264bc..9bc74a6d 100644 --- a/resources/README.md +++ b/resources/README.md @@ -3,7 +3,7 @@ ```bash $ sudo apt-get install python python-pip # python package manager $ sudo pip install mkdocs # docs site builder -$ sudo pip install mkdocs-cinder # theme +$ sudo pip install mkdocs-material # theme $ mkdocs serve # make docs available on http://127.0.0.1:8000 $ mkdocs build # build docs static site diff --git a/resources/docs/css/extra.css b/resources/docs/css/extra.css index 93522e78..eb5818e0 100644 --- a/resources/docs/css/extra.css +++ b/resources/docs/css/extra.css @@ -1,85 +1,2 @@ -body { -} - -a { - color: #528bff; - -} - -.text-justify { - text-align: justify -} - -.navbar-default { - border-bottom: 1px solid #ddd; - background: #fafafa; -} - -.navbar-default .navbar-nav a { - color: #222!important; -} -.navbar-toggle span { - background: #222!important; -} - -.dropdown-menu { - background: #fafafa!important; - box-shadow: none; - border:1px solid #ddd!important; - margin-top: 0px!important; -} -.dropdown-submenu a:after { - border-left-color:#888!important -} - -.navbar-default .active > a, -.navbar-default .open > a, -.navbar-default .navbar-nav a:focus, -.navbar-default .navbar-nav a:hover, -.navbar-default .navbar-nav a:active { - background: #eee!important; -} - -.navbar-brand { - font-size: 14px; - text-transform: uppercase; - font-weight: bold; - color:#528bff!important; -} - -.navbar-right { - height: 45px; -} -.navbar-right li { - font-size: 0; -} -.navbar-right li i { - font-size: 14px; - position: relative; - top: 4px; -} -.navbar-right li.disabled a { - color:#888!important -} - -.bs-sidebar { - border-width: 0 1px 0 0; - box-shadow: none; - background: none; -} - -.bs-sidebar .nav > li > a { - padding: 2px 20px; -} - -.bs-sidebar a { - margin-right: -1px; - color:inherit; -} - - -footer { - font-size:14px; - line-height: 1; - margin-bottom: 16px; -} +body {overflow-y: scroll} +.md-nav__title.md-nav__title--site {display: none;} diff --git a/resources/docs/editing-sessions.md b/resources/docs/editing-sessions.md new file mode 100644 index 00000000..bfcbd5bb --- /dev/null +++ b/resources/docs/editing-sessions.md @@ -0,0 +1,41 @@ +# Editing sessions + +The session editor can be enabled from the sidepanel. Once enabled, clicking on a widget will make it the *selected widget*, adding a fancy dashed blue border to it. + +## Root panel + +The root panel can be selected by clicking on the "Root" button in the sidepanel. + +## Context menu + +Right clicking / long touch on a widget or on a tab will also display a context menu providing useful utilities : + +- `Edit parent`: selects the widget's parent for edition +- `Copy`: copy widget's data +- `Cut`: copy widget's data and delete selected widget +- `Paste`: paste copied widget in selected container + - `n+1` : increments the id of the copied widget (and all its children) before pasting + - `Clone` : paste the exact same widget +- `Add widget`: create a new widget in selected container +- `Add tab`: create a new tab in selected container +- `Delete`: delete selected tab or widget + +## Save + +Current session can be exported as a `.js` file. When overwriting a session file that's currently is use by other clients, they will reload it automatically. + +## Load + +Loading a session file doesn't affect other clients. + +## Grid + +By default, widget resizing / dragging snaps to a 10 pixel wide grid. Its width can be customized in the editor (when it's enabled). Setting its width to 1 will disable it. Note that the grid doesn't affect manual setting of a widget's size / position. + +## Properties + +Selected widget's properties are displayed and can be modified in the sidepanel. The [widgets reference](widgets/widgets) section lists the available properties for each widget type. + +## Widget resizing / dragging + +Selected widget can be resized using its south, south-east and east handles. It can be dragged with its north-west handle. diff --git a/resources/docs/user-guide/custom-module.md b/resources/docs/extras/custom-module.md similarity index 100% rename from resources/docs/user-guide/custom-module.md rename to resources/docs/extras/custom-module.md diff --git a/resources/docs/user-guide/midi.md b/resources/docs/extras/midi.md similarity index 100% rename from resources/docs/user-guide/midi.md rename to resources/docs/extras/midi.md diff --git a/resources/docs/extras/property-inheritance.md b/resources/docs/extras/property-inheritance.md new file mode 100644 index 00000000..a21d55cd --- /dev/null +++ b/resources/docs/extras/property-inheritance.md @@ -0,0 +1,17 @@ +# Property inheritance + +Widgets can use each other's property values by using the following syntaxes: + +- `@{this.propertyName}` +- `@{parent.propertyName}` +- `@{widgetId.propertyName}` (where `widgetId` is the target widget's `id`) + +It can be used to: + +- concatenate strings: `/@{parent.id}/some_suffix` +- define object value: `["@{parent.id}"]` + +If the retreived property is an object (`[] / {}`), it can be used as is or one can retreive a specfic item from it: `@{parent.variables.0}` will try to return the first item of the parent's `variables` property. + +!!! note "" + The root panel's `id` is `root`. diff --git a/resources/docs/user-guide/remote-control.md b/resources/docs/extras/remote-control.md similarity index 68% rename from resources/docs/user-guide/remote-control.md rename to resources/docs/extras/remote-control.md index d2144e69..0c43a15a 100644 --- a/resources/docs/user-guide/remote-control.md +++ b/resources/docs/extras/remote-control.md @@ -10,10 +10,11 @@ Apply a set of options to an existing widget by replacing the old ones with the - `id`: `string`, widget's `id` -- `options`: `string`, JSON object defining the new properties to merge +- `options`: `string`, JSON stringified object defining the new properties to merge - example: `{"label":"New Label", "color":"red"}` -*Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea.* +!!! warning "" + Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea ## `/EDIT_SOFT id options` @@ -21,10 +22,11 @@ Apply a set of options to an existing widget by merging them to the widget's opt - `id`: `string`, widget's `id` -- `options`: `string`, JSON object defining the new properties to merge +- `options`: `string`, JSON stringified object defining the new properties to merge - example: `{"label":"New Label", "color":"red"}` -*Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea.* +!!! warning "" + Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea ## `/TABS id id etc` diff --git a/resources/docs/user-guide/theming.md b/resources/docs/extras/theming.md similarity index 100% rename from resources/docs/user-guide/theming.md rename to resources/docs/extras/theming.md diff --git a/resources/docs/extras/url-options.md b/resources/docs/extras/url-options.md new file mode 100644 index 00000000..8f1bd024 --- /dev/null +++ b/resources/docs/extras/url-options.md @@ -0,0 +1,20 @@ +# URL Options + +Client specific options can be set by adding query parameters to the server's url. One must prepend the url with a question mark (`?`) followed by `parameter=value` pairs separated with ampersands (`&`). + + +| Option | Value | Default | Description | +|----|----|----|----| +| hdpi | 1 / 0 | 0 |enable high resolution canvas | +| doubletab | number | 375 | sets the double tap/click time thershold in milliseconds | +| zoom | number | 1 | sets the initial zoom | + +Example: + +`http://server-ip:port?hdpi=1` + + +!!! note "" + When using the built-in client, url options can be set through the `--url-options` switch. + + Example: `open-stage-control --url-options zoom=2 doubletap=200` diff --git a/resources/docs/getting-started.md b/resources/docs/getting-started.md index 2bc14726..6fde509e 100644 --- a/resources/docs/getting-started.md +++ b/resources/docs/getting-started.md @@ -1,99 +1,100 @@ # Getting started ----- -## Run from binaries +!!! tip "" + Prebuilt binaries for Linux, Windows and OS X can be found on the [release](https://github.com/jean-emmanuel/open-stage-control/releases) page. -Prebuilt binaries for Linux, Windows and OS X can be found on the [release](https://github.com/jean-emmanuel/open-stage-control/releases) page. +## Options +Below are the available command-line options. Note that when running without any command-line switch (ie from a file browser), a launcher window will spawn to help setting them. -Below are the available command-line switches. Note that when running without any command-line switch (ie from a file browser), a launcher window will spawn to help setting them. +| Option | Description | +|---|---| +| sync | synchronized hosts (ip:port pairs) (osc messages sent by widgets will also be sent to these targets)| +| load | session file to load | +| blank | load a blank session and start the editor | +| custom-module | custom module file to load | +| port | http port of the server (default to 8080) | +| osc-port | osc input port (default to --port) | +| midi | midi router settings (requires python-pyo) | +| debug | log received osc messages in the console | +| no-gui | disable default gui | +| gui-only | app server's url. If true, local port (--port) is used | +| theme | theme name or path (mutliple values allowed) | +| examples | list examples instead of recent sessions | +| url-options | [url options](extras/url-options) (opt=value pairs) | +| disable-vsync | disable gui's vertical synchronization | +| read-only | disable session editing and session history changes | +Command-line only : -**Options** -```markdown - -s, --sync synchronized hosts (ip:port pairs) (osc messages sent by widgets will also be sent to these targets) - -l, --load session file to load - -b, --blank load a blank session and start the editor - -c, --custom-module custom module file to load - -p, --port http port of the server (default to 8080) - -o, --osc-port osc input port (default to --port) - -m, --midi midi router settings (requires python-pyo) - -d, --debug log received osc messages in the console - -n, --no-gui disable default gui - -g, --gui-only app server's url. If true, local port (--port) is used - -t, --theme theme name or path (mutliple values allowed) - -e, --examples list examples instead of recent sessions - --disable-vsync disable gui's vertical synchronization - --read-only disable session editing and session history changes - - -h, --help display help - -v, --version display version number -``` +| Option | Description | +|---|---| +| help | print available options | +| version | print version number | **Examples** ``` - -$ open-stage-control -s 127.0.0.1:5555 127.0.0.1:6666 -p 7777 +$ open-stage-control --sync 127.0.0.1:5555 127.0.0.1:6666 --port 7777 +``` This will create an app listening on port 7777 for synchronization messages, and sending its widgets state changes to ports 5555 and 6666. ----- - -$ open-stage-control -n -l path/to/session.js - -This will create a headless app available through http on port 8080. Multiple clients can use the app (with chrome only) simultaneously, their widgets will be synchronized. +``` +$ open-stage-control --no-gui --load path/to/session.js --port 9999 ``` ----- +This will create a headless app available through http on port 9999 with session.js loaded automatically. + ## Run from sources Running the app from the sources slightly differs from using built binaries : instead of running a binary, we'll launch the app with npm. -**Requirements** +**1. Requirements** - [Node.js >= 4](https://nodejs.org/) - [npm](https://www.npmjs.com/) -```bash +``` $ sudo apt-get install nodejs npm # install nodejs & npm $ sudo npm install -g npm # update npm ``` -**Download** +**2. Download sources** -```bash +``` $ git clone https://github.com/jean-emmanuel/open-stage-control $ cd open-stage-control/ $ npm install - ``` - -**Run** - -```bash -$ npm start [ -- options] - -# A double hyphen ("--") is used here to tell npm that the following options are to be given to the app. ``` ----- +**3. Run !** + +``` +$ npm start [ -- options] +``` + +!!! note "" + A double hyphen (`--`) is used here to tell npm that the options are to be passed to the app. + + ## Build from sources -**Requirements** +**1. Requirements** -- [Node.js](https://nodejs.org/) +- [Node.js >= 4](https://nodejs.org/) - [npm](https://www.npmjs.com/) -```bash -$ sudo apt-get install npm # install nodejs & npm +``` +$ sudo apt-get install nodejs npm # install nodejs & npm $ sudo npm install -g npm # update npm ``` -**Build** +**2. Build** -```bash +``` $ git clone https://github.com/jean-emmanuel/open-stage-control $ cd open-stage-control $ npm install @@ -101,25 +102,30 @@ $ export PLATFORM=TARGET_PLATFORM # TARGET_PLATFORM can be linux, win32 (windows $ export ARCH=TARGET_ARCH # TARGET_ARCH can be ia32, x64 or armv7l $ npm run build -$ # Do the following if you want a deb package for debian/ubuntu +# Do the following if you want a deb package for debian/ubuntu + $ npm run deb32 -$ # or + +# or + $ npm run deb64 -$ # or + +# or + $ npm run debarm ``` This will build the app in `dist/open-stage-control-PLATFORM-ARCH`. -*Please note that building the app for windows from a linux system requires wine to be installed.* +!!! note "" + Building the app for windows from a linux system requires wine to be installed.* ----- -## Running a true headless server +## Running in a headless context Electron, Open Stage Control's engine, is based on chromium and can't run out of the box without a display server. However, using a virtual framebuffer does the trick. Detailed instructions can be found in Electron's [documentation](http://electron.atom.io/docs/tutorial/testing-on-headless-ci/). In short: install [xvfb](https://en.wikipedia.org/wiki/Xvfb) and prepend your command with `xvfb-run`: -```bash -xvfb-run open-stage-control -n +``` +$ xvfb-run open-stage-control -n ``` diff --git a/resources/docs/img/logo-material.svg b/resources/docs/img/logo-material.svg new file mode 120000 index 00000000..0be1bb38 --- /dev/null +++ b/resources/docs/img/logo-material.svg @@ -0,0 +1 @@ +../../images/logo-material.svg \ No newline at end of file diff --git a/resources/docs/img/mockup.png b/resources/docs/img/mockup.png new file mode 100644 index 00000000..2eac316f Binary files /dev/null and b/resources/docs/img/mockup.png differ diff --git a/resources/docs/img/screenshot-1.png b/resources/docs/img/screenshot-1.png deleted file mode 100644 index ee569269..00000000 Binary files a/resources/docs/img/screenshot-1.png and /dev/null differ diff --git a/resources/docs/img/screenshot-2.png b/resources/docs/img/screenshot-2.png deleted file mode 100644 index 0f744339..00000000 Binary files a/resources/docs/img/screenshot-2.png and /dev/null differ diff --git a/resources/docs/index.md b/resources/docs/index.md index a3bb00fa..849b59df 100644 --- a/resources/docs/index.md +++ b/resources/docs/index.md @@ -1,76 +1,9 @@ -
-

- -

+# Open Stage Control +Open Stage Control is a libre desktop OSC bi-directionnal control surface application. It's built on web technologies and run as an [Electron](http://electron.atom.io/) web server that accepts any number of clients. -

- Open Stage Control is a libre desktop OSC bi-directionnal control surface application. It's built with HTML, JavaScript & CSS and run as a Node / Electron web server that accepts any number of Chrome / Chromium / Electron clients. -

- -
- -
- ... - Latest release (...) - Demo (chrome 49+ required) -
-
- - - -## Features - -- multiplatform desktop server application with built-in client interface -- mouse & multitouch interfaces compatible with **Chrome 49** or later -- all the widgets you need ! -- built-in live editor -- clients synchronization -- deep customization possibilities such as theming and messages filtering -- *true* control over what the widgets send -- midi inputs/outputs +![](img/mockup.png) ## Supported platforms The server can run on all [platforms supported by Electron](https://github.com/electron/electron/blob/master/docs/tutorial/supported-platforms.md). Any client that can run chrome browser can connect to the server. - - -## License & credits - -Copyleft © Jean-Emmanuel @ [AMMD](http://ammd.net). This program is released under the GNU/GPL3 license. - -It relies on the use of several libraries : - -- [Node.js](https://nodejs.org/) -- [Electron](http://electron.atom.io/) -- [osc.js](https://github.com/colinbdclark/osc.js) -- [socket.io](http://socket.io) -- [browserify](http://browserify.org) -- [exorcist](https://github.com/thlorenz/exorcist) -- [express](http://expressjs.com) -- [node-sass](https://github.com/sass/node-sass) -- [jQuery](http://jquery.com/) -- [jQuery-UI](http://jqueryui.com/) (draggable, resizable & sortable) -- [Font Awesome](http://fontawesome.io/) -- [source-map](https://github.com/mozilla/source-map) -- [mathjs](http://mathjs.org/) - - -## Documentation - -- [Getting started](getting-started/) - - [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 Properties](user-guide/widgets-properties/) - - [Buttons](user-guide/widgets-specifics/buttons/) - - [Sliders](user-guide/widgets-specifics/sliders/) - - [Pads](user-guide/widgets-specifics/pads/) - - [Containers](user-guide/widgets-specifics/containers/) - - [Matrices](user-guide/widgets-specifics/matrices/) - - [Switchers](user-guide/widgets-specifics/switchers/) - - [Plots](user-guide/widgets-specifics/plots/) - - [Maths](user-guide/widgets-specifics/maths/) diff --git a/resources/docs/interface.md b/resources/docs/interface.md new file mode 100644 index 00000000..614d542a --- /dev/null +++ b/resources/docs/interface.md @@ -0,0 +1,33 @@ +# User interface + +## Sidepanel + +The sidepanel can be opened by clicking the navigation icon in the upper right corner or by pressing F10. + +### State management + +- Store: save the state of all widgets in the temporary slot +- Recall: reload saved state from the temporary slot +- Send All: make all widgets send their current value +- Export: save the state of all widgets to a `.preset` file +- Import: load a state from a `.preset` file + +### Traversing gestures + +By default, a dragging gesture can only affect the widget it started on. Enabling traversing gesture does two things: + +- make gestures affect every widgets no matter where they started +- make sliders-like widgets respond as if their `snap` option is enabled + +### Editor + +See [Editing sessions](editing-sessions.md). + +## Interactions + +| Mouse | Touch | Description | +|---|---|---| +| Click | Tap | Handled at pressing time, not releasing. | +| Double Click | Double Tap | Some widgets handle double click / tap events. | +| Right-click | Long touch | Widgets that have only one value input will give focus to it when receiving this event. When the editor is enabled, Right-click / Long touch spawns the editor's context menu. | +| Drag | | The widgets respond to mouse and touch drag gestures with a 1:1 precision ratio. By using two or more fingers, one can obtain higher precision gestures : each finger that touches the widget without moving will slow down the moving one. | diff --git a/resources/docs/js/extra.js b/resources/docs/js/extra.js deleted file mode 100644 index 461a28a8..00000000 --- a/resources/docs/js/extra.js +++ /dev/null @@ -1,8 +0,0 @@ -$(document).ready(function(){ - $.getJSON('https://api.github.com/repos/jean-emmanuel/open-stage-control',function(data){ - $('#github-stars').text(data.stargazers_count) - }) - $.getJSON('https://api.github.com/repos/jean-emmanuel/open-stage-control/tags',function(data){ - $('#github-version').text(data[0].name) - }) -}) diff --git a/resources/docs/user-guide/interface.md b/resources/docs/user-guide/interface.md deleted file mode 100644 index c06f69e2..00000000 --- a/resources/docs/user-guide/interface.md +++ /dev/null @@ -1,72 +0,0 @@ -# User interface - - ----- - -## URL Options - -Client specific options can be set by adding query parameters to the server's url. One must prepend the url with a question mark (`?`) followed by `parameter=value` pairs separated with ampersands (`&`). - -Supported options: - -- `hdpi=1`: enable high resolution canvas -- `doubletab=X`: sets the double tap/click time thershold in milliseconds (default to `375`) - -Example: - -`http://server-ip:port?hdpi=1` - -## Interaction events - -### Click / Tap - -Click / Tap events are handled at pressing time, not releasing. - -### Double Click / Tap - -Some widgets handle double click / tap events. - -### Right-click / Long touch - -Widgets that have only one value input will give focus to it when receiving this event. When the editor is enabled, Right-click / Long touch spawns the editor's context menu. - -### Drag - -The widgets respond to mouse and touch drag gestures with a 1:1 precision ratio. By using two or more fingers, one can obtain higher precision gestures : each finger that touches the widget without moving will slow down the moving one. - - ----- - - -## Editor - -The session editor can be enabled in the side panel. Once enabled, clicking on a widget or on a tab will make it the *selected object*, adding a fancy dashed blue border to it. - - -### Properties - -All the selected object's properties are displayed and can be modified in the side panel. Any modification will redraw the object **and all its children** if the submitted data is valid. Please refer to the [widgets reference](widgets-properties.md) for the list of valid options. - -Widgets containers such as tabs, strips and panels will also list their children here, which can be reordered using drag-and-drop. - -### Size / Position - -The selected object can be resized using its south, south-east and east handles. It can be dragged with its north-west handle. - -### Grid - -By default, widget resizing / dragging snaps to a 10 pixel wide grid. Its width can be customized in the editor (when its enabled). Setting its width to 1 will disable it. Note that the grid doesn't affect manual setting of a widget's size / position. - -### Context menu - -Right clicking / long touch on a widget or on a tab will also display a context menu providing useful utilities : - -- `Edit parent`: selects the widget's parent for edition -- `Copy`: copy widget's data -- `Cut`: copy widget's data and delete selected widget -- `Paste`: paste copied widget in selected container - - `n+1` : increments the id of the copied widget (and all its children) before pasting - - `Clone` : paste the exact same widget -- `Add widget`: create a new widget in selected container -- `Add tab`: create a new tab in selected container -- `Delete`: delete selected tab or widget diff --git a/resources/docs/user-guide/widgets-specifics/buttons.md b/resources/docs/widgets/buttons.md similarity index 95% rename from resources/docs/user-guide/widgets-specifics/buttons.md rename to resources/docs/widgets/buttons.md index 0e34b8e3..73e83310 100644 --- a/resources/docs/user-guide/widgets-specifics/buttons.md +++ b/resources/docs/widgets/buttons.md @@ -2,7 +2,7 @@ Buttons are exactly what you think they are. ----- + ## Toggle ```js @@ -12,14 +12,14 @@ 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 - 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](../widgets-properties.md#preargs)) -#### `off` +### `off` - type: `string|number|object` - default: `0` - usage: defines which value is sent on `off` position @@ -27,7 +27,7 @@ Buttons are exactly what you think they are. - can be an `object` if the type needs to be specified (see [preArgs](../widgets-properties.md#preargs)) ----- + ## Push ```js @@ -37,14 +37,14 @@ 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 - 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](../widgets-properties.md#preargs)) -#### `off` +### `off` - type: `string|number|object` - default: `0` - usage: defines which value is sent when releasing the button @@ -59,7 +59,7 @@ Buttons are exactly what you think they are. Setting the `push`'s value externally (via osc) will toggle it's inner light. ----- + ## Switch ```js @@ -69,7 +69,7 @@ Setting the `push`'s value externally (via osc) will toggle it's inner light. } ``` -#### `values` +### `values` - type: `array|object` - default: `{"Value 1":1,"Value 2":2}` - usage: diff --git a/resources/docs/user-guide/widgets-specifics/containers.md b/resources/docs/widgets/containers.md similarity index 82% rename from resources/docs/user-guide/widgets-specifics/containers.md rename to resources/docs/widgets/containers.md index 76b7187e..12a9a801 100644 --- a/resources/docs/user-guide/widgets-specifics/containers.md +++ b/resources/docs/widgets/containers.md @@ -1,14 +1,7 @@ # Containers -Containers can contain any widgets. Children can inherit from the container's properties by using the following syntax : `@{parent.propertyName}`. It can be used to: +Containers can contain any widgets. -- concatenate strings: `/@{parent.id}/some_suffix` -- define object value: `["@{parent.id}"]` - -If the retreived property is an object (`[] / {}`), it can be used as is or one can retreive a specfic item from it: `@{parent.variables.0}` will try to return the first item of the parent's `variables` property. - - ----- ## Panel @@ -22,23 +15,23 @@ Panels can contains tabs or widgets. These can be absolutely positioned and can } ``` -#### `scroll` +### `scroll` - type: `boolean` - default: `true` - usage: set to `false` to disable scrollbars -#### `widgets` +### `widgets` - type: `array` - default: `[]` - usage: each element of the `array` must be a widget `object`. A panel cannot contain widgets and tabs simultaneously. -#### `tabs` +### `tabs` - type: `array` - default: `[]` - usage: each element of the `array` must be a tab `object`. A panel cannot contain widgets and tabs simultaneously. -#### `variables` +### `variables` - type: `*` - default: `@{parent.variables}` - usage: defines one or more arbitrary variables that can be inherited by children widgets. @@ -49,19 +42,19 @@ Panels can contains tabs or widgets. These can be absolutely positioned and can - `@{parent.variables}` useful when nesting containers -#### `layout` +### `layout` - type: `string` - default: `''` - usage: `layout` must be a valid [Visual Format Language](https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/VisualFormatLanguage.html) expression. It accepts the [Extended Visual Format Language](https://github.com/IjzerenHein/autolayout.js#extended-visual-format-language-evfl) as well. Widgets are targeted using their `id` or their index prefixed with a `$` (`$0, $1, etc`), the latter method being incompatible with the [range spread operator](https://github.com/IjzerenHein/autolayout.js#view-ranges-spread-operator). Expressions can be tested and debugged with the online [Visual Format Editor](https://rawgit.com/IjzerenHein/visualformat-editor/master/dist/index.html). - note: this only applies when the panel contains widgets, not tabs -#### `spacing` +### `spacing` - type: `integer|array` - default: `0` - usage: spacing size used in `layout` expression, can be set as a `[vertical,horizontal]` array. - note: this only applies when the panel contains widgets, not tabs ----- + ## Strip @@ -74,23 +67,23 @@ Unidirectionnal panel with stretching capability. By default, children widgets t } ``` -#### `horizontal` +### `horizontal` - type: `boolean` - default: `false` - usage: set to `true` to display widgets horizontally -#### `stretch` +### `stretch` - type: `boolean` - default: `false` - usage: set to `true` to stretch widgets evenly -#### `widgets` +### `widgets` - type: `array` - default: `[]` - usage: each element of the `array` must be a widget `object` ----- + ## Modal @@ -103,15 +96,15 @@ Modals are buttons that turn into a centered popup panels when enabled. They can } ``` -#### `doubleTap` +### `doubleTap` - type: `boolean` - default: `false` - usage: set to `true` to make the modal require a double tap to open instead of a single tap -#### `popupWidth` / `popupHeight` +### `popupWidth` / `popupHeight` - type: `number|percentage` - default: `100%` - usage: sets the modal's size once opened -#### `options` +### `options` - see panel's [`options`](#panel) diff --git a/resources/docs/user-guide/widgets-specifics/maths.md b/resources/docs/widgets/maths.md similarity index 94% rename from resources/docs/user-guide/widgets-specifics/maths.md rename to resources/docs/widgets/maths.md index 909f8b46..90e15abb 100644 --- a/resources/docs/user-guide/widgets-specifics/maths.md +++ b/resources/docs/widgets/maths.md @@ -2,7 +2,7 @@ Maths do the maths ! ----- + ## Formula @@ -16,7 +16,7 @@ Formula evaluates mathematical expressions over other widgets' values each one o ``` -#### `formula` +### `formula` - type: `string` - default: `''` - usage: a [mathjs](http://mathjs.org/docs/expressions/syntax.html) expression in which @@ -24,14 +24,14 @@ Formula evaluates mathematical expressions over other widgets' values each one o - example: `${fader_1} * 2 + ${fader_2}` - **important note**: contrary to what is stated in *mathjs*' documentation, **matrix indexes are zero-based** here -#### `condition` +### `condition` - type: `string` - default: `''` - usage: - a [mathjs](http://mathjs.org/docs/expressions/syntax.html) comparison expression that bypasses widget's osc sending when returning`false` - example: `${fader_1} > 0.5` -#### `split` +### `split` - type: `object` - default: `[]` - usage: specify a different `address` for each item of the widget's value : `['/a', '/b']` diff --git a/resources/docs/user-guide/widgets-specifics/matrices.md b/resources/docs/widgets/matrices.md similarity index 90% rename from resources/docs/user-guide/widgets-specifics/matrices.md rename to resources/docs/widgets/matrices.md index 4702de21..b93643cb 100644 --- a/resources/docs/user-guide/widgets-specifics/matrices.md +++ b/resources/docs/widgets/matrices.md @@ -13,7 +13,7 @@ Multifader creates a row of vertical faders that respond to the same gestures. } ``` -#### `strips` +### `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) @@ -21,32 +21,32 @@ Multifader creates a row of vertical faders that respond to the same gestures. - `label`: `i` - `address`: same as the widget's with `/i` appended to it -#### `start` +### `start` - type: `integer` - default: `0` - usage: first faders's index -#### `traversing` +### `traversing` - type: `boolean` - default: `true` - usage: enable traversing gestures -#### `split` +### `split` - type: `boolean` - default: `false` - usage: if `true`, the fader's index will be appended to the widget's osc `address`; if `false` it will be prepended to the widget's `preArgs` -#### `color` +### `color` - type: `string|array` - default: `auto`, inherited accent color -- usage: can be an `array` of css color `strings`, which will be sequentially passed to the faders +- usage: can be an `array` of css color `strings`, which will be sequentially passed to the faders -#### `options` +### `options` - see fader's [`options`](sliders/#fader) ----- + ## Multitoggle ```js @@ -56,7 +56,7 @@ Multifader creates a row of vertical faders that respond to the same gestures. } ``` -#### `matrix` +### `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) @@ -64,33 +64,33 @@ Multifader creates a row of vertical faders that respond to the same gestures. - `label`: `i` - `address`: same as the widget's with `/i` appended to it -#### `start` +### `start` - type: `integer` - default: `0` - usage: first toggle's index -#### `traversing` +### `traversing` - type: `boolean` - default: `true` - usage: enable traversing gestures -#### `split` +### `split` - type: `boolean` - default: `false` - usage: if `true`, the toggle's index will be appended to the widget's osc `address`; if `false` it will be prepended to the widget's `preArgs` -#### `color` +### `color` - type: `string|array` - default: `auto`, inherited accent color - usage: can be an `array` of css color `strings`, which will be sequentially passed to the toggles -#### `options` +### `options` - see toggle's [`options`](buttons/#toggle) ----- + ## Multipush ```js { @@ -99,7 +99,7 @@ Multifader creates a row of vertical faders that respond to the same gestures. } ``` -#### `matrix` +### `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) @@ -107,32 +107,32 @@ Multifader creates a row of vertical faders that respond to the same gestures. - `label`: `i` - `address`: same as the widget's with `/i` appended to it -#### `start` +### `start` - type: `integer` - default: `0` - usage: first push's index -#### `traversing` +### `traversing` - type: `boolean` - default: `true` - usage: enable traversing gestures -#### `split` +### `split` - type: `boolean` - default: `false` - usage: if `true`, the push's index will be appended to the widget's osc `address`; if `false` it will be prepended to the widget's `preArgs` -#### `color` +### `color` - type: `string|array` - default: `auto`, inherited accent color - usage: can be an `array` of css color `strings`, which will be sequentially passed to the pushes -#### `options` +### `options` - see push's [`options`](buttons/#push) ----- + ## Keyboard This one works pretty much like the multipush, excepts it looks like a piano keyboard ad @@ -144,31 +144,31 @@ This one works pretty much like the multipush, excepts it looks like a piano key } ``` -#### `keys` +### `keys` - type: `integer` - default: `24` - usage: defines the number keys -#### `start` +### `start` - type: `integer` - default: `60` - usage: MIDI note number to start with (default is C4) -#### `traversing` +### `traversing` - type: `boolean` - default: `true` - usage: enable traversing gestures -#### `split` +### `split` - type: `boolean` - default: `false` - usage: if `true`, the note's midi code will be appended to the widget's osc `address`; if `false` it will be prepended to the widget's `preArgs` -#### `options` +### `options` - see push's [`options`](buttons/#push) -#### `css` +### `css` ``` --color-white:color; /* white keys color */ --color-black:color; /* black keys color */ diff --git a/resources/docs/user-guide/widgets-specifics/pads.md b/resources/docs/widgets/pads.md similarity index 92% rename from resources/docs/user-guide/widgets-specifics/pads.md rename to resources/docs/widgets/pads.md index 8c0dbc7a..480de0b6 100644 --- a/resources/docs/user-guide/widgets-specifics/pads.md +++ b/resources/docs/widgets/pads.md @@ -2,7 +2,7 @@ Pads are multidimensional widgets that output multiple values. ----- + ## XY @@ -14,45 +14,45 @@ Pads are multidimensional widgets that output multiple values. ``` -#### `rangeX` +### `rangeX` - type: `object` - default: `{"min":0,"max":1}` - usage: defines the `min` and `max` values for the `x` axis. Same as fader's [`range`](sliders/#fader) -#### `rangeY` +### `rangeY` - type: `object` - default: `{"min":0,"max":1}` - usage: defines the `min` and `max` values for the `y` axis. Same as fader's [`range`](sliders/#fader) -#### `logScaleX` +### `logScaleX` - type: `boolean` - default: `false` - usage: set to `true` to use logarithmic scale for the `x` axis (log10) -#### `logScaleY` +### `logScaleY` - type: `boolean` - default: `false` - usage: set to `true` to use logarithmic scale for the `y` axis (log10) -#### `snap` +### `snap` - type: `boolean` - default: `false` - usage: 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` +### `spring` - type: `boolean` - default: `false` - usage: when set to `true`, the widget will go back to its initial value when released. -#### `doubleTap` +### `doubleTap` - type: `boolean` - default: `false` - usage: set to `true` to make the xy reset to its initial value when receiving a double tap -#### `split` +### `split` - type: `boolean|object` - default: `false` - usage: @@ -60,7 +60,7 @@ Pads are multidimensional widgets that output multiple values. - can be set as an object to specify a different `address` : `['/osc_address_x', '/osc_address_y']` - note: the widget will only respond to its original osc address, not to the splitted version ----- + ## MultiXy @@ -71,40 +71,40 @@ Pads are multidimensional widgets that output multiple values. } ``` -#### `points` +### `points` - type: `integer|array` - default: `2` - usage: defines the number of points on the pad. Can be an `array` of `strings` that will be used as labels for the points (ex: `['A', 'B']`) -#### `pointSize` +### `pointSize` - type: `integer` - default: `15` - usage: defines the points's size -#### `rangeX` +### `rangeX` - type: `object` - default: `{"min":0,"max":1}` - usage: defines the `min` and `max` values for the `x` axis. Same as fader's [`range`](sliders/#fader) -#### `rangeY` +### `rangeY` - type: `object` - default: `{"min":0,"max":1}` - usage: defines the `min` and `max` values for the `y` axis. Same as fader's [`range`](sliders/#fader) -#### `logScaleX` +### `logScaleX` - type: `boolean` - default: `false` - usage: set to `true` to use logarithmic scale for the `x` axis (log10) -#### `logScaleY` +### `logScaleY` - type: `boolean` - default: `false` - usage: set to `true` to use logarithmic scale for the `y` axis (log10) -#### `split` +### `split` - type: `boolean|object` - default: `false` - usage: @@ -112,12 +112,12 @@ Pads are multidimensional widgets that output multiple values. - can be set as an object to specify a different `address` : `['/0/x', '/0/y', '/1/x', '/2/y']` - note: the widget will only respond to its original osc address, not to the splitted version -#### `snap` +### `snap` - type: `boolean` - default: `false` - usage: by default, the points are dragged from their initial position; if set to `true`, touching anywhere on the widget's surface will make them snap to the touching coordinates (one per touch). ----- + ## RGB @@ -132,15 +132,15 @@ RGB is a variant of XY, it outputs rgb values between 0 and 255. ``` -#### `precision` +### `precision` - default:`0` -#### `snap` +### `snap` - type: `boolean` - default: `false` - usage: 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. -#### `split` +### `split` - type: `boolean|object` - default: `false` - usage: diff --git a/resources/docs/user-guide/widgets-specifics/plots.md b/resources/docs/widgets/plots.md similarity index 91% rename from resources/docs/user-guide/widgets-specifics/plots.md rename to resources/docs/widgets/plots.md index 2762537c..cc54d48f 100644 --- a/resources/docs/user-guide/widgets-specifics/plots.md +++ b/resources/docs/widgets/plots.md @@ -10,12 +10,12 @@ Plots are tools that display other widgets' state or incomming osc messages. The } ``` -#### `range` +### `range` - type: `object` - default: `{"min":0,"max":1}` - usage: defines the `min` and `max` value the led's intensity will be mapped to -#### `logScale` +### `logScale` - type: `boolean` - default: `false` - usage: set to true use logarithmic scaling @@ -44,7 +44,7 @@ The plot receives an array of [x,y] coordinates and draws them on a chart with } ``` -#### `points` +### `points` - type: `array|string` - default: `[]` - usage: @@ -53,7 +53,7 @@ The plot receives an array of [x,y] coordinates and draws them on a chart with - `number`: constant values - `string`: a widget's `id` whose value will be used -#### `range` +### `range` - type: `object` - default: `{ @@ -62,17 +62,17 @@ The plot receives an array of [x,y] coordinates and draws them on a chart with }` - usage: defines the `min` and `max` values for the `x` and `y` axis -#### `logScaleX` +### `logScaleX` - type: `boolean` - default: `false` - usage: set to `true` to use logarithmic scale for the `x` axis (log10) -#### `logScaleY` +### `logScaleY` - type: `boolean` - default: `false` - usage: set to `true` to use logarithmic scale for the `y` axis (log10) -#### `origin` +### `origin` - type: `number` - default: `auto` - usage: defines the y-axis origin. Set to `false` to disable it. @@ -88,7 +88,7 @@ The Eq receives an array of filter objects and draws their frequency response be } ``` -#### `filters` +### `filters` - type: `array` - default: `[]` - usage: @@ -105,23 +105,23 @@ The Eq receives an array of filter objects and draws their frequency response be } ``` -#### `resolution` +### `resolution` - type: `number` - default: `128` - usage: defines the number of points used to compute the frequency response -#### `rangeY` +### `rangeY` - type: `object` - default: `{"min":-20,"max":20}` - usage: defines the `min` and `max` values for the `y` axis (dB level) -#### `logScaleX` +### `logScaleX` - type: `boolean` - default: `false` - usage: set to `true` to use logarithmic scale for the `x` axis (log10) -#### `origin` +### `origin` - type: `number` - default: `auto` - usage: defines the y-axis origin. Set to `false` to disable it. @@ -137,27 +137,27 @@ The visualizer displays the evolution in time of a received value (through osc) } ``` -#### `widgetId` +### `widgetId` - type: `object` - default: `empty` - usage: a widget's `id` whose value will be displayed (thus bypassing the incoming osc) -#### `duration` +### `duration` - type: `number` - default: `1` - usage: window size in seconds -#### `range` +### `range` - type: `object` - default: `{"min":0,"max":1}` - usage: defines the `min` and `max` values for the `y` axis -#### `logScale` +### `logScale` - type: `boolean` - default: `false` - usage: set to `true` use logarithmic scaling (log10) -#### `origin` +### `origin` - type: `number` - default: `auto` - usage: defines the y-axis origin. Set to `false` to disable it. @@ -173,12 +173,12 @@ Text displays incoming values (via osc) as text. Sending a message with no argum } ``` -#### `widgetId` +### `widgetId` - type: `object` - default: `empty` - usage: a widget's `id` whose value will be displayed -#### `vertical` +### `vertical` - type: `boolean` - default: `false` - usage: set to `true` display vertically @@ -194,18 +194,18 @@ Meter displays incoming numerical values (via osc) as a gauge level } ``` -#### `widgetId` +### `widgetId` - type: `object` - default: `empty` - usage: a widget's `id` whose value will be displayed -#### `horizontal` +### `horizontal` - type: `boolean` - default: `false` - usage: set to `true` to display the meter horizontally -#### `range` +### `range` - see fader's [`range`](sliders/#fader) -#### `logScale` +### `logScale` - see fader's [`logScale`](sliders/#fader) diff --git a/resources/docs/user-guide/widgets-specifics/sliders.md b/resources/docs/widgets/sliders.md similarity index 91% rename from resources/docs/user-guide/widgets-specifics/sliders.md rename to resources/docs/widgets/sliders.md index 4b61a479..30956c82 100644 --- a/resources/docs/user-guide/widgets-specifics/sliders.md +++ b/resources/docs/widgets/sliders.md @@ -2,7 +2,7 @@ Sliders are unidimensional widgets that output one value at a time. ----- + ## Fader ```js @@ -12,28 +12,28 @@ Sliders are unidimensional widgets that output one value at a time. } ``` -#### `horizontal` +### `horizontal` - type: `boolean` - default: `false` - usage: set to `true` to display the fader horizontally -#### `alignRight` +### `alignRight` - type: `boolean` - default: `false` - usage: set to `true` to invert the pip's and fader's position -#### `noPip` +### `noPip` - type: `boolean` - default: `false` - usage: set to `true` to hide the scale -#### `compact` +### `compact` - type: `boolean` - default: `false` - usage: set to `true` to display a compact alternative for the widget. Disables default mouse/touch focusing on the value display (right-click/long-touch still triggers it). -#### `range` +### `range` - type: `object` - default: `{"min":0,"max":1}` - usage: `range` defines the breakpoints of the fader's scale @@ -48,59 +48,59 @@ range: { } ``` -#### `origin` +### `origin` - type: `number` - default: `auto` - usage: `origin` defines the starting point's value of the fader's gauge -#### `logScale` +### `logScale` - type: `boolean` - default: `false` - usage: set to `true` use logarithmic scaling between breakpoints (log10) -#### `unit` +### `unit` - type: `string` - default: `empty` - usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages) -#### `snap` +### `snap` - type: `boolean` - default: `false` - usage: 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` +### `spring` - type: `boolean` - default: `false` - usage: when set to `true`, the widget will go back to its initial value when released. -#### `doubleTap` +### `doubleTap` - type: `boolean` - default: `false` - usage: set to `true` to make the fader reset to its initial value when receiving a double tap -#### `meter` +### `meter` - 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 widget's with `/meter` appended to it - the meter's `address `will be the same as the widget's with `/meter` appended to it -#### `meterAddress` +### `meterAddress` - type: `boolean` - default: `empty` - usage: overrides the `meter`'s osc address -#### `css` +### `css` ``` --color-gauge:color; --color-knob:color; --color-pips:color; ``` ----- + ## Knob @@ -112,22 +112,22 @@ range: { ``` -#### `noPip` +### `noPip` - type: `boolean` - default: `true` - usage: set to `false` to show the scale -#### `compact` +### `compact` - type: `boolean` - default: `false` - usage: set to `true` to display a compact alternative for the widget. Disables mouse/touch focusing on the value display. -#### `angle` +### `angle` - type: `number` - default: `270` - usage: `angle` defines the angle's width of the knob, in degrees -#### `range` +### `range` - type: `object` - default: `{"min":0,"max":1}` - usage: `range` defines the breakpoints of the fader's scale @@ -142,39 +142,39 @@ range: { } ``` -#### `origin` +### `origin` - type: `number` - default: `auto` - usage: `origin` defines the starting point's value of the knob's gauge -#### `logScale` +### `logScale` - type: `boolean` - default: `false` - usage: set to `true` use logarithmic scaling between breakpoints -#### `unit` +### `unit` - type: `string` - default: `empty` - usage: `unit` will be appended to the displayed widget's value (it doesn't affect osc messages) -#### `snap` +### `snap` - type: `boolean` - default: `false` - usage: by default, dragging the widget *vertically* 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` +### `spring` - type: `boolean` - default: `false` - usage: when set to `true`, the widget will go back to its initial value when released. -#### `doubleTap` +### `doubleTap` - type: `boolean` - default: `false` - usage: set to `true` to make the knob reset to its initial value when receiving a double tap -#### `css` +### `css` ``` --color-gauge:color; --color-knob:color; @@ -192,24 +192,24 @@ An endless knob that only responds to rotative gestures. } ``` -#### `ticks` +### `ticks` - type: `number` - default: `360` - usage: defines the granularity / verbosity of the encoder (number of step for a 360° arc) -#### `back` +### `back` - type: `string|number|object` - default: `-1` - usage: defines which value is sent when rotating the encoder anticlockwise - can be an `object` if the type needs to be specified (see [preArgs](../widgets-properties.md#preargs)) -#### `forth` +### `forth` - type: `string|number|object` - default: `1` - usage: defines which value is sent when rotating the encoder clockwise - can be an `object` if the type needs to be specified (see [preArgs](../widgets-properties.md#preargs)) -#### `release` +### `release` - type: `string|number|object` - default: `empty` - usage: defines which value is sent when releasing the encoder @@ -217,17 +217,17 @@ An endless knob that only responds to rotative gestures. - can be an `object` if the type needs to be specified (see [preArgs](../widgets-properties.md#preargs)) -#### `snap` +### `snap` - type: `boolean` - default: `false` - usage: 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. -#### `doubleTap` +### `doubleTap` - type: `boolean` - default: `false` - usage: set to `true` to make the encoder reset to its initial value when receiving a double tap -#### `css` +### `css` ``` --color-knob:color; ``` diff --git a/resources/docs/user-guide/widgets-specifics/switchers.md b/resources/docs/widgets/switchers.md similarity index 95% rename from resources/docs/user-guide/widgets-specifics/switchers.md rename to resources/docs/widgets/switchers.md index d5ab35e7..e1e6f673 100644 --- a/resources/docs/user-guide/widgets-specifics/switchers.md +++ b/resources/docs/widgets/switchers.md @@ -2,7 +2,7 @@ Switcher can store and recall the state of other widgets. ----- + ## Switcher @@ -16,7 +16,7 @@ The switcher looks like the [`switch`](buttons/#switch). Each of its possible va } ``` -#### `linkedWidgets` +### `linkedWidgets` - type: `array|string` - default: `empty` @@ -25,7 +25,7 @@ The switcher looks like the [`switch`](buttons/#switch). Each of its possible va - as an `array`: a list of widget `id` `strings` -#### `values` +### `values` - type: `array|object` - default: `["A", "B"]` - usage: diff --git a/resources/docs/user-guide/widgets-properties.md b/resources/docs/widgets/widgets.md similarity index 73% rename from resources/docs/user-guide/widgets-properties.md rename to resources/docs/widgets/widgets.md index 825f9c92..379134c5 100644 --- a/resources/docs/user-guide/widgets-properties.md +++ b/resources/docs/widgets/widgets.md @@ -1,69 +1,34 @@ -## Widgets properties +# 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: +All widgets share a set of generic properties described below. -- [Sliders](widgets-specifics/sliders.md) -- [Buttons](widgets-specifics/buttons.md) -- [Pads](widgets-specifics/pads.md) -- [Matrices](widgets-specifics/matrices.md) -- [Plots](widgets-specifics/plots.md) -- [Containers](widgets-specifics/containers.md) -- [Switchers](widgets-specifics/switchers.md) -- [Maths](widgets-specifics/maths.md) +## Basics -```js -{ - // widget properties -} -``` - -## Property inheritance - -Widgets can use each other's property values by using the following syntaxes: - -- `@{this.propertyName}` -- `@{parent.propertyName}` -- `@{widgetId.propertyName}` (where `widgetId` is the target widget's `id`) - -It can be used to: - -- concatenate strings: `/@{parent.id}/some_suffix` -- define object value: `["@{parent.id}"]` - -If the retreived property is an object (`[] / {}`), it can be used as is or one can retreive a specfic item from it: `@{parent.variables.0}` will try to return the first item of the parent's `variables` property. - -Note: the root panel's `id` is `root`. - ----- -### Basics - -#### `type` +### `type` - type: `string` - default: `fader` -#### `id` +### `id` - type: `string` - default: generated unique 'widget_n' - usage: widgets sharing the same `id` will act as clones and update each other's value(s) without sending extra osc messages. -#### `linkId` +### `linkId` - type: `string` - default: `empty` - usage: widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages. +## Style ----- -### Style - -#### `label` +### `label` - type: `string|false` - default: `auto`, which displays `id` - usage: - set to `false` to hide completely - insert icons from [FontAwesome](http://fontawesome.io/icons/) using the prefix `^` followed by the icon's name : `made with ^heart`, etc -#### `top` / `left` +### `top` / `left` - type: `number|percentage` - default: `auto` - usage: @@ -71,17 +36,17 @@ Note: the root panel's `id` is `root`. - otherwise, the widget will be absolutely positioned -#### `width` / `height` +### `width` / `height` - type: `number|percentage` - default: `auto` -#### `color` +### `color` - type: `string` - default: `auto`, inherited accent color - usage: any valid `css` color code is valid, this will change the default accent color for the widget and all its children -#### `css` +### `css` - type: `string` - default: *empty* - usage: the `css` property can be used to override inherited [theming](theming.md) variables. Also, some widgets expose specific theming variables that allow a finer customization. Standard `css` properties can be applied to the widget's root element through this property, `css` selectors can also be used apply custom styles to the widget's children. @@ -89,23 +54,23 @@ Note: the root panel's `id` is `root`. - `border-radius:5rem; .label {font-size: 20rem}` will round the widget's corners and increase its label's font-size and all its children's labels' - `border-radius:5rem; > .label {font-size: 20rem}` will round the widget's corners and increase its label's font-size (the `>` selector targets only the direct children of the widget element) ----- -### OSC + +## OSC -#### `value` +### `value` - type: `*` - default: `empty` - usage: if set, the widget will be initialized with this `value`. This won't affect linked widgets and won't send any osc message. - note: its `type` must match the widget's value type (ie a `number` for sliders, an `array` for pads, etc). **Changes made to `value` won't be visible until the session is reloaded.** -#### `precision` +### `precision` - type: `integer` - default: `2` - usage: the `precision` property defines the number of decimals to display and to send. Set to `0` to send `integers` only. -#### `target` +### `target` - type: `array` - default: `[]` - usage: @@ -115,12 +80,12 @@ Note: the root panel's `id` is `root`. - if no target is set, messages can still be sent if the server has synchronized hosts (`-s / --sync`) - if [`midi`](midi.md) is enabled, targets can be `"midi:device_name"` -#### `address` +### `address` - type: `string` - default: `/widgets_id` - usage: this is the `address` of the osc messages sent by the widget, it must start with a `/` -#### `touchAddress` +### `touchAddress` - type: `string` - default: `empty` - usage: sliders and pads can send special osc messages to inform weither they are currently touched or not. The osc message will be of the following form : @@ -128,7 +93,7 @@ Note: the root panel's `id` is `root`. /touch/address [preArgs] 0/1 ``` -#### `preArgs` +### `preArgs` - type: `array` - default: `[]` - usage: diff --git a/resources/images/logo-material.svg b/resources/images/logo-material.svg new file mode 100644 index 00000000..e6e8426d --- /dev/null +++ b/resources/images/logo-material.svg @@ -0,0 +1,98 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/resources/mkdocs.yml b/resources/mkdocs.yml index c922614c..56fe9690 100644 --- a/resources/mkdocs.yml +++ b/resources/mkdocs.yml @@ -1,10 +1,59 @@ site_name: Open Stage Control +repo_name: open-stage-control repo_url: https://github.com/jean-emmanuel/open-stage-control -theme: cinder copyright: "Open Stage Control is an AMMD software licensed under the GNU/GPLv3 License" site_description: "A libre desktop OSC bi-directionnal control surface application." -extra_css: - - css/extra.css -extra_js: - - js/extra.js + +theme: material + site_favicon: img/logo.png + +extra: + palette: + primary: blue grey + accent: blue + feature: + tabs: false + logo: img/logo-material.svg + +pages: + - Open Stage Control: index.md + - Getting started: getting-started.md + - User interface: interface.md + - Editing sessions: editing-sessions.md + - Widgets reference: + - Widget properties: widgets/widgets.md + - Containers: widgets/containers.md + - Sliders: widgets/sliders.md + - Pads: widgets/pads.md + - Buttons: widgets/buttons.md + - Switchers: widgets/switchers.md + - Plots: widgets/plots.md + - Matrices: widgets/matrices.md + - Maths: widgets/maths.md + - Extras: + - Property inheritance: extras/property-inheritance.md + - Theming: extras/theming.md + - URL options: extras/url-options.md + - Remote control: extras/remote-control.md + - Custom module: extras/custom-module.md + - Midi: extras/midi.md + +markdown_extensions: + - markdown.extensions.admonition + - markdown.extensions.codehilite(guess_lang=false) + - markdown.extensions.def_list + - markdown.extensions.footnotes + - markdown.extensions.meta + - markdown.extensions.toc(permalink=true) + - pymdownx.arithmatex + - pymdownx.betterem(smart_enable=all) + - pymdownx.caret + - pymdownx.critic + - pymdownx.inlinehilite + - pymdownx.magiclink + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.superfences + - pymdownx.tasklist(custom_checkbox=true) + - pymdownx.tilde