]> git.donarmstrong.com Git - lilypond.git/blob - hdr/command.hh
release: 0.0.18
[lilypond.git] / hdr / command.hh
1 #ifndef COMMAND_HH
2 #define COMMAND_HH
3
4 #include "glob.hh"
5 #include "vray.hh"
6 #include "scalar.hh"
7
8 enum Commandcode {
9         NOP,
10         INTERPRET,
11         TYPESET,
12         BREAK_PRE,BREAK_MIDDLE, BREAK_POST, BREAK_END
13 };
14
15 /// set a nonrythmical symbol
16 struct Command {
17     Commandcode code;
18
19 //    Real when;
20     /// analogous to argv[]
21     svec<Scalar> args;
22
23     ///
24     int priority;
25     /** in what order relative to other TYPESET commands (eg, bar
26        should precede meter). Highest priority first. */
27     
28     /****************/
29     
30     Command();
31 //    Command(Real w);
32     bool isbreak()const;
33     void print() const;
34 };
35
36 /**
37     A nonrhythmical "thing" in a  staff is called a "command".
38     Commands have these properties:
39
40     \begin{itemize}
41     \item They are \bf{not} rhythmical, i.e. they do not have  a duration
42     \item They have a staff-wide impact, i.e. a command cannot be targeted at
43     only one voice in the staff: two voices sharing a staff can't have
44     different clefs
45     \item Commands are ordered, that is, when from musical point of view the
46     commands happen simultaneously, the order in which Staff receives the
47     commands can still make a difference in the output
48     \item Some commands are actually score wide, so Score has to issue these
49     commands to the Staff, eg. BREAK commands
50     \end{itemize}
51
52     At this moment we have three classes of commands:
53     \begin{description}
54     INTERPRET commands are not grouped.
55     \item[TYPESET] These commands instruct the Staff to
56     typeset symbols on the output, eg meter/clef/key changes
57     \item[INTERPRET] These commands do not produce output, instead,
58     they change the interpretation of other commands or requests. 
59     example: shift output vertically, set the key.
60     \item[BREAK_XXX] These commands group TYPESET commands in
61     prebreak and postbreak commands. See Documentation/breaking    
62     
63     Staff can insert additional commands in a sequence of BREAK_XXX
64     commands, eg. key change commands
65
66     \end{description}
67     
68     These commands are generated by Score, since they have to be the
69     same for the whole score.
70     
71
72     \begin{description}
73     \item[BREAK_PRE]
74     \item[BREAK_MIDDLE]
75     \item[BREAK_POST]
76     \item[BREAK_END]
77     \item[TYPESET] METER,BAR
78     \end{description}
79  
80
81     Commands can be freely copied, they do not have virtual methods.
82     
83     */
84
85
86 #endif