From: fred Date: Tue, 26 Mar 2002 23:33:27 +0000 (+0000) Subject: lilypond-1.3.37 X-Git-Tag: release/1.5.59~1386 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=05eac17f3481e65c36d962ab91be1228da80c139;p=lilypond.git lilypond-1.3.37 --- diff --git a/input/test/bb.ly b/input/test/bb.ly deleted file mode 100644 index 0c01477ada..0000000000 --- a/input/test/bb.ly +++ /dev/null @@ -1,23 +0,0 @@ -\score -{ - \context StaffGroup = a < - \context PianoStaff = b < - \context Staff = "c" \notes\relative c'' { b1 \break b } - \context Staff = "d" \notes\relative c'' { b1 \break b } - > - > - - \paper { - indent=100.0\mm; - linewidth=150.0\mm; - \translator - { - \StaffContext - \consists "Staff_margin_engraver"; - numberOfStaffLines = #1 - marginScriptPadding = #30 % urg: this is in PT - instrument = #"Foo" - instr = #"Bar" - } - } -} diff --git a/lily/align-element.cc b/lily/align-element.cc deleted file mode 100644 index a8b34c0693..0000000000 --- a/lily/align-element.cc +++ /dev/null @@ -1,149 +0,0 @@ -/* - align-elem.cc -- implement Align_elem - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include "align-element.hh" -#include "interval.hh" -#include "direction.hh" -#include "debug.hh" -#include "dimension-cache.hh" -#include "axis-group-interface.hh" - -/* - This callback is set in the children of the align element. It does - not compute anything, but a side effect of a->do_side_processing () - is that the elements are placed correctly. */ -Real -Align_element::alignment_callback (Dimension_cache const *c) -{ - Axis ax = c->axis (); - Score_element * sc = c->element_l ()->parent_l (ax); - Align_element * a = dynamic_cast (sc); - if (a && a->get_elt_property ("alignment-done") == SCM_UNDEFINED) - { - a->do_side_processing (ax); - } - return 0.0; -} - -void -Align_element::add_element (Score_element* s) -{ - s->add_offset_callback (alignment_callback, axis ()); - axis_group (this).add_element (s); -} - -/* - Hairy function to put elements where they should be. Can be tweaked - from the outside by setting minimum-space and extra-space in its - children */ -void -Align_element::do_side_processing (Axis a) -{ - set_elt_property ("alignment-done", SCM_BOOL_T); - - SCM d = get_elt_property ("stacking-dir"); - Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER; - if (!stacking_dir) - stacking_dir = DOWN; - - - Array dims; - - Link_array elems; - Link_array all_elts - = Group_interface__extract_elements (this, (Score_element*) 0, "elements"); - for (int i=0; i < all_elts.size(); i++) - { - Interval y = all_elts[i]->extent(a) + all_elts[i]->relative_coordinate (this, a); - if (!y.empty_b()) - { - Score_element *e =dynamic_cast(all_elts[i]); - - // todo: fucks up if item both in Halign & Valign. - SCM min_dims = e->remove_elt_property ("minimum-space"); - if (gh_pair_p (min_dims) && - gh_number_p (gh_car (min_dims)) - && gh_number_p (gh_cdr (min_dims))) - { - y.unite (Interval (gh_scm2double (gh_car (min_dims)), - gh_scm2double (gh_cdr (min_dims)))); - } - - SCM extra_dims = e->remove_elt_property ("extra-space"); - if (gh_pair_p (extra_dims) && - gh_number_p (gh_car (extra_dims)) - && gh_number_p (gh_cdr (extra_dims))) - { - y[LEFT] += gh_scm2double (gh_car (extra_dims)); - y[RIGHT] += gh_scm2double (gh_cdr (extra_dims)); - } - - elems.push (e); - dims.push (y); - } - } - - - Interval threshold = Interval (0, Interval::infinity ()); - SCM thr = get_elt_property ("threshold"); - if (gh_pair_p (thr)) - { - threshold[SMALLER] = gh_scm2double (gh_car (thr)); - threshold[BIGGER] = gh_scm2double (gh_cdr (thr)); - } - - Real where_f=0; - for (int i=0 ; i < elems.size(); i++) - { - Real dy = - stacking_dir * dims[i][-stacking_dir]; - if (i) - dy += stacking_dir * dims[i-1][stacking_dir]; - - if (i) - { - dy = (dy >? threshold[SMALLER] ) - translate_axis (where_f, a); - } -} - - -int -Align_element::get_count (Score_element*s)const -{ - SCM e = get_elt_property ("elements"); - int c =0; - while (gh_pair_p (e)) - { - if (gh_car (e) == s->self_scm_) - break; - c++; - e = gh_cdr (e); - } - return c; -} - -Axis -Align_element::axis () const -{ - return Axis (gh_scm2int (gh_car (get_elt_property ("axes")))); -} - -void -Align_element::set_axis (Axis a) -{ - axis_group (this).set_axes (a, a); -} - -Align_element::Align_element () -{ - axis_group (this).set_interface (); -} diff --git a/lily/axis-align-item.cc b/lily/axis-align-item.cc deleted file mode 100644 index d0301c907b..0000000000 --- a/lily/axis-align-item.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* - axis-align-item.cc -- implement Axis_align_item - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ - -#include "axis-align-item.hh" - -Axis_align_item::Axis_align_item () -{ -} - -void -Axis_align_item::do_print () const -{ - Axis_group_item::do_print (); -} diff --git a/lily/axis-align-spanner.cc b/lily/axis-align-spanner.cc deleted file mode 100644 index b369c85122..0000000000 --- a/lily/axis-align-spanner.cc +++ /dev/null @@ -1,13 +0,0 @@ -/* - axis-align-spanner.cc -- implement Axis_align_spanner - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ -#include "axis-align-spanner.hh" - -Axis_align_spanner::Axis_align_spanner() -{ -} diff --git a/lily/axis-group-item.cc b/lily/axis-group-item.cc deleted file mode 100644 index e3dfe358fe..0000000000 --- a/lily/axis-group-item.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* - axis-group-item.cc -- implement Axis_group_interface - - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - - */ - -#include "axis-group-item.hh" -#include "axis-group-interface.hh" - -Axis_group_item ::Axis_group_item () -{ - axis_group (this).set_interface (); -} diff --git a/lily/axis-group-spanner.cc b/lily/axis-group-spanner.cc deleted file mode 100644 index 00266e0cf7..0000000000 --- a/lily/axis-group-spanner.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* - axis-group-spanner.cc -- implement Axis_group_spanner - - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - - */ - -#include "axis-group-spanner.hh" -#include "axis-group-interface.hh" - -Axis_group_spanner::Axis_group_spanner() -{ - axis_group (this).set_interface (); -} diff --git a/lily/graphical-lisp-element.cc b/lily/graphical-lisp-element.cc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/align-element.hh b/lily/include/align-element.hh deleted file mode 100644 index 19a4e9dcc9..0000000000 --- a/lily/include/align-element.hh +++ /dev/null @@ -1,48 +0,0 @@ -/* - align-item.hh -- declare Align_elem - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_ALIGN_ITEM_HH -#define VERTICAL_ALIGN_ITEM_HH - -#include "score-element.hh" - -/** - Order elements top to bottom/left to right/right to left etc.. - - TODO: implement padding. - - document usage of this. - - - - ******* - - element properties - - stacking-dir - - Which side to align? -1: left side, 0: centered (around - center_l_ if not nil, or around center of width), 1: right side - - -*/ -class Align_element : public virtual Score_element { -public: - Axis axis () const; - - Align_element (); - void set_axis (Axis); - int get_count (Score_element*)const; - void add_element (Score_element *); - static Real alignment_callback (Dimension_cache const *); -protected: - virtual void do_side_processing (Axis); - -}; -#endif // VERTICAL_ALIGN_ITEM_HH diff --git a/lily/include/atom.hh b/lily/include/atom.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/axis-align-item.hh b/lily/include/axis-align-item.hh deleted file mode 100644 index 7a7d4022ec..0000000000 --- a/lily/include/axis-align-item.hh +++ /dev/null @@ -1,28 +0,0 @@ -/* - axis-align-item.hh -- declare Axis_align_item - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ - -#ifndef AXIS_ALIGN_ITEM_HH -#define AXIS_ALIGN_ITEM_HH - -#include "align-element.hh" -#include "axis-group-item.hh" - -/* - UGH. FIXME: multiple inheritance. - */ -class Axis_align_item : public virtual Align_element, public virtual Axis_group_item -{ -public: - Axis_align_item (); -protected: - virtual void do_print ()const; - -}; -#endif /* AXIS_ALIGN_ITEM_HH */ - diff --git a/lily/include/axis-align-spanner.hh b/lily/include/axis-align-spanner.hh deleted file mode 100644 index 0352968aee..0000000000 --- a/lily/include/axis-align-spanner.hh +++ /dev/null @@ -1,27 +0,0 @@ -/* - vertical-align-spanner.hh -- declare Vertical_align_spanner - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_ALIGN_SPANNER_HH -#define VERTICAL_ALIGN_SPANNER_HH - -#include "spanner.hh" -#include "align-element.hh" -#include "axis-group-spanner.hh" - -/* - FIXME: multiple inheritance - */ -class Axis_align_spanner : public virtual Align_element, public virtual Axis_group_spanner -{ -public: - VIRTUAL_COPY_CONS(Score_element); - Axis_align_spanner (); - virtual void do_print() const {} -}; -#endif // VERTICAL_ALIGN_SPANNER_HH diff --git a/lily/include/dummy.icc b/lily/include/dummy.icc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/head-column.hh b/lily/include/head-column.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/rest-column-engraver.hh b/lily/include/rest-column-engraver.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/rest-column.hh b/lily/include/rest-column.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/todo-performer.hh b/lily/include/todo-performer.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/vertical-align-engraver.hh b/lily/include/vertical-align-engraver.hh deleted file mode 100644 index 286395fceb..0000000000 --- a/lily/include/vertical-align-engraver.hh +++ /dev/null @@ -1,29 +0,0 @@ -/* - vertical-align-engraver.hh -- declare Vertical_align_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef VERTICAL_ALIGN_GRAV_HH -#define VERTICAL_ALIGN_GRAV_HH - -#include "engraver.hh" -class Axis_align_spanner; -class Vertical_align_engraver : public Engraver { - Axis_align_spanner * valign_p_; - bool qualifies_b (Score_element_info) const; -public: - VIRTUAL_COPY_CONS(Translator); - - Vertical_align_engraver(); -protected: - - virtual void acknowledge_element (Score_element_info); - virtual void do_creation_processing(); - virtual void do_removal_processing(); -}; - -#endif // VERTICAL_ALIGN_GRAV_HH diff --git a/lily/super-element.cc b/lily/super-element.cc deleted file mode 100644 index ee544eafae..0000000000 --- a/lily/super-element.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* - super-elem.cc -- implement Super_elem - - source file of the LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include "super-element.hh" -#include "line-of-score.hh" -#include "paper-score.hh" -#include "string.hh" -#include "paper-outputter.hh" - - -/** - for administration of what was done already - */ -enum Score_element_status { - ORPHAN=0, // not yet added to pstaff - VIRGIN, // added to pstaff - PREBROKEN, - PREBROKEN_SECOND, - PRECALCING, - PRECALCED, // calcs before spacing done - SPACING, - SPACED, - BROKEN, - BROKEN_SECOND, - POSTCALCING, // busy calculating. This is used to trap cyclic deps. - POSTCALCED, // after spacing calcs done - BREWING, - BREWED, -}; - -void -Super_element::pre_processing () -{ - calculate_dependencies (PRECALCED, PRECALCING, &Score_element::before_line_breaking); -} - -void -Super_element::space_processing () -{ - calculate_dependencies (SPACED, SPACING, &Score_element::do_space_processing); -} - -/* for break processing, use only one status, because copies have to - have correct status. (Previously, - Score_element::handle_[pre]broken_dependencies assigned to status_i_ - */ -void -Super_element::breakable_col_processing () -{ - calculate_dependencies (PREBROKEN, PREBROKEN, &Score_element::do_breakable_col_processing); - // calculate_dependencies (PREBROKEN_SECOND, PREBROKEN_SECOND, &Score_element::handle_prebroken_dependents); -} - - -void -Super_element::post_processing () -{ - // calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND, - // &Score_element::handle_broken_dependents); - calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::after_line_breaking); -} - -void -Super_element::output_all () -{ - calculate_dependencies (BREWED, BREWING, &Score_element::output_processing); -} - - - -