]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/command-request.hh
release: 1.3.23
[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 "key-def.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   String str_;
30 protected:
31   virtual bool do_equal_b (Request const*) const;
32   virtual void do_print () 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 void do_print () const;
91   bool do_equal_b (Request const *) 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     Routines for sharps and flats are separated, 
103     so that caller may identify non-conventional keys.
104 */
105 class Key_change_req  : public Request
106 {
107 public:
108   Key_change_req ();
109   Key_def key_;
110
111 protected:
112   VIRTUAL_COPY_CONS(Music);
113   void transpose (Musical_pitch  d);
114   virtual void do_print () const;
115 };
116
117 class Clef_change_req  : public Request  {
118 public:
119   String clef_str_;
120   Clef_change_req (String);
121 protected:
122   virtual void do_print () const;
123   VIRTUAL_COPY_CONS(Music);
124 };
125
126
127 #endif // COMMANDREQUEST_HH