]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.15
authorfred <fred>
Sun, 24 Mar 2002 19:57:59 +0000 (19:57 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:57:59 +0000 (19:57 +0000)
25 files changed:
lily/abbreviation-beam.cc
lily/bar.cc
lily/beam.cc
lily/bow.cc
lily/clef-item.cc
lily/dots.cc
lily/general-script-def.cc
lily/include/crescendo.hh
lily/include/lily-proto.hh
lily/include/span-bar.hh
lily/include/span-score-bar.hh
lily/include/symbol.hh
lily/include/symtable.hh
lily/key-item.cc
lily/meter.cc
lily/molecule.cc
lily/rest.cc
lily/scoreline.cc
lily/script-def.cc
lily/span-score-bar.cc
lily/stem-info.cc
lily/symtable.cc
lily/template3.cc
lily/tex.cc
lily/text-spanner.cc

index e47407cdc726baabda1b25c587dd02e556adc104..309337dffb893dd7795fbae9a84cb367e72a73a6 100644 (file)
@@ -14,7 +14,7 @@
 #include "abbreviation-beam.hh"
 #include "misc.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "molecule.hh"
 #include "leastsquares.hh"
 #include "stem.hh"
index 43811f88c63fd8ccf9a788c4046b89fa35bb9cd3..05a855714861d389d68f24b6ad50eff4f3e5f31a 100644 (file)
@@ -34,7 +34,7 @@ Molecule*
 Bar::brew_molecule_p() const
 {    
   Paper_def *p = paper();
-  Symbol s = p->lookup_l()->bar (type_str_, 
+  Atom s = p->lookup_l()->bar (type_str_, 
                                 p->get_var ("bar_size"));
   Molecule*output = new Molecule (Atom (s));
   return output;
index 27825954b61eddc731d51582e61f7bad803e0b4d..d2b5e1e3c620a3d07a7460be9b052f0433c8a50b 100644 (file)
@@ -21,7 +21,7 @@
 #include "abbreviation-beam.hh"
 #include "misc.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "molecule.hh"
 #include "leastsquares.hh"
 #include "stem.hh"
@@ -304,8 +304,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
       int lhalfs= lhalfs = here->beams_left_i_ - prev->beams_right_i_ ;
       int lwholebeams= here->beams_left_i_ <? prev->beams_right_i_ ;
       Real w = (here->hpos_f () - prev->hpos_f ())/4;
-      Symbol dummy;
-      Atom a (dummy);
+      Atom a;
       if (lhalfs)              // generates warnings if not
        a =  paper()->lookup_l ()->beam (sl, w);
       a.translate (Offset (-w, -w * sl));
index 1bd0a0076208bc0c2fd95f268321c85e329ecf54..34b7eb77940d9e49cc369ebbf9a5743dde9d40f4 100644 (file)
@@ -44,12 +44,10 @@ Bow::brew_molecule_p() const
   w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]) * nw_f ;
   Real round_w = w;            // slur lookup rounds the slurwidth .
   
-  Symbol sl = paper()->lookup_l ()->slur (dy , round_w, dir_);
+  Atom a = paper()->lookup_l ()->slur (dy , round_w, dir_);
 
   Real error = w-round_w;
-  
-  Atom a (sl);
-  a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
+    a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
                       pos_i_drul_[LEFT] * nh_f));
   output->add (a);
   return output;
index 920d2c5512fda8c06d55f21e120f2fb036416fc9..a0ca99bcc5b90d9fc987da43cf2435b2be25558c 100644 (file)
@@ -59,7 +59,7 @@ Clef_item::brew_molecule_p() const
   String t = type_;
   if  (change_b_)
     t += "_change";
-  Symbol s = paper()->lookup_l ()->clef (t);
+  Atom s = paper()->lookup_l ()->clef (t);
   Molecule*output = new Molecule (Atom (s));
   output->translate (paper()->internote_f () * y_off, Y_AXIS);
   return output;
