2 command-request.hh -- declare non-musical requests
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 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);
50 class Command_tie_req : public Command_req {
52 REQUESTMETHODS(Command_tie_req);
55 /** Baseclass for time_signature/partial req. It has to be handled by
56 Staff_{walker,column} baseclass. */
57 class Timing_req : public Command_req {
59 REQUESTMETHODS(Timing_req);
63 class Tempo_req : public Timing_req
70 REQUESTMETHODS(Tempo_req);
71 bool do_equal_b (Request *) const;
74 class Partial_measure_req : public Timing_req {
78 Partial_measure_req (Moment);
79 REQUESTMETHODS(Partial_measure_req);
80 bool do_equal_b (Request*) const;
84 todo: allow C time_signature
86 class Time_signature_change_req : public Timing_req {
88 int beats_i_, one_beat_i_;
90 Time_signature_change_req();
91 bool do_equal_b (Request*) const;
92 REQUESTMETHODS(Time_signature_change_req);
95 /// toggle Cadenza mode
96 class Cadenza_req : public Timing_req {
100 bool do_equal_b (Request*) const;
102 REQUESTMETHODS(Cadenza_req);
105 /// check if we're at start of a measure.
106 class Barcheck_req : public Timing_req {
108 bool do_equal_b (Request *) const;
109 REQUESTMETHODS(Barcheck_req);
112 class Measure_grouping_req : public Timing_req {
114 Array<int> beat_i_arr_;
115 Array<Moment> elt_length_arr_;
116 bool do_equal_b (Request *) const;
117 REQUESTMETHODS(Measure_grouping_req);
120 /** draw a (repeat)-bar. This something different than #Barcheck_req#,
121 the latter should only happen at the start of a measure. */
122 class Bar_req : public Command_req {
126 bool do_equal_b (Request*) const;
128 REQUESTMETHODS(Bar_req);
134 Routines for sharps and flats are separated,
135 so that caller may identify non-conventional keys.
137 class Key_change_req : public Command_req {
139 Array<Musical_pitch> pitch_arr_;
141 bool ordinary_key_b_;
144 REQUESTMETHODS(Key_change_req);
146 /// squash the octaves to 1
147 void squash_octaves();
148 /// return number of flats in key
151 /// return number of sharps in key
154 void transpose (Musical_pitch d);
155 bool minor_b() const;
158 class Clef_change_req : public Command_req {
161 Clef_change_req (String);
162 REQUESTMETHODS(Clef_change_req);
165 class Bracket_req : public Span_req, public Command_req {
168 REQUESTMETHODS(Bracket_req);
171 #endif // COMMANDREQUEST_HH