Section Diagrams

Chord diagrams utility functions

See
Diagram

Summary

Return typeFunction and summary
intApplyToAllDiagrams(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.
intApplyToAllSelectedDiagrams(Score score, function processFunc, boolean printedStavesOnly)
Apply a function to all selected chord diagrams (Diagram objects), individually selected or inside range selection.
booleanEnsureObjectInStaffArea(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.

ParameterTypeDefaultDescription
scoreScore score
staffStaff staff
obj  Object: Dynamic, StaffText, FXProcessor, Picture
Return
boolean: true if object has been moved vertically, false otherwise.

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.

ParameterTypeDefaultDescription
scoreScore score
processFuncfunction 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.
printedStavesOnlybooleanfalseIf 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.

ParameterTypeDefaultDescription
scoreScore score
staves nil
  • nil means all staves
  • a Staff object to apply only to that staff
  • a table of Staff to apply to a list of staves
firstBarint1First bar to start applying the function.
lastBarintscore.NumberOfBarsLast bar to stop applying the function.
processFuncfunction 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