Section Diagrams
Chord diagrams utility functions
- See
- Diagram
Summary
| Return type | Function and summary |
|---|---|
| int | ApplyToAllDiagrams(Score score, staves, int firstBar, int lastBar, function processFunc) Apply a function to all chord diagrams (Diagram objectss) in the score, or staff, or in a range of bars. |
| int | ApplyToAllSelectedDiagrams(Score score, function processFunc, boolean printedStavesOnly) Apply a function to all selected chord diagrams (Diagram objects), individually selected or inside range selection. |
| boolean | EnsureObjectInStaffArea(Score score, Staff staff, obj) Ensure an object is in the Staff area, move it vertically if needed. |
Functions
EnsureObjectInStaffArea(Score score, Staff staff, obj)
Ensure an object is in the Staff area, move it vertically if needed.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| staff | Staff | staff | |
| obj | Object: Dynamic, StaffText, FXProcessor, Picture |
- Return
- boolean:
trueif object has been moved vertically,falseotherwise.
ApplyToAllSelectedDiagrams(Score score, function processFunc, boolean printedStavesOnly)
Apply a function to all selected chord diagrams (Diagram objects), individually selected or inside range selection.
This browses selected chord diagrams on visible (printed) staves from first to last.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| processFunc | function | Function with two Diagram and Staff arguments, which returns true (= 1) if digram has been processed, -1 to stop the process. Other returned values are ignored, process continue to next. | |
| printedStavesOnly | boolean | false | If true selected images on not printed staves are skipped. This has no effect in Scroll mode where all staves are visible. |
- Return
- int: Number of processed diagrams
- Error
- if arguments are not valid.
ApplyToAllDiagrams(Score score, staves, int firstBar, int lastBar, function processFunc)
Apply a function to all chord diagrams (Diagram objectss) in the score, or staff, or in a range of bars.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| staves | nil | ||
| firstBar | int | 1 | First bar to start applying the function. |
| lastBar | int | score.NumberOfBars | Last bar to stop applying the function. |
| processFunc | function | Function with two Diagram and Staff arguments, which returns true (= 1) if diagram has been processed, -1 to stop the process. Other returned values are ignored, process continue to next diagram. |
- Return
- int: Number of processed chord diagrams
- Error
- if arguments are not valid.
- See
- ApplyToAllSelectedDiagrams