From: fred Date: Fri, 3 Jan 1997 14:21:06 +0000 (+0000) Subject: lilypond-0.0.21 X-Git-Tag: release/1.5.59~6452 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b282c9e3a28e88bf94af128f1d95dfdf94ad12ac;p=lilypond.git lilypond-0.0.21 --- diff --git a/hdr/bar.hh b/hdr/bar.hh index 187fadfe78..634940121e 100644 --- a/hdr/bar.hh +++ b/hdr/bar.hh @@ -12,7 +12,8 @@ struct Bar: Item { String type; Bar(String type); - void preprocess(); + + Molecule*brew_molecule()const; }; #endif // BAR_HH diff --git a/hdr/item.hh b/hdr/item.hh index 33b60831c1..516a7b8f9e 100644 --- a/hdr/item.hh +++ b/hdr/item.hh @@ -4,45 +4,18 @@ #include "glob.hh" #include "boxes.hh" #include "string.hh" - +#include "staffelem.hh" + + /// a horizontally fixed size element of the score -struct Item { +struct Item : Staff_elem { /// indirection to the column it is in PCol * pcol_; - /// indirection to the pstaff it is in - PStaff *pstaff_; - - /// member: the symbols - Molecule *output; - - /// - Offset offset_; - /** - This is needed, because #output# may still be - NULL. - */ /****************/ - - void translate(Offset); - - /// do calculations after determining horizontal spacing - virtual void postprocess(); - - /// do calculations before determining horizontal spacing - virtual void preprocess(); - /** - This is executed directly after the item is added to the - PScore - */ - virtual Interval width() const; - virtual Interval height() const; - String TeXstring () const ; Item(); void print()const; - virtual ~Item(); - Paperdef *paper() const; }; /** Item is the datastructure for printables whose width is known before the spacing is calculated diff --git a/hdr/script.hh b/hdr/script.hh new file mode 100644 index 0000000000..08d7a64f18 --- /dev/null +++ b/hdr/script.hh @@ -0,0 +1,37 @@ +/* + script.hh -- part of LilyPond + + (c) 1996 Han-Wen Nienhuys +*/ + +#ifndef SCRIPT_HH +#define SCRIPT_HH + +#include "scriptdef.hh" +#include "item.hh" + +struct Script : Item{ + int dir; + int symdir; + int pos; + int staffsize; + Script_def*specs; + Stem * stem_; + Item * support; + + /****************/ + + void set_symdir(); + void set_default_dir(); + void set_default_pos(); + + Molecule* brew_molecule()const; + virtual void do_post_processing(); + virtual void do_pre_processing(); + Script(Script_req*, Item*,int,Stem*p=0); + virtual Interval width() const; +}; + + +#endif // SCRIPT_HH + diff --git a/hdr/simplewalker.hh b/hdr/simplewalker.hh index 261394c206..635b9fbbcc 100644 --- a/hdr/simplewalker.hh +++ b/hdr/simplewalker.hh @@ -25,13 +25,9 @@ struct Simple_walker: Staff_walker { Clef clef_; Rhythmic_grouping default_grouping; Rhythmic_grouping *current_grouping; -// Real inbar; // whuh? - svec pending_slur_reqs; svec pending_slurs; - - - + /****************/ virtual void do_TYPESET_command(Command*); @@ -39,12 +35,12 @@ struct Simple_walker: Staff_walker { virtual void process_requests(); virtual void reset(); - void do_note(Rhythmic_req*); + void do_note(Note_info); Simple_walker(Simple_staff*); Simple_column *col(); Simple_staff *staff(); - void do_local_key(Note_req*n); + void do_local_key(Note_req*, Notehead*); int find_slur(const Voice*v); }; diff --git a/src/bar.cc b/src/bar.cc index bb66f2b777..01807f123e 100644 --- a/src/bar.cc +++ b/src/bar.cc @@ -9,10 +9,12 @@ Bar::Bar( String t) { type = t; } -void -Bar::preprocess() +Molecule* +Bar::brew_molecule()const { Symbol s = paper()->lookup_->bar(type); - output = new Molecule(Atom(s)); +Molecule* output = new Molecule(Atom(s)); +return output; + } diff --git a/src/meter.cc b/src/meter.cc index 14b242e5c6..dc3cb40f3e 100644 --- a/src/meter.cc +++ b/src/meter.cc @@ -9,10 +9,10 @@ Meter::Meter(sveca) { } -void -Meter::preprocess() +Molecule* +Meter::brew_molecule()const { Symbol s = paper()->lookup_->meter(args); - output = new Molecule(Atom(s)); +return new Molecule(Atom(s)); } diff --git a/src/simpleprint.cc b/src/simpleprint.cc index 4c0aa4b15c..b3f2ac40c0 100644 --- a/src/simpleprint.cc +++ b/src/simpleprint.cc @@ -20,7 +20,7 @@ Simple_staff::get_TYPESET_item(Command *com) s = new Bar(com->args[1]); } else if (type == "METER") { s = new Meter(arg); - } else if (type == "CLEF" ||type == "CURRENTCLEF") { + } else if (type == "CLEF" || type == "CURRENTCLEF") { Clef_item * c = new Clef_item; s = c; c->change = (type == "CLEF");