]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/command-request.hh
release: 1.3.60
[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   Protected_scm mark_label_;
30 protected:
31   virtual bool do_equal_b (Request const*) const;
32   VIRTUAL_COPY_CONS(Music);
33 };
34
35
36 /** Baseclass for time_signature/partial req. It has to be handled by
37   Staff_{walker,column} baseclass.  */
38 class Timing_req  : public Request  {
39 public:
40   VIRTUAL_COPY_CONS(Music);
41 };
42
43
44 class Tempo_req : public Timing_req
45 {
46 public:
47   Duration dur_;
48   int metronome_i_;
49
50   Tempo_req();
51 protected:
52     virtual void do_print () const;
53   VIRTUAL_COPY_CONS(Music);
54   bool do_equal_b (Request const *) const;
55 };
56
57
58 /**
59   todo: allow C time_signature
60  */
61 class Time_signature_change_req  : public Timing_req  {
62 public:
63   int beats_i_;
64   int one_beat_i_;
65
66   Time_signature_change_req();
67 protected:
68   virtual void do_print () const;
69   bool do_equal_b (Request const *) const;
70   VIRTUAL_COPY_CONS(Music);
71 };
72
73
74 /// check if we're at start of a  measure.
75 class Barcheck_req  : public Timing_req  {
76 public:
77   bool do_equal_b (Request const *) const;
78   VIRTUAL_COPY_CONS(Music);
79 };
80
81
82 /** draw a (repeat)-bar. This something different than #Barcheck_req#,
83   the latter should only happen at the start of a measure.  */
84 class Bar_req  : public Request  {
85 public:
86   String type_str_;
87   Bar_req (String);
88 protected:
89   virtual bool do_equal_b (Request const*) const;
90   virtual void do_print () const;
91
92   VIRTUAL_COPY_CONS(Music);
93 };
94
95 class Breathing_sign_req : public Request {
96   VIRTUAL_COPY_CONS(Music);
97 };
98
99 /**
100     Handle key changes.
101 */
102 class Key_change_req  : public Request
103 {
104 public:
105   Protected_scm pitch_alist_;
106
107 protected:
108   VIRTUAL_COPY_CONS(Music);
109   void transpose (Musical_pitch  d);
110   bool do_equal_b (Request const * )const; 
111 };
112
113 class Clef_change_req  : public Request  {
114 public:
115   String clef_str_;
116   Clef_change_req (String);
117 protected:
118   virtual void do_print () const;
119   VIRTUAL_COPY_CONS(Music);
120 };
121
122
123 #endif // COMMANDREQUEST_HH