]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.24
authorfred <fred>
Sun, 24 Mar 2002 19:28:27 +0000 (19:28 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:28:27 +0000 (19:28 +0000)
32 files changed:
hdr/bar.hh
hdr/beam.hh
hdr/clefitem.hh
hdr/keyitem.hh
hdr/linepstaff.hh [new file with mode: 0644]
hdr/localkeyitem.hh
hdr/lyriccolumn.hh [new file with mode: 0644]
hdr/lyricstaff.hh [new file with mode: 0644]
hdr/lyricwalker.hh [new file with mode: 0644]
hdr/meter.hh
hdr/notehead.hh
hdr/pstaff.hh
hdr/rest.hh
hdr/script.hh
hdr/slur.hh
hdr/staffelem.hh
hdr/stem.hh
hdr/textspanner.hh
src/bar.cc
src/beam.cc
src/clefitem.cc
src/keyitem.cc
src/linepstaff.cc [new file with mode: 0644]
src/localkeyitem.cc
src/meter.cc
src/notehead.cc
src/rest.cc
src/script.cc
src/staffelem.cc
src/staffline.cc
src/stem.cc
src/textspanner.cc

index 2a360b0d73a7e5646713903f6e60d3f92b624b68..2df42d65030c88ca3f6b9613ba0336a8d498aba4 100644 (file)
@@ -13,7 +13,7 @@ struct Bar: Item {
     
     Bar(String type);
 
-    Molecule*brew_molecule()const;
+    Molecule*brew_molecule_p()const;
 };
 #endif // BAR_HH
 
index 96c65b12b0733f0d6ac4271b63d7df60679afcda..548641aecb5b82e0744a69c1dfbf8a3b3b604850 100644 (file)
@@ -38,7 +38,7 @@ struct Beam:  public Directional_spanner {
 private:
     Molecule stem_beams(Stem *here, Stem *next, Stem *prev)const;
     void solve_slope();
-    Molecule*brew_molecule()const;
+    Molecule*brew_molecule_p()const;
 };
 /** Beam adjusts the stems its owns to make sure that they reach the
   beam and that point in the correct direction */
index ccedc4e9a7684145544e8f2d529ad8d2a4fc6d67..9dbfffe5cd36249d3ff75bce34563e705a62cc5e 100644 (file)
@@ -21,7 +21,7 @@ struct Clef_item : Item {
     Clef_item();
     void read(Clef);
     void read(String);
-    Molecule* brew_molecule()const;
+    Molecule* brew_molecule_p()const;
 };
 
 #endif // CLEFITEM_HH
index 72f9680e1a6a3440a48a53a858dc2a519d1c841f..05a6cf79c2b26b8ed0f0e3198b7533e306dc5b0c 100644 (file)
@@ -25,7 +25,7 @@ struct Keyitem : Item {
 
     void preprocess();
 
-    Molecule* brew_molecule()const;
+    Molecule* brew_molecule_p()const;
 };
 /**
   An item which places accidentals at the start of the line
diff --git a/hdr/linepstaff.hh b/hdr/linepstaff.hh
new file mode 100644 (file)
index 0000000..3e88f8c
--- /dev/null
@@ -0,0 +1,11 @@
+#include "pstaff.hh"
+
+struct Linestaff : PStaff {
+    
+    int nolines;
+
+/****************/
+    
+    void brew_molecule_p(Real width);
+    Linestaff(int, PScore*);   
+};
index c8cca9d7c10e5b6e28164b02231b655782476c57..b4cf832c3e268df697091e4e863438c9add08abc 100644 (file)
@@ -25,7 +25,7 @@ struct Local_key_item : Item {
     void add(int oct, int pitch, int acc, Notehead*);
 
     void do_pre_processing();    
-    Molecule* brew_molecule()const;
+    Molecule* brew_molecule_p()const;
 };
 #endif // LOCALKEYITEM_HH
 
