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