]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/command-request.hh
875024650c7bf7f2d1f20eddb60d6b46a43e03b8
[lilypond.git] / lily / include / command-request.hh
1 /*
2   command-request.hh -- declare non-musical requests
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef COMMANDREQUEST_HH
11 #define COMMANDREQUEST_HH
12
13 #include "request.hh"
14 #include "array.hh"
15 #include "duration.hh"
16 #include "musical-pitch.hh"
17 #include "protected-scm.hh"
18
19 class Break_req : public Request {
20 public:
21   Real penalty_f_;
22   Break_req ();
23 protected:
24   VIRTUAL_COPY_CONS(Music);
25 };
26
27 class Mark_req : public Request {
28 public:
29   virtual bool do_equal_b (Request const*) const;
30   SCM mark_label ();
31   VIRTUAL_COPY_CONS(Music);
32 };
33
34
35 /** Baseclass for time_signature/partial req. It has to be handled by
36   Staff_{walker,column} baseclass.  */
37 class Timing_req  : public Request  {
38 public:
39   VIRTUAL_COPY_CONS(Music);
40 };
41
42
43 class Tempo_req : public Timing_req
44 {
45 public:
46   Duration dur_;
47   int metronome_i_;
48
49   Tempo_req();
50 protected:
51   virtual void do_print () const;
52   VIRTUAL_COPY_CONS(Music);
53   bool do_equal_b (Request const *) const;
54 };
55
56
57 /**
58   todo: allow C time_signature
59  */
60 class Time_signature_change_req  : public Timing_req  {
61 public:
62   int beats_i_;
63   int one_beat_i_;
64
65   Time_signature_change_req();
66 protected:
67   virtual void do_print () const;
68   bool do_equal_b (Request const *) const;
69   VIRTUAL_COPY_CONS(Music);
70 };
71
72
73 /// check if we're at start of a  measure.
74 class Barcheck_req  : public Timing_req  {
75 public:
76   bool do_equal_b (Request const *) const;
77   VIRTUAL_COPY_CONS(Music);
78 };
79
80
81 /** draw a (repeat)-bar. This something different than #Barcheck_req#,
82   the latter should only happen at the start of a measure.  */
83 class Bar_req  : public Request  {
84 public:
85
86   Bar_req (String);
87 protected:
88   VIRTUAL_COPY_CONS(Music);
89 };
90
91 class Breathing_sign_req : public Request {
92   VIRTUAL_COPY_CONS(Music);
93 };
94
95 /**
96     Handle key changes.
97 */
98 class Key_change_req  : public Request
99 {
100 public:
101   SCM pitch_alist ();
102   
103 protected:
104   VIRTUAL_COPY_CONS(Music);
105   void transpose (Musical_pitch  d);
106   bool do_equal_b (Request const * )const; 
107 };
108
109 class Clef_change_req  : public Request  {
110 public:
111   String clef_str_;
112   Clef_change_req (String);
113 protected:
114   virtual void do_print () const;
115   VIRTUAL_COPY_CONS(Music);
116 };
117
118
119 #endif // COMMANDREQUEST_HH