diff --git a/hdr/lyriccolumn.hh b/hdr/lyriccolumn.hh
new file mode 100644 (file)
index 0000000..368dadf
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// lyriccolumn.hh -- part of LilyPond
+//
+// copyright 1997 Jan Nieuwenhuizen <jan@digicash.nl>
+
+
+#ifndef LYRICCOLUMN_HH
+#define LYRICCOLUMN_HH
+
+#include "key.hh"
+#include "stcol.hh"
+#include "staff.hh"
+#include "staffwalker.hh"
+
+struct Lyric_staff;
+
+/// (winfo)
+struct Word_info {
+    Lyric_req* lreq_l_;
+    Word_info();
+    Word_info(Lyric_req* lreq_l);
+};
+
+/// (lcol)
+struct Lyric_column : Staff_column {
+
+    Array<Word_info> winfo_array_;
+    Lyric_staff* lstaff_l_;
+    
+    void typeset_item(Item *, int=1);
+//    void typeset_item_directional(Item *, int dir, int=1);
+
+//    Molecule *create_command_mol(Command *com);
+
+//    void take_request(Request *rq);   
+    virtual void process_requests();
+
+    Lyric_column(Score_column*s,Lyric_staff*rs);
+};
+
+#endif // LYRICSTAFF_HH
+
+
+
+
diff --git a/hdr/lyricstaff.hh b/hdr/lyricstaff.hh
new file mode 100644 (file)
index 0000000..6959636
--- /dev/null
@@ -0,0 +1,31 @@
+//
+//  lyricstaff.hh -- part of LilyPond
+//
+//  copyright 1997 Jan Nieuwenhuizen <jan@digicash.nl>
+
+#ifndef LYRICSTAFF_HH
+#define LYRICSTAFF_HH
+
+#include "staff.hh"
+
+/// (lstaff)
+struct Lyric_staff : Staff {
+    PStaff* line_pstaff_p_;
+
+    Staff_column* create_col(Score_column*);
+    
+//    virtual Item *get_TYPESET_item(Command*);
+    virtual void set_output(PScore *);
+//    virtual Local_key_item* get_local_key_item();
+
+    void process_commands(PCursor<Command*> &where);
+    virtual void walk();
+
+    Lyric_staff();
+};
+
+#endif // LYRICSTAFF_HH
+
+
+
+
diff --git a/hdr/lyricwalker.hh b/hdr/lyricwalker.hh
new file mode 100644 (file)
index 0000000..846b9a5
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+  simplewalker.hh -- part of LilyPond
+
+  (c) 1996,97 Han-Wen Nienhuys, Jan Nieuwenhuizen <jan@digicash.nl>
+*/
+
+#ifndef LYRICWALKER_HH
+#define LYRICWALKER_HH
+
+#include "proto.hh"
+#include "grouping.hh"
+#include "staffwalker.hh"
+#include "lyriccolumn.hh"
+
+struct Lyric_item; // put into proto
+struct Lyric_walker: Staff_walker {
+    Array<Lyric_item*> litem_l_array_;
+
+    /****************/
+
+    virtual void do_TYPESET_command(Command*);
+    virtual void do_INTERPRET_command(Command*);
+    virtual void process_requests();
+    virtual void reset();
+    
+    void do_word(Word_info);
+    Lyric_walker(Lyric_staff* lstaff_l);
+    Lyric_column* lcol_l();
+    Lyric_staff* lstaff_l();
+};
+
+
+#endif // LYRICWALKER_HH
+
+
index 11166232add4416834174ad2200ff04eae7717f8..1557ce4709464f189f4a6d9708a6db563a7ad401 100644 (file)
@@ -14,7 +14,7 @@ struct Meter: Item {
     /****************/
     
     Meter(Array<Scalar> args) ;
-    Molecule*brew_molecule() const;
+    Molecule*brew_molecule_p() const;
 };
 #endif // METER_HH
 
index 18612b06c666d33c07ad410dd13a303e126dfb08..a032ca1273087bc163b72ed3060ee413a198c328 100644 (file)
@@ -30,7 +30,7 @@ struct Notehead : public Item
 
     void print()const;
     static int compare(Notehead*&a, Notehead*&b) ;
