From: fred Date: Sun, 24 Mar 2002 19:28:27 +0000 (+0000) Subject: lilypond-0.0.24 X-Git-Tag: release/1.5.59~5579 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7f3122af8e68629e397de6f5a71028783ff0e4ed;p=lilypond.git lilypond-0.0.24 --- diff --git a/hdr/bar.hh b/hdr/bar.hh index 2a360b0d73..2df42d6503 100644 --- a/hdr/bar.hh +++ b/hdr/bar.hh @@ -13,7 +13,7 @@ struct Bar: Item { Bar(String type); - Molecule*brew_molecule()const; + Molecule*brew_molecule_p()const; }; #endif // BAR_HH diff --git a/hdr/beam.hh b/hdr/beam.hh index 96c65b12b0..548641aecb 100644 --- a/hdr/beam.hh +++ b/hdr/beam.hh @@ -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 */ diff --git a/hdr/clefitem.hh b/hdr/clefitem.hh index ccedc4e9a7..9dbfffe5cd 100644 --- a/hdr/clefitem.hh +++ b/hdr/clefitem.hh @@ -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 diff --git a/hdr/keyitem.hh b/hdr/keyitem.hh index 72f9680e1a..05a6cf79c2 100644 --- a/hdr/keyitem.hh +++ b/hdr/keyitem.hh @@ -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 index 0000000000..3e88f8c915 --- /dev/null +++ b/hdr/linepstaff.hh @@ -0,0 +1,11 @@ +#include "pstaff.hh" + +struct Linestaff : PStaff { + + int nolines; + +/****************/ + + void brew_molecule_p(Real width); + Linestaff(int, PScore*); +}; diff --git a/hdr/localkeyitem.hh b/hdr/localkeyitem.hh index c8cca9d7c1..b4cf832c3e 100644 --- a/hdr/localkeyitem.hh +++ b/hdr/localkeyitem.hh @@ -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 index 0000000000..368dadf1bc --- /dev/null +++ b/hdr/lyriccolumn.hh @@ -0,0 +1,45 @@ +// +// lyriccolumn.hh -- part of LilyPond +// +// copyright 1997 Jan Nieuwenhuizen + + +#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 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 index 0000000000..6959636c60 --- /dev/null +++ b/hdr/lyricstaff.hh @@ -0,0 +1,31 @@ +// +// lyricstaff.hh -- part of LilyPond +// +// copyright 1997 Jan Nieuwenhuizen + +#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 &where); + virtual void walk(); + + Lyric_staff(); +}; + +#endif // LYRICSTAFF_HH + + + + diff --git a/hdr/lyricwalker.hh b/hdr/lyricwalker.hh new file mode 100644 index 0000000000..846b9a578c --- /dev/null +++ b/hdr/lyricwalker.hh @@ -0,0 +1,35 @@ +/* + simplewalker.hh -- part of LilyPond + + (c) 1996,97 Han-Wen Nienhuys, Jan Nieuwenhuizen +*/ + +#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 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 + + diff --git a/hdr/meter.hh b/hdr/meter.hh index 11166232ad..1557ce4709 100644 --- a/hdr/meter.hh +++ b/hdr/meter.hh @@ -14,7 +14,7 @@ struct Meter: Item { /****************/ Meter(Array args) ; - Molecule*brew_molecule() const; + Molecule*brew_molecule_p() const; }; #endif // METER_HH diff --git a/hdr/notehead.hh b/hdr/notehead.hh index 18612b06c6..a032ca1273 100644 --- a/hdr/notehead.hh +++ b/hdr/notehead.hh @@ -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: diff --git a/hdr/pstaff.hh b/hdr/pstaff.hh index 78a68fb306..87bd919c67 100644 --- a/hdr/pstaff.hh +++ b/hdr/pstaff.hh @@ -15,7 +15,7 @@ struct PStaff { PointerList 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(); diff --git a/hdr/rest.hh b/hdr/rest.hh index e13c540212..d3f944f57e 100644 --- a/hdr/rest.hh +++ b/hdr/rest.hh @@ -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: diff --git a/hdr/script.hh b/hdr/script.hh index 7b6cf37b24..be21a60829 100644 --- a/hdr/script.hh +++ b/hdr/script.hh @@ -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); diff --git a/hdr/slur.hh b/hdr/slur.hh index 8c0cbd4ebe..26bb2ff36e 100644 --- a/hdr/slur.hh +++ b/hdr/slur.hh @@ -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 diff --git a/hdr/staffelem.hh b/hdr/staffelem.hh index e48170d4d2..3eed7dfba7 100644 --- a/hdr/staffelem.hh +++ b/hdr/staffelem.hh @@ -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 diff --git a/hdr/stem.hh b/hdr/stem.hh index 977a719ae9..8788d5a53d 100644 --- a/hdr/stem.hh +++ b/hdr/stem.hh @@ -67,7 +67,7 @@ struct Stem : public Item { Interval width() const; - Molecule* brew_molecule() const; + Molecule* brew_molecule_p() const; }; /** takes care of: diff --git a/hdr/textspanner.hh b/hdr/textspanner.hh index 4baf832a39..81c8b87c32 100644 --- a/hdr/textspanner.hh +++ b/hdr/textspanner.hh @@ -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; diff --git a/src/bar.cc b/src/bar.cc index edfd6a8e3c..b18c500e62 100644 --- a/src/bar.cc +++ b/src/bar.cc @@ -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)); diff --git a/src/beam.cc b/src/beam.cc index c65dc58115..c36ca67436 100644 --- a/src/beam.cc +++ b/src/beam.cc @@ -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; diff --git a/src/clefitem.cc b/src/clefitem.cc index c6b8f09d0b..d5237513a2 100644 --- a/src/clefitem.cc +++ b/src/clefitem.cc @@ -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) diff --git a/src/keyitem.cc b/src/keyitem.cc index 29b1f25e5c..3a80c28e1f 100644 --- a/src/keyitem.cc +++ b/src/keyitem.cc @@ -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 index 0000000000..ef2c55dfbc --- /dev/null +++ b/src/linepstaff.cc @@ -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); +} + + + + + + + diff --git a/src/localkeyitem.cc b/src/localkeyitem.cc index d23b26277f..b210dbdac3 100644 --- a/src/localkeyitem.cc +++ b/src/localkeyitem.cc @@ -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; diff --git a/src/meter.cc b/src/meter.cc index fb8224ec07..ba653dae2a 100644 --- a/src/meter.cc +++ b/src/meter.cc @@ -10,7 +10,7 @@ Meter::Meter(Arraya) } Molecule* -Meter::brew_molecule()const +Meter::brew_molecule_p()const { Symbol s = paper()->lookup_p_->meter(args); return new Molecule(Atom(s)); diff --git a/src/notehead.cc b/src/notehead.cc index f6521a58fe..859e41fad9 100644 --- a/src/notehead.cc +++ b/src/notehead.cc @@ -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(); diff --git a/src/rest.cc b/src/rest.cc index d06489507c..215b102fed 100644 --- a/src/rest.cc +++ b/src/rest.cc @@ -20,7 +20,7 @@ Rest::print()const } Molecule* -Rest::brew_molecule()const +Rest::brew_molecule_p()const { Paperdef *p =paper(); diff --git a/src/script.cc b/src/script.cc index 54e6d652fa..eab30f9cbb 100644 --- a/src/script.cc +++ b/src/script.cc @@ -99,7 +99,7 @@ Script::do_post_processing() } Molecule* -Script::brew_molecule() const +Script::brew_molecule_p() const { Real dy = paper()->internote(); diff --git a/src/staffelem.cc b/src/staffelem.cc index e1b5e4228b..4be3cee0bf 100644 --- a/src/staffelem.cc +++ b/src/staffelem.cc @@ -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; } diff --git a/src/staffline.cc b/src/staffline.cc index 1eacf8cb65..429874410e 100644 --- a/src/staffline.cc +++ b/src/staffline.cc @@ -10,9 +10,10 @@ 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); } diff --git a/src/stem.cc b/src/stem.cc index 66b1aadb33..85c4c15e2b 100644 --- a/src/stem.cc +++ b/src/stem.cc @@ -154,7 +154,7 @@ Stem::width()const } Molecule* -Stem::brew_molecule()const return out; +Stem::brew_molecule_p()const return out; { assert(bot!=top); diff --git a/src/textspanner.cc b/src/textspanner.cc index 43cfda3f35..86eac612cb 100644 --- a/src/textspanner.cc +++ b/src/textspanner.cc @@ -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*