2 command-request.hh -- declare non-musical requests
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef COMMANDREQUEST_HH
11 #define COMMANDREQUEST_HH
15 #include "duration.hh"
16 #include "musical-pitch.hh"
18 /** Request which are assumed to be "happening" before the
19 musical requests. Not coupled to a note or rest. */
20 class Command_req : public virtual Request {
22 REQUESTMETHODS(Command_req);
27 class Break_req : public Command_req {
29 enum { DISALLOW = -10000, FORCE = 10000 };
32 REQUESTMETHODS (Break_req);
35 class Mark_req : public Command_req {
39 REQUESTMETHODS (Mark_req);
42 class Command_script_req : public Command_req, public Script_req {
46 ~Command_script_req();
47 REQUESTMETHODS(Command_script_req);
51 /** Baseclass for time_signature/partial req. It has to be handled by
52 Staff_{walker,column} baseclass. */
53 class Timing_req : public Command_req {
55 REQUESTMETHODS(Timing_req);
59 class Tempo_req : public Timing_req
66 REQUESTMETHODS(Tempo_req);
67 bool do_equal_b (Request *) const;
70 class Partial_measure_req : public Timing_req {
74 Partial_measure_req (Moment);
75 REQUESTMETHODS(Partial_measure_req);
76 bool do_equal_b (Request*) const;
80 todo: allow C time_signature
82 class Time_signature_change_req : public Timing_req {
84 int beats_i_, one_beat_i_;
86 Time_signature_change_req();
87 bool do_equal_b (Request*) const;
88 REQUESTMETHODS(Time_signature_change_req);
91 /// toggle Cadenza mode
92 class Cadenza_req : public Timing_req {
96 bool do_equal_b (Request*) const;
98 REQUESTMETHODS(Cadenza_req);
101 /// check if we're at start of a measure.
102 class Barcheck_req : public Timing_req {
104 bool do_equal_b (Request *) const;
105 REQUESTMETHODS(Barcheck_req);
108 class Measure_grouping_req : public Timing_req {
110 Array<int> beat_i_arr_;
111 Array<Moment> elt_length_arr_;
112 bool do_equal_b (Request *) const;
113 REQUESTMETHODS(Measure_grouping_req);
116 /** draw a (repeat)-bar. This something different than #Barcheck_req#,
117 the latter should only happen at the start of a measure. */
118 class Bar_req : public Command_req {
122 bool do_equal_b (Request*) const;
124 REQUESTMETHODS(Bar_req);
130 Routines for sharps and flats are separated,
131 so that caller may identify non-conventional keys.
133 class Key_change_req : public Command_req {
135 Array<Musical_pitch> pitch_arr_;
137 bool ordinary_key_b_;
140 REQUESTMETHODS(Key_change_req);
142 /// squash the octaves to 1
143 void squash_octaves();
144 /// return number of flats in key
147 /// return number of sharps in key
150 void transpose (Musical_pitch d);
151 bool minor_b() const;
154 class Clef_change_req : public Command_req {
157 Clef_change_req (String);
158 REQUESTMETHODS(Clef_change_req);
161 class Bracket_req : public Span_req, public Command_req {
164 REQUESTMETHODS(Bracket_req);
168 #endif // COMMANDREQUEST_HH