Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/rorywalsh/cabbage into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
rorywalsh committed Dec 28, 2022
2 parents c9820eb + 03248e2 commit 6a8ab32
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif()


if(NOT DEFINED BUILD_VERSION)
set(BUILD_VERSION 2.8.156)
set(BUILD_VERSION 2.8.157)
endif()

project(${PROJECT_NAME} VERSION ${BUILD_VERSION})
Expand Down
9 changes: 7 additions & 2 deletions Docs/markdown/Widgets/Properties/mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
_____________________________
**mode("mode")**

When used with a filebutton, valid modes are:
Can be used with a `filebutton`, `texteditor` and a combobox. Valid modes are:

`filebutton`:
* *file*, Default. Will open a browser to select a file
* *save*, Will open a browser to select an existing file, or write the name of a new file. Note Cabbage will not create this new file, you will need to do that yourself in Csound.
* *directory*, Will open the browser to select a folder/directory
* *preset*, Will stop the file browser from opening, and instead write a preset file to disk with a default file name. See [Presets](./presets.md)
* *named preset*, Will display a message box with a text editor so that users can name their presets. See [Presets](./presets.md)
* *remove preset*, Will remove the currently select preset from the snapshot XML file. See [Presets](./presets.md)

<br> When used with a `texteditor`, it sets multiline mode. Defaults to "single". Use "multi" to enable multiline.
`texteditor`:
* *multline*, Defaults to "single". Use "multi" to enable multiline.

`combobox`:
* *resize*, use `mode("resize")` to make the combobox act as a UI resizer.
5 changes: 4 additions & 1 deletion Docs/markdown/Widgets/combobox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Combobox creates a drop-down list of items which users can choose from. Once the user selects an item, the index of their selection will be sent to Csound on a channel named by the channel string. The default value is 0. The first item in the combobox will be seen as a 1, while 0 refers to no current selection.

A combobox can also be set up a work with strings. In this case Csound will receive the currently selected string instead of the current index. Note that using a combobox in this way renders it useless in terms of host automation. Host automation can only be achieved when a combobox is sending the current index, rather than the current string.
A combobox can also be set up a work with strings. In this case Csound will receive the currently selected string instead of the current index. Note that using a combobox in this way renders it useless in terms of host automation. Host automation can only be achieved when a combobox is sending the **current** index, rather than the current string.

A combobox can also be used to resize a plugin's UI by setting `mode("resize")`. Set `value(3)` to have the UI appear at 100%. User will be given the option of resizing from 25% to 200%.

<video width="800" height="600" controls>
<source src="../../images/docs/combobox.mp4">
Expand All @@ -26,6 +28,7 @@ combobox WIDGET_SYNTAX

{! ./markdown/Widgets/Properties/sort.md !}

{! ./markdown/Widgets/Properties/mode.md !}

### Common Identifiers
{! ./markdown/Widgets/Properties/active.md !}
Expand Down

0 comments on commit 6a8ab32

Please sign in to comment.