-    Molecule* brew_molecule()const;
+    Molecule* brew_molecule_p()const;
 };
 /**
   takes care of:
index 78a68fb306a29542d087be3574992b1f180f30a2..87bd919c67a7a60604eb5986b533eb2e7c231ceb 100644 (file)
@@ -15,7 +15,7 @@ struct PStaff {
     PointerList<Item*> its;
 
     /****************/
-    virtual void brew_molecule(Real width)=0; // maybe overkill
+    virtual void brew_molecule_p(Real width)=0; // maybe overkill
     void add(Item*i);
     PStaff(PScore*);
     virtual ~PStaff();
index e13c540212ae78e5f2cc385ce6d3b3715db26c00..d3f944f57ec86c99463068788527d4577b4ecf4c 100644 (file)
@@ -20,7 +20,7 @@ struct Rest : public Item
     Rest(int dur,int dots);
     void print()const;
 
-    Molecule* brew_molecule()const;
+    Molecule* brew_molecule_p()const;
 };
 /**
   takes care of:
index 7b6cf37b247a731520a2297ec1a02dc5cd6314e2..be21a60829cf08353e1fec6a92b5eadafa03cb70 100644 (file)
@@ -25,7 +25,7 @@ struct Script : Item{
     void       set_default_dir();
     void       set_default_pos();
     Symbol symbol()const;
-    Molecule*  brew_molecule()const;
+    Molecule*  brew_molecule_p()const;
     virtual void do_post_processing();
     virtual void do_pre_processing();
     Script(Script_req*, Item*,int,Stem*p=0);
index 8c0cbd4ebefdf44b1e6d2c10a6d6d0b19e509f46..26bb2ff36e33ca0711b204d2733402d7fc7778d0 100644 (file)
@@ -30,7 +30,7 @@ struct Slur : Directional_spanner {
     Spanner* do_break_at( PCol*, PCol*) const;
     void process();
 private:
-Molecule*brew_molecule()const;
+Molecule*brew_molecule_p()const;
 };
 
 #endif // SLUR_HH
index e48170d4d213c38f9171f05a767a8f923fcad704..3eed7dfba7e0a5775a48b2d8a15efb1ea5083d53 100644 (file)
@@ -43,7 +43,7 @@ struct Staff_elem {
     
 protected:
     /// generate the molecule    
-    virtual Molecule* brew_molecule()const=0;
+    virtual Molecule* brew_molecule_p()const=0;
     ///executed directly after the item is added to the PScore
     virtual void do_add_processing();
     /// do calculations before determining horizontal spacing
index 977a719ae900c4f712f1cbe0994b98c1d80dcaff..8788d5a53dc1331d4337e6ffa457121b649b03bf 100644 (file)
@@ -67,7 +67,7 @@ struct Stem : public Item {
 
     Interval width() const;
 
-    Molecule* brew_molecule() const;
+    Molecule* brew_molecule_p() const;
 };
 /**
   takes care of:
index 4baf832a39ed892aedaa8d6bcf05b30a5eb248fb..81c8b87c328e35767d4222843d50b38c9b29b300 100644 (file)
@@ -19,7 +19,7 @@ struct Text_spanner : Spanner {
     /****************/
     virtual    void do_pre_processing();
     virtual    void do_post_processing();
-    Molecule* brew_molecule()const;
+    Molecule* brew_molecule_p()const;
     virtual    Interval height() const ;
     void print() const;
     virtual Spanner* do_break_at(PCol*,PCol*)const;
index edfd6a8e3c40d609ec294a6deea5efa916848224..b18c500e62d8504a2b0d8a2cc872dd5e4d6d23f7 100644 (file)
@@ -10,7 +10,7 @@ Bar::Bar( String t)
     type = t;
 }
 Molecule*
