]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.0.12
authorfred <fred>
Sun, 24 Mar 2002 20:14:26 +0000 (20:14 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:14:26 +0000 (20:14 +0000)
buildscripts/genheader.py
lily/include/lookup.hh
lily/include/time-signature.hh
lily/time-signature-engraver.cc
lily/time-signature.cc

index 8e6f39603700e9f53c02e56a833bf72bee7dc28d..2c1d6be30842512900fbd484e72ba52c96e9cd09 100644 (file)
@@ -25,7 +25,10 @@ my_options = My_options()
 
 
 def name():
-    return pwd.getpwuid(os.getuid())[4]
+       return os.environ['USERNAME']
+
+# field 4 of passwd is also used for finger info (phone no.,  office etc)
+#   return pwd.getpwuid(os.getuid())[4]
 
 def c_commentify(str):
     return  '/* ' + regsub.gsub('^','  ', str) + '\n */';
index 763beb8d42f60762fa3a698018c032a50c687b70..5dc56d279c4e1e388e7e45c0ff91acbecf2793ed 100644 (file)
@@ -41,6 +41,7 @@ struct Lookup {
   Atom vbrace (Real &dy) const;
   Atom vbracket (Real &dy) const;
   Atom time_signature (Array<Scalar>) const;
+  Atom special_time_signature (String) const;
   Atom stem (Real y1_pos, Real y2_pos) const;
   Atom rule_symbol (Real height, Real width) const;
   Atom accidental (int) const;
index 762f465b98c27cc2c627f7abf5fc7a1465bc5173..ed079a29ff746f2051631925f5b44c5f3fabb9ac 100644 (file)
   
  */
 class Time_signature: public Item {
-  Array<Scalar> args;
+
+  
 
 protected:
   virtual Molecule*brew_molecule_p() const;
 public:
-  Time_signature (Array<Scalar> args) ;
+  Time_signature () ;
+  Array<Scalar> args_;
+  String time_sig_type_str_;
+  
   DECLARE_MY_RUNTIME_TYPEINFO;
   SCORE_ELEMENT_CLONE(Time_signature);
 };
index 75d803226ba608eaa17c7cbfc6e32ab371bc0b0d..b72d78460853e73712695352555af1c5a69c9ee2 100644 (file)
@@ -39,10 +39,12 @@ Time_signature_engraver::do_process_requests()
       args.push (req->beats_i_);
       args.push (req->one_beat_i_);
        
-      time_signature_p_ = new Time_signature (args);
+      time_signature_p_ = new Time_signature ();
+      time_signature_p_->args_ = args;
       time_signature_p_->break_priority_i_ = 1; // ugh
     }
 
+  
   if (time_signature_p_)
     announce_element (Score_element_info (time_signature_p_, req));
 }
@@ -52,6 +54,12 @@ Time_signature_engraver::do_pre_move_processing()
 {
   if (time_signature_p_) 
     {
+      Scalar sigstyle = get_property ("timeSignatureStyle");
+      if (sigstyle.length_i ())
+       {
+         time_signature_p_->time_sig_type_str_ = sigstyle;
+       }
+
       typeset_element (time_signature_p_);
       time_signature_p_ =0;
     }
index e882c5558287c66756e293761c04368d0331c08f..931766ccc815f3bcd9d69971de1e6e7ff835b802 100644 (file)
@@ -1,11 +1,19 @@
+/*   
+  time-signature.cc --  implement Time_signature
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1996--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
 #include "scalar.hh"
 #include "molecule.hh"
 #include "time-signature.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
-Time_signature::Time_signature (Array<Scalar>a)
-  :args (a)
+Time_signature::Time_signature ()
 {
   breakable_b_ = true;
 }
@@ -13,7 +21,13 @@ Time_signature::Time_signature (Array<Scalar>a)
 Molecule*
 Time_signature::brew_molecule_p() const
 {
-  Atom s = lookup_l ()->time_signature (args);
+  Atom s;
+  if (time_sig_type_str_.length_i ())
+    {
+      s = lookup_l ()-> special_time_signature (time_sig_type_str_);
+    }
+  else
+    s = lookup_l ()->time_signature (args_);
   s.translate_axis (-s.extent()[Y_AXIS].center (), Y_AXIS);
   return new Molecule (Atom (s));
 }