Section Views
View utility functions
- See
- View
Summary
| Return type | Function and summary |
|---|---|
| AddImagesDirectory(string path) Add a directory where script can search for pictures. | |
| int | AdjustStavesGroupSymbolPosition(Score score, table groups) Experimental: Adjust horizontal and vertical staves group symbole (braces and brackets). |
| int | ChooseNoteHeadShape(int defaultValue) Open a dialog to choose a note head shape. |
| int | ChooseView(Score score, boolean index, int (default=current) Ask the user to choose one view, or a value for ViewIndex. |
Functions
ChooseNoteHeadShape(int defaultValue)
Open a dialog to choose a note head shape.
| Parameter | Type | Default | Description |
|---|---|---|---|
| defaultValue | int | SHAPE_NORMAL | One of SHAPE_* constants in MSDefine |
- Return
- int: One of SHAPE_* constants, or
nilif user cancelled the choice.
AdjustStavesGroupSymbolPosition(Score score, table groups)
Experimental: Adjust horizontal and vertical staves group symbole (braces and brackets).
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| groups | table | nil | Table of StavesGroup to modify, others are unchanged. nil or empty table means all staves group of score. |
- Return
- int: Number of modified staves group symbols.
ChooseView(Score score, boolean index, int (default=current)
Ask the user to choose one view, or a value for ViewIndex.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| index | boolean | Add the choices
| |
| (default=current | int | view) selected index |
- Return
- int: view index
AddImagesDirectory(string path)
Add a directory where script can search for pictures.
Menus and other Component may include image (picture) which are searched by file name in some Harmony's subdirs, but not in relative paths from the current script. If you script embed images, it is good practice to call AddImagesDirectory(GetCurrentScript()) just after Include "SMUtils".
| Parameter | Type | Default | Description |
|---|---|---|---|
| path | string | path |