]> git.donarmstrong.com Git - lilypond.git/blob - lily/time-signature.cc
patch::: 1.3.1.hwn1
[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--1999 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 Molecule*
22 Time_signature::do_brew_molecule_p () const
23 {
24   SCM st = get_elt_property ("style");
25   
26   if (st != SCM_UNDEFINED)
27     {
28       String style (ly_scm2string (st));
29       if (style[0]=='1')
30         {
31           Array<int> tmparr = args_;
32           return new Molecule( lookup_l ()->time_signature (args_[0], 0, paper_l ()));
33         }
34       else
35         {
36           return new Molecule( lookup_l ()-> special_time_signature (style, args_[0], args_[1], paper_l ()));
37         }
38     }
39   else
40     return new Molecule(lookup_l ()->time_signature (args_[0], args_[1],paper_l ()));
41 }
42
43
44
45
46