-Bar::brew_molecule()const
+Bar::brew_molecule_p()const
 {    
     Symbol s = paper()->lookup_p_->bar(type);
 Molecule*    output = new Molecule(Atom(s));
index c65dc5811590aded016e27db29f35cfb6fe2a94e..c36ca67436933b5083eefdf98907dd6fbed6fa0a 100644 (file)
@@ -255,7 +255,7 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const
 
 
 Molecule*
-Beam::brew_molecule() const return out;
+Beam::brew_molecule_p() const return out;
 {
     Real inter=paper()->internote();
     out = new Molecule;
index c6b8f09d0bb98c61664407549205079c2fffcc65..d5237513a29a04f85f4977f8d57f22f2d231a628 100644 (file)
@@ -26,7 +26,7 @@ Clef_item::read(Clef k)
 }
 
 Molecule*
-Clef_item::brew_molecule()const
+Clef_item::brew_molecule_p()const
 {
     String t = type;
     if  (change)
index 29b1f25e5c9fc91ad59e3622280ec6c85299bb3e..3a80c28e1f102e24440edcba33471188ca69ba88 100644 (file)
@@ -31,7 +31,7 @@ Keyitem::add(int p, int a)
 
 
 Molecule*
-Keyitem::brew_molecule()const
+Keyitem::brew_molecule_p()const
 {
     Molecule*output = new Molecule;
     Real inter = paper()->interline()/2;
diff --git a/src/linepstaff.cc b/src/linepstaff.cc
new file mode 100644 (file)
index 0000000..ef2c55d
--- /dev/null
@@ -0,0 +1,27 @@
+#include "linepstaff.hh"
+#include "molecule.hh"
+#include "symbol.hh"
+#include "lookup.hh"
+#include "dimen.hh"
+#include "paper.hh"
+#include "pscore.hh"
+
+Linestaff::Linestaff(int l, PScore *s)
+    : PStaff(s)
+{
+    nolines = l;
+}
+
+void
+Linestaff::brew_molecule_p(Real width)
+{
+    Atom a  = pscore_l_->paper_l_->lookup_p_->linestaff(nolines,width);
+    stafsym_p_ = new Molecule(a);
+}
+
+
+
+
+
+
+
index d23b26277f64884f95f94e16abb556be24effb3b..b210dbdac3ee2c5a0762fca35151c8f51fa516dc 100644 (file)
@@ -27,7 +27,7 @@ Local_key_item::do_pre_processing()
     accs.sort(Local_acc::compare);
 }
 Molecule*
-Local_key_item::brew_molecule()const
+Local_key_item::brew_molecule_p()const
 {
 
     Molecule*    output = new Molecule;
index fb8224ec07ee23ef3411ef23bc62b2ced0fb00b2..ba653dae2a4bb6b33db313a1b8c7e6b778089895 100644 (file)
@@ -10,7 +10,7 @@ Meter::Meter(Array<Scalar>a)
 }
 
 Molecule*
-Meter::brew_molecule()const
+Meter::brew_molecule_p()const
 {
     Symbol s = paper()->lookup_p_->meter(args);
 return new Molecule(Atom(s));
index f6521a58fed326c2032ff5d17cdfd8b0b7b8cf52..859e41fad9fa76b1e1f1942dc11ffbd6741d50c6 100644 (file)
@@ -35,7 +35,7 @@ Notehead::compare(Notehead*&a, Notehead*&b)
 }
 
 Molecule*
-Notehead::brew_molecule() const return out;
+Notehead::brew_molecule_p() const return out;
 {
     Paperdef *p = paper();
 
index d06489507c4f72f7f0dfd15010073e3de3c9d670..215b102fed21a3cb4ec93601f9799b40032122dd 100644 (file)
@@ -20,7 +20,7 @@ Rest::print()const
 }
 
 Molecule*
-Rest::brew_molecule()const
+Rest::brew_molecule_p()const
 {
     Paperdef *p =paper();
 
index 54e6d652fabb86cf5bbd5868b8ddb480822bae7c..eab30f9cbbf636557513da5968b727eb940abbf4 100644 (file)
@@ -99,7 +99,7 @@ Script::do_post_processing()
 }
 
 Molecule*
-Script::brew_molecule() const
+Script::brew_molecule_p() const
 {
     Real dy = paper()->internote();
     
index e1b5e4228b3b91e16b5f7edccb23c9f34fde10cb..4be3cee0bf16f40e6a788db459f1febefdd7c64b 100644 (file)
@@ -36,11 +36,10 @@ Staff_elem::translate(Offset O)
 Interval
 Staff_elem::width() const
 {
-    Molecule*m= brew_molecule();
     Interval r;
 
     if (!output){
-       Molecule*m      = brew_molecule();
+       Molecule*m      = brew_molecule_p();
        r = m->extent().x;
        delete m;
     } else
@@ -57,7 +56,7 @@ Staff_elem::height() const
     Interval r;
 
     if (!output){
-       Molecule*m      = brew_molecule();
+       Molecule*m      = brew_molecule_p();
        r = m->extent().y;
        delete m;
     } else
@@ -140,7 +139,7 @@ Staff_elem::molecule_processing()
        if (dependencies[i])
            dependencies[i]->molecule_processing();
     if (!calc_children)
-       output= brew_molecule();
+       output= brew_molecule_p();
     status = OUTPUT;    
 }
 
index 1eacf8cb6527b2d57fcf5ebba5c2a72af4ced6c6..429874410e5b5fa94d5daee6fc3ebf87bc1072a9 100644 (file)
 
 static String
 make_vbox(Interval i)
-{    
+{
+    Real r = (i.empty()) ? 0.0 : i.length();
     String s("\\vbox to ");
-    s += print_dimen(i.length());
+    s += print_dimen(r);
     s += "{\\vskip "+print_dimen(i.right)+" ";
     return s;
 }
@@ -27,7 +28,7 @@ Line_of_staff::TeXstring() const
     s += "\\hbox{";
     {                          
        ((PStaff*)pstaff_l_)->
-           brew_molecule(line_of_score_l_->pscore_l_->paper_l_->linewidth);
+           brew_molecule_p(line_of_score_l_->pscore_l_->paper_l_->linewidth);
 
        s+=pstaff_l_->stafsym_p_->TeXstring();
        iter_top(line_of_score_l_->cols,cc);
@@ -43,7 +44,6 @@ Line_of_staff::TeXstring() const
                s +=String( "\\kern ") + print_dimen(delta);
 
            // now output the items.
-
            for (iter_top(cc->its,i); i.ok(); i++) {
                if (i->pstaff_l_ == pstaff_l_)
                    s += i->TeXstring();
@@ -106,6 +106,6 @@ void
 Line_of_staff::process()
 {
     if (!pstaff_l_->stafsym_p_)
-       pstaff_l_->brew_molecule(line_of_score_l_->pscore_l_->
-                              paper_l_->linewidth);
+       pstaff_l_->brew_molecule_p(line_of_score_l_->pscore_l_->
+                                paper_l_->linewidth);
 }
index 66b1aadb33501a338959a77a7386da1e1924bf44..85c4c15e2bd5511791a5c0012bf00db84b82cf24 100644 (file)
@@ -154,7 +154,7 @@ Stem::width()const
 }
 
 Molecule*
-Stem::brew_molecule()const return out;
+Stem::brew_molecule_p()const return out;
 {
     assert(bot!=top);
  
index 43cfda3f3586bbc6eb1236be70fd409de6f5532e..86eac612cb08660b3c811d622d48385b0c15f47b 100644 (file)
@@ -13,7 +13,7 @@ Text_spanner::Text_spanner(Directional_spanner*d)
 void
 Text_spanner::do_post_processing()
 {
-    switch(spec.align) {
+    switch(spec.align_i_) {
     case 0:
        tpos = support->center();
        break;
@@ -25,9 +25,9 @@ Text_spanner::do_post_processing()
     
 }
 Molecule*
-Text_spanner::brew_molecule() const
+Text_spanner::brew_molecule_p() const
 {
-    Atom tsym (spec.create(paper()));
+    Atom tsym (spec.create_atom(paper()));
     tsym.translate(tpos);
 
     Molecule*output = new Molecule;
@@ -54,7 +54,7 @@ Text_spanner::do_pre_processing()
 Interval
 Text_spanner::height()const
 {
-    return brew_molecule()->extent().y;
+    return brew_molecule_p()->extent().y;
 }
 
 Spanner*