index 0525aa1dda9e45f3cd01915d708d05be90b5df9f..946b74b19576e06a456235c28b6ec36965a0daab 100644 (file)
@@ -27,7 +27,7 @@ Dots::do_post_processing ()
 Molecule* 
 Dots::brew_molecule_p () const
 {
-  Symbol d = paper ()->lookup_l ()->dots (no_dots_i_);
+  Atom d = paper ()->lookup_l ()->dots (no_dots_i_);
   Molecule *out = new Molecule (Atom (d));
   Real inter_f = paper ()->internote_f ();
   out->translate (inter_f * position_i_, Y_AXIS);
index 70c2b740af0b49ab8ca852a8f2bf4759afda2edc..2a014cc54205a282802c9ec460833bfe96b41061 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "general-script-def.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 Direction
 General_script_def::staff_dir() const
 {
@@ -65,7 +65,7 @@ General_script_def::do_print() const
 Atom
 General_script_def::get_atom (Paper_def*, Direction) const
 {
-  Symbol s;
+  Atom s;
   return Atom (s);
 }
 
index 99e0e287ccacd7a89aa16d1a08b8360623d60a99..6c8a9df8054fefa9b77a52d5b6af0cebe7075ac4 100644 (file)
@@ -30,7 +30,7 @@ protected:
   DECLARE_MY_RUNTIME_TYPEINFO;
     
 private:
-  Symbol get_symbol() const;
+  Atom get_symbol() const;
 };
 
 #endif // CRESCENDO_HH
index 7c735faa272ec351c62055a95ed29ab8e1bd00b7..d8b5b3bddcc52631e592c89a8883b00245dd1e54 100644 (file)
@@ -199,7 +199,7 @@ struct Stem_beam_engraver;
 struct Stem_req;
 struct String;
 struct Subtle_req;
-struct Symbol;
+struct Atom;
 struct Symtable;
 struct Symtables;
 struct Super_elem;
index d49974c902acc1c37b5faf74c3cee67ae0e54d28..136564678f483a9d3e90ef6e28a0458f2a3f6109 100644 (file)
@@ -29,7 +29,7 @@ protected:
     
     virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual Molecule * brew_molecule_p() const;
-    virtual Symbol get_bar_sym (Real dy) const;
+    virtual Atom get_bar_sym (Real dy) const;
 };
 
 #endif // SPAN_BAR_HH
index 5b25faa3ca0bf4df4dc1e35342d7be9daceb0102..06398251808aa95493e484b6e4f8894c53ad8f37 100644 (file)
@@ -32,7 +32,7 @@ public:
     SCORE_ELEM_CLONE(Piano_brace);
 protected:
     virtual Interval do_width() const;
-    virtual Symbol get_bar_sym (Real) const;
+    virtual Atom get_bar_sym (Real) const;
 };
 
 #endif // SPAN_SCORE_BAR_HH
