From cb0d30e674130bc105d2c01107e8a4b0202ce776 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:52:07 +0000 Subject: [PATCH] lilypond-0.0.65 --- flower/include/class-name.hh | 25 ---- lily/complex-staff.cc | 20 --- lily/include/complex-staff.hh | 25 ---- lily/include/identparent.hh | 1 - lily/include/notehead.hh | 51 ------- lily/include/p-staff.hh | 25 ---- lily/include/reqtodo.hh | 83 ----------- lily/include/staff-elem-info.hh | 34 ----- lily/include/staff-elem.hh | 105 ------------- lily/include/vertical-brace.hh | 20 --- lily/include/vertical-spanner.hh | 24 --- lily/p-staff.cc | 14 -- lily/staff-elem-info.cc | 28 ---- lily/staff-elem.cc | 245 ------------------------------- lily/vertical-brace.cc | 9 -- lily/vertical-spanner.cc | 17 --- 16 files changed, 726 deletions(-) delete mode 100644 flower/include/class-name.hh delete mode 100644 lily/complex-staff.cc delete mode 100644 lily/include/complex-staff.hh delete mode 100644 lily/include/identparent.hh delete mode 100644 lily/include/notehead.hh delete mode 100644 lily/include/p-staff.hh delete mode 100644 lily/include/reqtodo.hh delete mode 100644 lily/include/staff-elem-info.hh delete mode 100644 lily/include/staff-elem.hh delete mode 100644 lily/include/vertical-brace.hh delete mode 100644 lily/include/vertical-spanner.hh delete mode 100644 lily/p-staff.cc delete mode 100644 lily/staff-elem-info.cc delete mode 100644 lily/staff-elem.cc delete mode 100644 lily/vertical-brace.cc delete mode 100644 lily/vertical-spanner.cc diff --git a/flower/include/class-name.hh b/flower/include/class-name.hh deleted file mode 100644 index 14ebf4c927..0000000000 --- a/flower/include/class-name.hh +++ /dev/null @@ -1,25 +0,0 @@ -/* - class-name.hh -- declare - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - - -#ifndef CLASS_NAME_HH -#define CLASS_NAME_HH - -/** a macro to declare the classes name as a static and virtual function. - The static_name() can *not* be inlined (this might have the effect that - s->name() != S::static_name(). Overlapping strings need not be merged in C++ - */ -#define NAME_MEMBERS(c) \ -static char const *static_name();\ -virtual char const *name() const{ return c::static_name(); } \ -int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out() - -#define IMPLEMENT_STATIC_NAME(c)\ - char const *c::static_name() { return #c; } - -#endif // CLASS-NAME_HH diff --git a/lily/complex-staff.cc b/lily/complex-staff.cc deleted file mode 100644 index 57d2fc0861..0000000000 --- a/lily/complex-staff.cc +++ /dev/null @@ -1,20 +0,0 @@ -#include "complex-staff.hh" -#include "complex-walker.hh" -#include "p-score.hh" - -/** Aside from putting fields right - */ -void -Complex_staff::set_output(PScore* pscore_l ) -{ - pstaff_l_ = new PStaff(pscore_l); - pscore_l_ = pscore_l; - pscore_l_->add(pstaff_l_); -} - - -Staff_walker * -Complex_staff::get_walker_p() -{ - return new Complex_walker(this); -} diff --git a/lily/include/complex-staff.hh b/lily/include/complex-staff.hh deleted file mode 100644 index 0a37e3a5f7..0000000000 --- a/lily/include/complex-staff.hh +++ /dev/null @@ -1,25 +0,0 @@ -/* - complex-staff.hh -- declare Complex_staff - - (c) 1996,1997 Han-Wen Nienhuys -*/ - -#ifndef COMPLEXSTAF_HH -#define COMPLEXSTAF_HH - - -#include "key.hh" -#include "staff.hh" -#include "staff-walker.hh" - -/// -struct Complex_staff : Staff { - - /* *************** */ - - virtual void set_output(PScore *); - virtual Staff_walker *get_walker_p(); -}; - -#endif // COMPLEXSTAF_HH - diff --git a/lily/include/identparent.hh b/lily/include/identparent.hh deleted file mode 100644 index 09c7cfafd0..0000000000 --- a/lily/include/identparent.hh +++ /dev/null @@ -1 +0,0 @@ -#error diff --git a/lily/include/notehead.hh b/lily/include/notehead.hh deleted file mode 100644 index e28c387a28..0000000000 --- a/lily/include/notehead.hh +++ /dev/null @@ -1,51 +0,0 @@ -/* - notehead.hh -- part of LilyPond - - (c) 1996,97 Han-Wen Nienhuys -*/ - -#ifndef NOTEHEAD_HH -#define NOTEHEAD_HH - -#include "item.hh" - -/** ball at the end of the stem takes care of: - - * help lines - * proper placing of dots - - It also is the item for a Rest - - */ - -class Notehead : public Item { -public: - NAME_MEMBERS(Notehead); - - bool rest_b_; - int position_i_; - - /// -1 = lowest, 0 = inside, 1 = top - int extremal_i_; - - /// needed for the help-lines - int staff_size_i_; - int dots_i_; - int balltype_i_; - int x_dir_i_; - - /* *************** */ - - void set_rhythmic(Rhythmic_req *); - - /** - position of top line (5 linestaff: 8) - */ - Notehead(int staff_size); - static int compare(Notehead * const &a, Notehead *const &b) ; -protected: - virtual void do_print()const; - virtual Molecule* brew_molecule_p()const; -}; -#endif // NOTEHEAD_HH - diff --git a/lily/include/p-staff.hh b/lily/include/p-staff.hh deleted file mode 100644 index c4236c874e..0000000000 --- a/lily/include/p-staff.hh +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef PSTAFF_HH -#define PSTAFF_HH - -#include "proto.hh" -#include "plist.hh" -#include "item.hh" -#include "symbol.hh" - -/// items grouped horizontally -struct PStaff { - PScore * pscore_l_; - - - Link_list spans; - Link_list its; - - /* *************** */ - void add(Item*i); - PStaff(PScore*); - -private: - PStaff(PStaff const&); -}; - -#endif diff --git a/lily/include/reqtodo.hh b/lily/include/reqtodo.hh deleted file mode 100644 index eaed606453..0000000000 --- a/lily/include/reqtodo.hh +++ /dev/null @@ -1,83 +0,0 @@ -#if 0 - - - -/**Draw a (Guitar) chord above or below this ``note''. -Why a request? -Because everything else is done in requests. -*/ -struct Chord : Request { - // don't know how this looks. -}; - - -/// for absolute dynamics -enum Loudness { - FFF, FF, F, MF, MP, P, PP, PPP -} ; - - -/** -Start/stop a bracket at this note. if #nplet# is set, the staff will -try to put an appropriate number over the bracket -*/ -struct Bracket_req : Span_req { - int nplet; // print a number over the beam. -}; - -struct Subtle_req { - Moment subtime; -}; - - -/** helper in the hierarchy. Each dynamic is bound to one note ( a - crescendo spanning multiple notes is thought to be made of two - "dynamics": a start and a stop). Dynamic changes can occur in a - smaller time than the length of its note, therefore fore each - Dynamic request carries a time, measured from the start of its - note. - - This subfield would come in handy, if mpp96 was adapted for midi - support. - - Dynamic should have been derived from request, but I don't want to - fuss with virtual baseclasses. */ - -struct Dynamic:Subtle_req { - -}; -/// do a crescendo -struct Cresc_req : Span_req, Dynamic { - -}; - -/// do a decrescendo -struct Decresc_req : Span_req, Dynamic { - -}; - -/// do a dynamic like "fff" or "mp" -struct Absdynamic_req : Request, Dynamic { - Loudness loudness; -}; - -struct Grace_req : Subtle_req { - -}; - -struct Grace_turn_req : Grace_turn { - -}; - -struct Grace_note : Melodic_req { - -}; - -struct Grace_notes { - -}; - -struct Glissando_req : Span_req { - -}; -#endif diff --git a/lily/include/staff-elem-info.hh b/lily/include/staff-elem-info.hh deleted file mode 100644 index 7d5955a2a7..0000000000 --- a/lily/include/staff-elem-info.hh +++ /dev/null @@ -1,34 +0,0 @@ -/* - staff-elem-info.hh -- declare Score_elem_info - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - - -#ifndef STAFFELEMINFO_HH -#define STAFFELEMINFO_HH - -#include "scalar.hh" -#include "lily-proto.hh" -#include "varray.hh" - -/// data container. -struct Score_elem_info { - Score_elem * elem_l_; - Request*req_l_; - Voice const * voice_l_; - Array origin_reg_l_arr_; - - /* *** */ - Score_elem_info(Score_elem*, Request*); - Score_elem_info(); -}; - - -struct Feature { - Scalar type_; - Scalar value_; -}; -#endif // STAFFELEMINFO_HH diff --git a/lily/include/staff-elem.hh b/lily/include/staff-elem.hh deleted file mode 100644 index fa459f9e76..0000000000 --- a/lily/include/staff-elem.hh +++ /dev/null @@ -1,105 +0,0 @@ -/* - staff-elem.hh -- part of LilyPond - - (c) 1996,97 Han-Wen Nienhuys -*/ - -#ifndef STAFFELEM_HH -#define STAFFELEM_HH -#include "varray.hh" -#include "proto.hh" -#include "offset.hh" -#include "molecule.hh" -#include "class-name.hh" - - -/** Both Spanner and Item are Score_elem's. Most Score_elem's depend - on other Score_elem's, eg, Beam needs to know and set direction of - Stem. So the Beam has to be calculated *before* Stem. This is - accomplished with the dependencies field of struct Score_elem. - - (elem) - */ -class Score_elem { - - /// member: the symbols - Molecule *output; // should scrap, and use temp var? - - - /** - This is needed, because #output# may still be - NULL. - */ - Offset offset_; - Array dependancy_l_arr_; -public: - enum Status { - ORPHAN, // not yet added to pstaff - VIRGIN, // added to pstaff - PRECALCING, - PRECALCED, // calcs before spacing done - POSTCALCING, // busy calculating. This is used to trap cyclic deps. - POSTCALCED, // after spacing calcs done - VERTICALCING, // height determined - VERTICALCED, - OUTPUT, // molecule has been output - DELETED, // to catch malloc mistakes. - } status; - - /// the pstaff it is in - PStaff *pstaff_l_; - - /* *************** */ - Score_elem(Score_elem const&); - String TeXstring () const ; - virtual void print() const; - virtual Interval width() const; - virtual Interval height() const; - Paper_def *paper() const; - virtual ~Score_elem(); - Score_elem(); - NAME_MEMBERS(Score_elem); - - /** - translate the symbol. The symbol does not have to be created yet. - Overridable, since this staff-elem might act as a pseudo-list. - */ - virtual void translate(Offset); - Offset offset()const; - void add_processing(); - void pre_processing(); - void post_processing(); - void molecule_processing(); - - virtual Spanner* spanner() { return 0; } - virtual Item * item() { return 0; } - /** - add a dependency. It may be the 0 pointer, in which case, it is ignored. - */ - void add_dependency(Score_elem* ); - void substitute_dependency(Score_elem* old, Score_elem * newdep); - -protected: - virtual Interval do_height()const; - virtual Interval do_width()const; - /// do printing of derived info. - virtual void do_print() const {} - /// generate the molecule - virtual Molecule* brew_molecule_p()const; - ///executed directly after the item is added to the PScore - virtual void do_add_processing(); - /// do calculations before determining horizontal spacing - virtual void do_pre_processing(); - - /// do calculations after determining horizontal spacing - virtual void do_post_processing(); - - /// do calculations after height of spanners/items is determined. - virtual void do_verticalcing(); - Array dependant_l_arr_; - -}; - - -#endif // STAFFELEM_HH - diff --git a/lily/include/vertical-brace.hh b/lily/include/vertical-brace.hh deleted file mode 100644 index c0b368e2d2..0000000000 --- a/lily/include/vertical-brace.hh +++ /dev/null @@ -1,20 +0,0 @@ -/* - vertical-brace.hh -- declare - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_BRACE_HH -#define VERTICAL_BRACE_HH - -#include "vertical-spanner.hh" - -class Vertical_brace : public Vertical_spanner { -public: - -}; - -#endif // VERTICAL_BRACE_HH diff --git a/lily/include/vertical-spanner.hh b/lily/include/vertical-spanner.hh deleted file mode 100644 index be0aee63cc..0000000000 --- a/lily/include/vertical-spanner.hh +++ /dev/null @@ -1,24 +0,0 @@ -/* - vertical-spanner.hh -- declare Vertical_spanner - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_SPANNER_HH -#define VERTICAL_SPANNER_HH - -#include "staff-elem.hh" - -class Vertical_spanner: virtual public Score_elem { -public: - PStaff *lower_pstaff_l_; - PStaff *upper_pstaff_l_; - NAME_MEMBERS(Vertical_spanner); - - Vertical_spanner(); - -}; -#endif // VERTICAL_SPANNER_HH diff --git a/lily/p-staff.cc b/lily/p-staff.cc deleted file mode 100644 index f8ba2bb146..0000000000 --- a/lily/p-staff.cc +++ /dev/null @@ -1,14 +0,0 @@ -#include "p-staff.hh" -#include "molecule.hh" - -PStaff::PStaff(PScore*ps) -{ - pscore_l_=ps; -} - -void -PStaff::add(Item *i) -{ - its.bottom().add(i); - i->pstaff_l_ = this; -} diff --git a/lily/staff-elem-info.cc b/lily/staff-elem-info.cc deleted file mode 100644 index 669c0244ce..0000000000 --- a/lily/staff-elem-info.cc +++ /dev/null @@ -1,28 +0,0 @@ -/* - staff-elem-info.cc -- implement Score_elem_info - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - -#include "staff-elem-info.hh" -#include "request.hh" - -Score_elem_info::Score_elem_info(Score_elem*s_l, Request*r_l) -{ - elem_l_ = s_l; - voice_l_ = (r_l)?r_l->voice_l():0; - req_l_ = r_l; -} - -Score_elem_info::Score_elem_info() -{ - elem_l_ = 0; - voice_l_ = 0; - - req_l_ = 0; -} - - - diff --git a/lily/staff-elem.cc b/lily/staff-elem.cc deleted file mode 100644 index ec4f851922..0000000000 --- a/lily/staff-elem.cc +++ /dev/null @@ -1,245 +0,0 @@ -/* - staff-elem.cc -- implement Score_elem - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - -#include "paper-def.hh" -#include "lookup.hh" -#include "p-score.hh" -#include "symbol.hh" -#include "p-staff.hh" -#include "molecule.hh" -#include "staff-elem.hh" -#include "debug.hh" - -String -Score_elem::TeXstring() const -{ - Molecule m(*output); - m.translate(offset_); // ugh? - return m.TeXstring(); -} - -Score_elem::Score_elem(Score_elem const&s) - :dependancy_l_arr_(s.dependancy_l_arr_), - dependant_l_arr_(s.dependant_l_arr_) -{ - status = s.status; - assert(!s.output); - output = 0; - pstaff_l_ = s.pstaff_l_; - offset_ = Offset(0,0); -} - -/** - TODO: - If deleted, then remove dependant_l_arr_ depency! - */ -Score_elem::~Score_elem() -{ - assert(status < DELETED); - delete output; - status = DELETED; - output = 0; -} - -void -Score_elem::translate(Offset O) -{ - offset_ += O; -} - -Interval -Score_elem::do_width() const -{ - Interval r; - - if (!output){ - Molecule*m = brew_molecule_p(); - r = m->extent().x; - delete m; - } else - r = output->extent().x; - return r; -} - -Interval -Score_elem::width() const -{ - Interval r=do_width(); - - if (!r.empty_b()) // float exception on DEC Alpha - r+=offset_.x; - - return r; -} -Interval -Score_elem::do_height() const -{ - Interval r; - if (!output){ - Molecule*m = brew_molecule_p(); - r = m->extent().y; - delete m; - } else - r = output->extent().y; - return r; -} - -Interval -Score_elem::height() const -{ - Interval r=do_height(); - - if (!r.empty_b()) - r+=offset_.y; - - - return r; -} - -void -Score_elem::print()const -{ -#ifndef NPRINT - mtor << name() << "{\n"; - do_print(); - if (output) - output->print(); - - mtor << "}\n"; -#endif -} - - - -Score_elem::Score_elem() -{ - pstaff_l_=0; - offset_ = Offset(0,0); - output = 0; - status = ORPHAN; -} - - -Paper_def* -Score_elem::paper() const -{ - assert(pstaff_l_); - return pstaff_l_->pscore_l_->paper_l_; -} - -void -Score_elem::add_processing() -{ - if (status >= VIRGIN) - return; - status = VIRGIN; - do_add_processing(); -} - -void -Score_elem::pre_processing() -{ - if (status >= PRECALCED ) - return; - assert(status != PRECALCING); // cyclic dependency - status = PRECALCING; - - for (int i=0; i < dependancy_l_arr_.size(); i++) - if (dependancy_l_arr_[i]) - dependancy_l_arr_[i]->pre_processing(); - - - do_pre_processing(); - status = PRECALCED; -} -void -Score_elem::post_processing() -{ - if (status >= POSTCALCED) - return; - assert(status != POSTCALCING);// cyclic dependency - status=POSTCALCING; - - for (int i=0; i < dependancy_l_arr_.size(); i++) - if (dependancy_l_arr_[i]) - dependancy_l_arr_[i]->post_processing(); - do_post_processing(); - status=POSTCALCED; -} - -void -Score_elem::molecule_processing() -{ - if (status >= OUTPUT) - return; - status = OUTPUT; // do it only once. - for (int i=0; i < dependancy_l_arr_.size(); i++) - if (dependancy_l_arr_[i]) - dependancy_l_arr_[i]->molecule_processing(); - - output= brew_molecule_p(); -} - -void -Score_elem::do_post_processing() -{ -} - -void -Score_elem::do_pre_processing() -{ -} -void -Score_elem::do_verticalcing() -{ -} - -void -Score_elem::do_add_processing() -{ -} - -void -Score_elem::substitute_dependency(Score_elem * old, Score_elem * newdep) -{ - bool hebbes_b=false; - for (int i=0; i < dependancy_l_arr_.size(); i++) { - if (dependancy_l_arr_[i] == old){ - dependancy_l_arr_[i] = newdep; - hebbes_b = true; - } else if (dependancy_l_arr_[i] == newdep) { - hebbes_b = true; - } - } - if (!hebbes_b) - dependancy_l_arr_.push(newdep); -} - -void -Score_elem::add_dependency(Score_elem * p) -{ - for (int i=0; i < dependancy_l_arr_.size(); i ++) - if (dependancy_l_arr_[i] == p) - return; - - dependancy_l_arr_.push(p); - p->dependant_l_arr_.push(p); -} -IMPLEMENT_STATIC_NAME(Score_elem); - -Molecule* -Score_elem::brew_molecule_p()const -{ - Atom a(paper()->lookup_l()->fill(Box(Interval(0,0), Interval(0,0)))); - return new Molecule (a); -} -Offset -Score_elem::offset() const -{ - return offset_; -} diff --git a/lily/vertical-brace.cc b/lily/vertical-brace.cc deleted file mode 100644 index 0bd59e7768..0000000000 --- a/lily/vertical-brace.cc +++ /dev/null @@ -1,9 +0,0 @@ -/* - vertical-brace.cc -- implement - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - -#include "vertical-brace.hh" diff --git a/lily/vertical-spanner.cc b/lily/vertical-spanner.cc deleted file mode 100644 index bea6834c19..0000000000 --- a/lily/vertical-spanner.cc +++ /dev/null @@ -1,17 +0,0 @@ -/* - vertical-spanner.cc -- implement Vertical_spanner - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - -#include "vertical-spanner.hh" - -Vertical_spanner::Vertical_spanner() -{ - upper_pstaff_l_ = lower_pstaff_l_ = 0; -} - -IMPLEMENT_STATIC_NAME(Vertical_spanner); - -- 2.39.5