]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/musical-request.hh
488f080de52b1ba8faa8a8b5b1adfd14ccd66fa0
[lilypond.git] / lily / include / musical-request.hh
1 /*
2   musical-request.hh -- declare Musical requests
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef MUSICALREQUESTS_HH
11 #define MUSICALREQUESTS_HH
12
13 #include "lily-proto.hh"
14 #include "request.hh"
15 #include "duration.hh"
16 #include "pitch.hh"
17 #include "array.hh"
18
19 /** a request with a duration.
20   This request is used only used as a base class.
21  */
22 class Rhythmic_req  : public virtual Request  {
23 public:
24   void compress (Moment);
25   virtual Moment length_mom () const;
26   static int compare (Rhythmic_req const&,Rhythmic_req const&);
27   VIRTUAL_COPY_CONS (Music);
28 };
29
30 class Skip_req  : public Rhythmic_req  {
31 public:
32   VIRTUAL_COPY_CONS (Music);
33 };
34
35
36 struct Tremolo_req : public Request {
37   VIRTUAL_COPY_CONS (Music);
38   Tremolo_req ();
39 };
40
41 struct Chord_tremolo_notify_req : public Request
42 {
43   Rational factor_;
44   VIRTUAL_COPY_CONS(Chord_tremolo_notify_req);
45   Chord_tremolo_notify_req();
46 };
47
48
49 /**
50    a syllable or lyric is a string with rhythm.
51   */
52 class Lyric_req : public Rhythmic_req
53 {
54 protected:
55   VIRTUAL_COPY_CONS (Music);
56 };
57
58
59 class Articulation_req : public Script_req
60 {
61 public:
62   String get_articulation_string ();
63 protected:
64   virtual bool do_equal_b (Request const*) const;
65   VIRTUAL_COPY_CONS (Music);
66 };
67
68 class Text_script_req : public Script_req
69 {
70 protected:
71   VIRTUAL_COPY_CONS (Music);
72   virtual bool do_equal_b (Request const*) const;
73 };
74
75 class String_number_req : public Script_req
76 {
77 protected:
78   VIRTUAL_COPY_CONS (Music);
79   virtual bool do_equal_b (Request const*) const;
80 };
81
82 /// request which has some kind of pitch
83 struct Melodic_req :virtual Request
84 {
85   static int compare (Melodic_req const&,Melodic_req const&);
86   
87 protected:
88   virtual bool do_equal_b (Request const*) const;
89
90   VIRTUAL_COPY_CONS (Music);
91 };
92
93 /**
94 Put a rest on the staff. Why a request? It might be a good idea to not typeset the rest, if the paper is too crowded.
95 */
96 class Rest_req : public Rhythmic_req {
97 public:
98   VIRTUAL_COPY_CONS (Music);
99 };
100
101
102 /// an extender line
103 class Extender_req : public Request  {
104 public:
105   VIRTUAL_COPY_CONS (Music);
106 };
107
108 /// a centred hyphen
109 class Hyphen_req : public Request  {
110 public:
111   VIRTUAL_COPY_CONS (Music);
112 };
113
114
115
116 /**
117    instruct lyric context to alter typesetting.  */
118 class Melisma_req : public Span_req
119 {
120 public:
121   VIRTUAL_COPY_CONS (Music);
122 };
123
124
125 /**
126    Helping req to signal start of a melisma from within a context, and
127    to   */
128 class Melisma_playing_req : public Request
129 {
130 public:
131   VIRTUAL_COPY_CONS (Music);
132 };
133
134 class Arpeggio_req : public Request
135 {
136 public:
137   VIRTUAL_COPY_CONS (Music);
138 };
139
140 class Glissando_req : public Request
141 {
142 public:
143   VIRTUAL_COPY_CONS (Music);
144 };
145
146
147 #endif // MUSICALREQUESTS_HH