index 09f7e14e4a930f2a7f23f0c78d914e7c28ab2e80..65296f81060baccd891380179b283fc7515acef0 100644 (file)
@@ -1,47 +1,2 @@
-/*
-  symbol.hh -- declare Symbol, Atom
 
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#ifndef SYMBOL_HH
-#define SYMBOL_HH
-
-#include "string.hh"
-#include "boxes.hh"
-#include "lily-proto.hh"
-
-struct Symbol {
-    String tex;
-    Box dim;
-
-    Symbol (String, Box);
-    Symbol();
-    String str() const;                // for printing.
-};
-
-
-/// a symbol which can be translated, and freely copied
-struct Atom {
-    Offset off_;
-    Symbol sym_;
-
-    /* *************** */
-    
-    void translate (Offset o) {
-       off_ += o;
-    }
-    void translate (Real r,Axis a){
-       off_[a] += r;
-    }
-    /// how big is #this#?
-    Box extent() const;
-    Atom (Symbol s);
-
-    void print() const;
-
-    String TeX_string() const;
-};
-#endif
+#error
index 1c37f7c565e605c7e26ec5a00444bd012622efa3..8c36ee6cbf5004d11bcbc98d4df1f7fbd7b23e53 100644 (file)
@@ -1,16 +1,23 @@
 /*
-  lilypond, (c) 1996,97 Han-Wen Nienhuys
+  symtable.hh -- declare 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
+
+
 #ifndef SYMTABLE_HH
 #define SYMTABLE_HH
+
 #include "dictionary.hh"
 #include "string.hh"
-#include "symbol.hh"
+#include "atom.hh"
 
-struct  Symtable : public Dictionary<Symbol> {
+struct  Symtable : public Dictionary<Atom> {
     String id_str;
     
-    Symbol lookup (String) const;
+    Atom lookup (String) const;
     void print() const;
 };
 
index f3b57d20a1f1738a48690f16ddf7277fdfe65612..4dd094b667ffd6df76709401d9af6f27167c9dae 100644 (file)
@@ -34,10 +34,10 @@ Key_item::read (Key_engraver const & key_grav_r)
   const Array<int> &idx_arr =key_grav_r.accidental_idx_arr_; 
   for (int i = 0 ; i< idx_arr.size(); i++) 
     {
-       int note = idx_arr[i];
-       int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
+      int note = idx_arr[i];
+      int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
 
-       add (note, acc);
+      add (note, acc);
     }
 }
 
@@ -54,8 +54,8 @@ Key_item::add (int p, int a)
 {
   if ((a<0 && p>FLAT_TOP_PITCH) ||
       (a>0 && p>SHARP_TOP_PITCH)) 
-        {
-    p -= 7; /* Typeset below c_position */
+    {
+      p -= 7; /* Typeset below c_position */
     }
   pitch.push (p);
   acc.push (a);
@@ -70,19 +70,18 @@ Key_item::brew_molecule_p() const
   
   for (int i =0; i < pitch.size(); i++) 
     {
-       Symbol s= paper()->lookup_l ()->accidental (acc[i]);
-       Atom a (s);
-       a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
-       Molecule m (a);
-       output->add_at_edge (X_AXIS, RIGHT, m); 
+      Atom a =paper()->lookup_l ()->accidental (acc[i]);
+      a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
+      Molecule m (a);
+      output->add_at_edge (X_AXIS, RIGHT, m);  
     }
   if (pitch.size()) 
     {
-       Molecule m (paper()->lookup_l ()->fill (Box (
-       Interval (0, paper()->note_width ()),
-       Interval (0,0))));
+      Molecule m (paper()->lookup_l ()->fill (Box (
+                                                  Interval (0, paper()->note_width ()),
+                                                  Interval (0,0))));
 
-       output->add_at_edge (X_AXIS, RIGHT, m);
+      output->add_at_edge (X_AXIS, RIGHT, m);
     }
   return output;
 }
@@ -94,7 +93,7 @@ Key_item::do_pre_processing()
 {
   if (default_b_) 
     {
-       transparent_b_ = (break_status_i() != 1);
-       set_empty (transparent_b_);
+      transparent_b_ = (break_status_i() != 1);
+      set_empty (transparent_b_);
     }
 }
index aa41b7922bbf785aabb15792fd25a7764ee34f20..0c4d4e0ad168b13cd0a9cf891b249d3b26ac63ff 100644 (file)
@@ -13,7 +13,7 @@ Meter::Meter (Array<Scalar>a)
 Molecule*
 Meter::brew_molecule_p() const
 {
-  Symbol s = paper()->lookup_l ()->meter (args);
+  Atom s = paper()->lookup_l ()->meter (args);
   return new Molecule (Atom (s));
 }
 
index e37f9e7c33d4ab9f34315d1f4d24c03a6880ef4a..4dfe7d6c1309dd0e130530e04fd7e12f26329ca8 100644 (file)
@@ -10,7 +10,7 @@
 #include "dimen.hh"
 #include "string.hh"
 #include "molecule.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "debug.hh"
 #include "tex.hh"
 
