--Author: John Maxwell
--last modified: November 9, 1981 9:07 AM

DIRECTORY
Graphics: FROM "Graphics",
MusicDefs: FROM "MusicDefs";

Selection: DEFINITIONS
IMPORTS MusicDefs =
BEGIN
OPEN MusicDefs;

AddGreyLine:PROCEDURE[time1,time2:Time];
AddLine:PROCEDURE[time1,time2:Time];
AddNote:PROCEDURE[n:NotePTR]; -- use clear to clear current selection
Clear:PROCEDURE;
Draw:PROCEDURE;
RemoveNote:PROCEDURE[n:NotePTR];

Includes:PROCEDURE[n:NotePTR] RETURNS[BOOLEAN] = INLINE
{IF voice AND n.voice#selectedVoice THEN RETURN[FALSE];
IF lineSelect
THEN RETURN[n.sync.time IN [select1..select2)]
ELSE FOR i:CARDINAL IN [0..selectionLength) DO
IF selection[i]=n THEN RETURN[TRUE];
ENDLOOP;
RETURN[FALSE]};

--****************************************************************************
--
procedures that take the current selection as an implicit parameter
--****************************************************************************

ClearBeam:PROCEDURE;
ClearChord:PROCEDURE;
ClearSync:PROCEDURE;
ClearTie:PROCEDURE;
Delete:PROCEDURE;
HideNTuplets:PROCEDURE[invisible:BOOLEAN];
MakeBeam:PROCEDURE[beamed:BOOLEAN←TRUE];
MakeBeamOfBeams:PROCEDURE[beamed:BOOLEAN←TRUE];
MakeChord:PROCEDURE;
MakeNTuplet:PROCEDURE[n,a:INTEGER];
MakeNTupletOfBeams:PROCEDURE[n,a:INTEGER];
MakeSync:PROCEDURE;
MakeTie:PROCEDURE;
SetGrace:PROCEDURE[grace:BOOLEAN];
SetNoteValue:PROCEDURE[v:NoteValue,dots:INTEGER];
SetRest:PROCEDURE[rest:BOOLEAN];
SetStaff:PROCEDURE[staff:CARDINAL];
SetStem:PROCEDURE[stemUp:BOOLEAN];
Transpose:PROCEDURE[halfsteps:INTEGER];

END..