]> git.donarmstrong.com Git - lilypond.git/blob - lily/time-signature.cc
aaa7952d8e555ba34900fc835d299f9b49aa748b
[lilypond.git] / lily / time-signature.cc
1 /*   
2   time-signature.cc --  implement Time_signature
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1996--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10
11 #include "molecule.hh"
12 #include "time-signature.hh"
13 #include "paper-def.hh"
14 #include "lookup.hh"
15
16 Time_signature::Time_signature ()
17 {
18   set_elt_property ("breakable", SCM_BOOL_T);
19 }
20
21 // ugh.!
22 Molecule*
23 Time_signature::do_brew_molecule_p () const
24 {
25   SCM st = get_elt_property ("style");
26   
27   if (gh_string_p (st))
28     {
29       String style (ly_scm2string (st));
30       if (style[0]=='1')
31         {
32           Array<int> tmparr = args_;
33           return new Molecule( lookup_l ()->time_signature (args_[0], 0, paper_l ()));
34         }
35       else
36         {
37           return new Molecule( lookup_l ()-> special_time_signature (style, args_[0], args_[1], paper_l ()));
38         }
39     }
40   else
41     return new Molecule(lookup_l ()->time_signature (args_[0], args_[1],paper_l ()));
42 }
43
44
45
46
47