index d2ccd2a01b608bc8594f24a7df1ce043e37c572d..0a7dc7419a8b8cfe7b847a910743b7eaf94f904f 100644 (file)
@@ -37,7 +37,7 @@ Rest::brew_molecule_p () const
   int staff_size_i_ =8;
   bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
   
-  Symbol s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
+  Atom s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
   Molecule * m = new Molecule ( Atom (s));
   m->translate (position_i_ *  paper ()->internote_f (), Y_AXIS);
   return m;
index 2bd4f870b48b6996d98f8835eca86401680f8662..f65690cafba48c48d4fed974463a69e795693a5e 100644 (file)
@@ -9,7 +9,7 @@
 #include "scoreline.hh"
 #include "dimen.hh"
 #include "spanner.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "paper-def.hh"
 #include "p-col.hh"
 #include "p-score.hh"
index 6ece2874f582880172417783ebea320048fc17f1..fa067cd3cc96b9d08d1f1ea72e248b805a13d98a 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "debug.hh"
 #include "script-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
index 97b195ef1ea13a39cb98089c22e9c77045fa5d8a..5ad94b760dfda30d4786361497294f0f3f770d42 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "span-score-bar.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
@@ -29,7 +29,7 @@ Span_score_bar::do_pre_processing()
 }
 
 
-Symbol
+Atom
 Piano_brace::get_bar_sym (Real dy) const
 {
   return paper()->lookup_l ()->vbrace (dy);
index a3287ce55cbeb8891d2066fc347b8d432ee4c0d2..89cd395c0b66001f3bcff05ea20b8e4fc4012d2c 100644 (file)
@@ -11,7 +11,7 @@
 #include "dimen.hh"
 #include "misc.hh"
 #include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "stem.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
index 2bb6f53fa9886e08d1412fb5841ff51260d0e03c..9098e18ad4c7390dfd8feca0b26fc73e8a1565a2 100644 (file)
@@ -10,7 +10,7 @@
 #include "dimen.hh"
 #include "debug.hh"
 #include "real.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "assoc.hh"
 #include "assoc-iter.hh"
 #include "symtable.hh"
@@ -35,7 +35,7 @@ Symtables::~Symtables()
     }
 }
 
-Symbol 
+Atom 
 Symtable::lookup (String s) const
 {
   if (elt_b (s))
@@ -43,7 +43,7 @@ Symtable::lookup (String s) const
   else 
     {
       warning ("Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");
-      Symbol sy;       
+      Atom sy; 
       return sy;
     }
 }
@@ -66,7 +66,7 @@ Symtables::print() const
 void
 Symtable::print() const
 {
-  for (Assoc_iter<String, Symbol>  i (*this); i.ok(); i++) 
+  for (Assoc_iter<String, Atom>  i (*this); i.ok(); i++) 
     {
       DOUT << "\'" << i.key() << "\'->" << i.val ().str () << "\n";
     }
index d9ea0deba264d0185cd74d4f1c8113dcb00431a8..e1e1b4d5f23e5361fd0a4733ea31b9260d306f0a 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#include "symbol.hh"
+#include "atom.hh"
 #include "molecule.hh"
 #include "plist.tcc"
 #include "pcursor.tcc"
index 6e7bb4732b9b282cc5dd88b898980e44817c9ba9..19285561c1296280fa5923ae3c44d8e416e6a8a6 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "dimen.hh"
 #include "tex.hh"
-#include "symbol.hh"
+#include "atom.hh"
 #include "varray.hh"
 
 String
index edf430aa139de4973efeb92a00908e31fcb32566..c23bb7e645e3ad1d40988579e6a9cca83d95a058 100644 (file)
@@ -12,7 +12,7 @@
 #include "text-def.hh"
 #include "debug.hh"
 #include "paper-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
 
 
 void