2 commandrequest.hh -- declare Non musical requests
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #ifndef COMMANDREQUEST_HH
11 #define COMMANDREQUEST_HH
17 Request assumed to be "happening" before the musical requests
19 struct Nonmusical_req
: virtual Request
{
20 REQUESTMETHODS(Nonmusical_req
, nonmus
);
22 virtual Measure_grouping_req
* measuregrouping() { return 0; }
23 virtual Clef_change_req
* clefchange() { return 0; }
24 virtual Key_change_req
* keychange() { return 0; }
25 virtual Partial_measure_req
* partial() { return 0; }
26 virtual Meter_change_req
* meterchange() { return 0; }
27 virtual Bar_req
*bar() { return 0; }
28 virtual Cadenza_req
*cadenza() { return 0; }
29 virtual Timing_req
*timing() { return 0; }
33 /** Baseclass for meter/partial req. It has to be handled by
34 Staff_{walker,column} baseclass. */
35 struct Timing_req
: Nonmusical_req
{
36 REQUESTMETHODS(Timing_req
, timing
);
40 struct Partial_measure_req
: Timing_req
{
43 Partial_measure_req(Moment
);
44 REQUESTMETHODS(Partial_measure_req
, partial
);
50 struct Meter_change_req
: Timing_req
{
51 int beats_i_
, one_beat_i_
;
55 REQUESTMETHODS(Meter_change_req
, meterchange
);
58 /// toggle Cadenza mode
59 struct Cadenza_req
: Timing_req
{
63 REQUESTMETHODS(Cadenza_req
,cadenza
);
66 /// check if we're at start of a measure.
67 struct Barcheck_req
: Timing_req
{
69 REQUESTMETHODS(Barcheck_req
,barcheck
);
72 struct Measure_grouping_req
: Timing_req
{
73 Array
<int> beat_i_arr_
;
74 Array
<Moment
> elt_length_arr_
;
76 REQUESTMETHODS(Measure_grouping_req
, measuregrouping
);
79 struct Group_change_req
: Nonmusical_req
{
81 REQUESTMETHODS(Group_change_req
, groupchange
);
84 /** draw a (repeat)-bar. This something different than #Barcheck_req#,
85 the latter should only happen at the start of a measure. */
86 struct Bar_req
: Nonmusical_req
{
89 int compare(const Bar_req
&)const;
90 REQUESTMETHODS(Bar_req
,bar
);
92 struct Terminate_voice_req
: Nonmusical_req
{
93 REQUESTMETHODS(Terminate_voice_req
,terminate
);
96 struct Group_feature_req
: Nonmusical_req
{
99 REQUESTMETHODS(Group_feature_req
, groupfeature
);
103 struct Key_change_req
: Nonmusical_req
{
104 Array
<Melodic_req
*> melodic_p_arr_
;
107 Key_change_req(Key_change_req
const&);
109 REQUESTMETHODS(Key_change_req
, keychange
);
112 struct Clef_change_req
: Nonmusical_req
{
114 Clef_change_req(String
);
115 REQUESTMETHODS(Clef_change_req
, clefchange
);
118 #endif // COMMANDREQUEST_HH