+
+pl 10.uu1
+ - various small bfs
+ - bf: alignment reversed
+ - Staff_symbol_referencer -> Staff_symbol_referencer_interface
+ - bf: staccato pos
+ - Knee fixes (thanks, Jan)
+
pl 10.jcn2
- fixes for invisible beamed stems
- removed steminfo from properties, don't cache Stem_info
- steminfo to properties
- dropped internote dim for stem-beams
+**********
pl 9.hwn1
- abstracting Staff_symbol_referencer to an interface.
- quantised_position for staccato dots.
tremolo must be parallel to the beam. If the stem is invisible
(eg. on a whole note), the tremolo must be centered on the note.
-@mudelafile{stem-tremolo.ly}
+@c @mu delafile{stem-tremolo.ly}
Chord tremolos look like beams, but are a kind of repeat symbol.
To avoid confusion, chord tremolo beams do not reach the stems, but
as half notes cannot appear in a regular beam, and should reach the
stems.
-@mudelafile{chord-tremolo.sly}
+@c miudelafile{chord-tremolo.sly}
Beams, stems and noteheads often have communication troubles, since
the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
single note, simply attach `@code{:}@var{length}' to the note itself
(see also section XREF-tremolo [FIXME]).
-@mudela[fragment,verbatim,center]
+@ignore
+@mu dela[fragment,verbatim,center]
[:16 e'1 g'] [:8 e'4 f']
@end mudela
-@mudela[fragment,verbatim,center]
+@mud ela[fragment,verbatim,center]
c'4:32 [:16 c'8 d'8]
@end mudela
-
+@end ignore
@cindex --@@@code{-}@code{-}
.* TODO
. * use hash tabs iso. alist_ for elt property?
. * agressive type-checking for SCM stuff.
+. * use "staff-space" and "half-space" iso interline,
+ staff_line_leading () etc.
. * TODO^2:
. * make a TODO.texi, like http://www.gnu.org/software/guile/ideas.html
ctor_dict["Score_element"]->create_func ();
. * acc at tied note after linebreak.
. * fix font-naming and selecting
-. * fix naming: \interline Context.staffLineLeading, staff_line_leading (),
-staff_position staff_space
. * chord tonic: placement of accidental C#, Cb (from scm and C++)
. * note head on stem err msg in dutch.
. * why need to run -C mf twice?
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=10
-MY_PATCH_LEVEL=jcn2
+PATCH_LEVEL=11
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
+++ /dev/null
-% core dumps
-
-global = \notes {
- \key a \minor;
- \time 6/4;
-}
-
-\score{
- \notes \context PianoStaff <
- \global
- \context Staff=up { c }
- %\context Staff=down { \autochange Staff c }
-% \context Staff=down { c }
- >
- \paper {
- \translator{
- \StaffContext
-
- % other core dump when this is removed?
-% \remove "Time_signature_engraver";
- }
- }
-}
-
+++ /dev/null
-
-\score { \notes { c1 \< \break \! c1 }}
if (center_f)
translate_axis ( - center_f, axis ());
- dim_cache_[axis ()]->invalidate ();
+
+ // dim_cache_[axis ()]->invalidate ();
+
}
Align_element::Align_element()
{
- ordered_b_ = true;
threshold_interval_ = Interval (0, Interval::infinity ());
stacking_dir_ = DOWN;
align_dir_ = CENTER;
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "axis-group-element.hh"
#include "axis-group-element.hh"
#include "dimension-cache.hh"
+#include "group-interface.hh"
Link_array<Score_element>
Axis_group_element::get_extra_dependencies() const
Link_array<Score_element>
Axis_group_element::elem_l_arr () const
{
- /*
- ugh. I know
- */
- Link_array<Score_element> r;
- for (SCM s = get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
- {
- SCM e=gh_car (s);
- r.push (unsmob_element (e));
- }
-
- return r;
+ return
+ Group_interface__extract_elements (this, (Score_element*)0, "elements");
}
Link_array<Score_element>
}
-/*
- UGH.
- */
-void
-Axis_group_element::add_extra_element (Score_element *e)
-{
- add_element (e);
-}
-
void
Axis_group_element::add_element (Score_element *e)
if (!e->parent_l (axes_[i]))
e->set_parent (this, axes_[i]);
}
- set_elt_property ("elements",
- gh_cons (e->self_scm_,
- get_elt_property ("elements")));
-
- assert (e->parent_l(Y_AXIS) == this || e->parent_l (X_AXIS) == this);
+ Group_interface gi (this);
+ gi.add_element (e);
}
-
-
-
-
-
-
&& ! dynamic_cast<Axis_group_element*> (elts_[i]->parent_l (Y_AXIS)))
{
- staffline_p_->add_extra_element (elts_[i]);
+ staffline_p_->add_element (elts_[i]);
}
}
elts_.clear ();
+++ /dev/null
-/*
- axis-item.cc -- implement Axis_group_item
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-#include "axis-group-item.hh"
-#include "paper-column.hh"
-
-
-
-void
-Axis_group_item::do_breakable_col_processing()
-{
-#if 0
- if (!breakable_b ()) // ugh should merge with Item code
- return;
-
- OK();
- copy_breakable_items();
-
-
- Link_array<Score_element> elems = elem_l_arr ();
- for (int i=0; i < elems.size(); i++)
- {
- Item* it_l = dynamic_cast<Item*> (elems[i]);
- Direction j=LEFT;
- do
- {
- Axis_group_item * my_brok
- = dynamic_cast<Axis_group_item*> (find_broken_piece(j));
- Item *new_l = it_l->find_broken_piece (j);
- my_brok->add_element (new_l);
- }
- while (flip(&j)!=LEFT);
- }
-#endif
- Item::do_breakable_col_processing();
-}
-
+++ /dev/null
-/*
- axis-group-spanner.cc -- implement Axis_group_spanner
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "axis-group-spanner.hh"
-#include "debug.hh"
-#include "item.hh"
-#include "paper-column.hh"
-
-/** Do stuff if we're not broken. In this case the last and first
- columns usually are pre- and postbreak respectively,
- so the items from these columns need adjusting.
- */
-void
-Axis_group_spanner::do_break_processing_if_unbroken()
-{
-#if 0
- Link_array<Score_element> elems = elem_l_arr ();
- Line_of_score *my_line = line_l();
- for (int i=0; i < elems.size(); i++)
- {
- if (!elems[i]->line_l())
- {
- Item * item_l = dynamic_cast<Item*> (elems[i]);
- if (item_l
- && item_l->breakable_b ()
- && item_l->break_status_dir() == 0)
- {
- // last two checks are paranoia
- Score_element * broken_item_l =
- item_l->find_broken_piece (my_line);
- add_element (broken_item_l);
- }
-
- Spanner *spanner_l = dynamic_cast<Spanner*> (elems[i]);
- if (spanner_l)
- {
- Score_element *broken_spanner_l =
- spanner_l->find_broken_piece (my_line);
- add_element (broken_spanner_l);
- }
- remove_element (elems[i]);
- }
-
- }
-#endif
-}
-
-void
-Axis_group_spanner::do_break_processing()
-{
- Spanner::do_break_processing ();
-
- bool breaking_self_b = ! Spanner::line_l();
- if (!breaking_self_b)
- {
- do_break_processing_if_unbroken();
- Spanner::do_break_processing();
- return;
- }
-
-#if 0
- break_into_pieces ();
- Link_array<Score_element> loose_elems = elem_l_arr ();
-
- Array<int> axeses;
-
- for (int i=0; i < loose_elems.size (); i++)
- {
- Score_element* elt = loose_elems[i];
- /*
- with which axes do we have to meddle?
- */
- int j =0;
- int as [2];
- for (int a = X_AXIS; a < NO_AXES; ++a)
- if (elt->parent_l (Axis (a)) == this)
- as[j++] = a;
- if (j == 1)
- as[j++] = as[0];
-
- axeses.push (as[0]);
- axeses.push (as[1]);
- }
-
- remove_all();
-
- for (int i=0; i < loose_elems.size(); i++)
- {
- Score_element * elt = loose_elems[i];
- Line_of_score *elt_line = elt->line_l();
-
- Axis a1= (Axis)axeses[2*i]; // ugh.
- Axis a2= (Axis)axeses[2*i+1]; // ugh.
- if (! elt_line)
- {
- /* this piece doesn't know where it belongs.
- Find out if it was broken, and use the broken remains
- */
-
-
- Item *it = dynamic_cast <Item *> (elt) ;
- if (Spanner * sp =dynamic_cast <Spanner *> (elt))
- {
- for (int j =0; j < sp->broken_into_l_arr_.size(); j++)
- {
- Line_of_score *l = sp->broken_into_l_arr_[j]->line_l ();
-
- Axis_group_spanner * my_broken_l
- = dynamic_cast<Axis_group_spanner*>(find_broken_piece (l));
-
- Score_element * broken_span_l
- = sp->find_broken_piece (l);
-
- if (broken_span_l)
- my_broken_l->add_element (broken_span_l, a1, a2);
- }
- }
- else if (it && it->broken_original_b ())
- {
- // broken items
- Direction j=LEFT;
- do
- {
- Item * broken_item = it->find_broken_piece (j);
- Line_of_score * item_line_l = broken_item->line_l() ;
- if (! item_line_l)
- continue;
-
- Axis_group_spanner * v
- = dynamic_cast<Axis_group_spanner*>(find_broken_piece (item_line_l));
- if (v)
- v->add_element (broken_item, a1, a2);
- else
- {
- broken_item->set_elt_property ("transparent", SCM_BOOL_T);
- broken_item->set_empty (X_AXIS); // UGH.
- broken_item->set_empty (Y_AXIS);
- }
-
- }
- while (flip(&j) != LEFT);
- }
- }
- else
- {
- /* this piece *does* know where it belongs.
- Put it in appropriate piece of this spanner
- */
- Axis_group_spanner * my_broken_l
- = dynamic_cast<Axis_group_spanner*> (find_broken_piece (elt->line_l()));
- my_broken_l->add_element (elt, a1, a2);
- }
- }
-
- Spanner::do_break_processing();
-#endif
-}
-
-
-
-
#include "bar-script-engraver.hh"
#include "bar.hh"
#include "clef-item.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "text-item.hh"
#include "lily-guile.hh"
#include "paper-column.hh"
return;
}
- stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
+ stem_l->set_elt_property ("duration-log",
+ gh_int2scm (rhythmic_req->duration_.durlog_i_));
Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_;
beam_info_p_->add_stem (stem_location, rhythmic_req->duration_.durlog_i_ - 2);
beam_p_->add_stem (stem_l);
#include "paper-def.hh"
#include "lookup.hh"
#include "group-interface.hh"
+#include "staff-symbol-referencer.hh"
#include "cross-staff.hh"
Beam::Beam ()
}
-#if 0
-Interval
-Beam::do_width () const
-{
- return Interval (stem (0)->hpos_f (),
- stems_.top ()->hpos_f ());
-}
-#endif
+
Direction
Beam::get_default_dir () const
Stem *s = stem (i);
s->set_elt_property ("beam-dir", gh_int2scm (d));
- SCM force = s->remove_elt_property ("dir-forced");
+ SCM force = s->get_elt_property ("dir-forced"); // remove_prop?
if (force == SCM_UNDEFINED)
s->set_direction ( d);
}
Stem* s = stem (i);
if (s->invisible_b ())
continue;
- l.input.push (Offset (s->hpos_f () - x0, s->get_info ().idealy_f_));
+ l.input.push (Offset (s->hpos_f () - x0, s->calc_stem_info ().idealy_f_));
}
l.minimise (slope_f_, left_y_);
}
if (s->invisible_b ())
continue;
Real y = (s->hpos_f () - x0) * slope_f_ + left_y_;
- Stem_info info = s->get_info ();
+ Stem_info info = s->calc_stem_info ();
// correct for knee
if (get_direction () != s->get_direction ())
{
y -= get_direction () * (beam_f / 2
+ (multiplicity_i_ - 1) * interbeam_f);
+
+
+ Staff_symbol_referencer_interface s1 (s);
+ Staff_symbol_referencer_interface s2 (stem_top ());
+
if (!i
- && s->staff_symbol_l () != stem_top ()->staff_symbol_l ())
- y += get_direction () * (multiplicity_i_ - (s->flag_i_ - 2) >? 0)
+ && s1.staff_symbol_l () != s2.staff_symbol_l ())
+ y += get_direction () * (multiplicity_i_ - (s->flag_i () - 2) >? 0)
* interbeam_f;
}
{
if (!stem_count ())
slope_f_ = left_y_ = 0;
- else if (first_visible_stem ()->get_info ().idealy_f_ == last_visible_stem ()->get_info ().idealy_f_)
+ else if (first_visible_stem ()->calc_stem_info ().idealy_f_ == last_visible_stem ()->calc_stem_info ().idealy_f_)
{
slope_f_ = 0;
- left_y_ = first_visible_stem ()->get_info ().idealy_f_;
+ left_y_ = first_visible_stem ()->calc_stem_info ().idealy_f_;
left_y_ *= get_direction ();
}
else
Real lengthened = paper_l ()->get_var ("beam_lengthened");
Real steep = paper_l ()->get_var ("beam_steep_slope");
- if (((left_y_ - first_visible_stem ()->get_info ().idealy_f_ > lengthened)
+ if (((left_y_ - first_visible_stem ()->calc_stem_info ().idealy_f_ > lengthened)
&& (slope_f_ > steep))
- || ((left_y_ + slope_f_ * dx_f - last_visible_stem ()->get_info ().idealy_f_ > lengthened)
+ || ((left_y_ + slope_f_ * dx_f - last_visible_stem ()->calc_stem_info ().idealy_f_ > lengthened)
&& (slope_f_ < -steep)))
{
slope_f_ = 0;
if (q == ly_symbol2scm ("none"))
return;
- Real interline_f = stem (0)->staff_line_leading_f ();
+ Staff_symbol_referencer_interface st (this);
+ Real interline_f = st.staff_line_leading_f ();
+
Real staffline_f = paper_l ()->get_var ("stafflinethickness");
Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));;
hang straddle sit inter hang
*/
- Real space = stem (0)->staff_line_leading_f ();
+ Staff_symbol_referencer_interface sinf (this);
+ Real space = sinf.staff_line_leading_f ();
Real staffline_f = paper_l ()->get_var ("stafflinethickness");
Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));;
} while ((flip (&d)) != LEFT);
}
-#if 0
- /*
- Why?
- */
- if (stem_count ())
- {
- stem (0)->beams_i_drul_[LEFT] =0;
- stem (stem_count () -1)->beams_i_drul_[RIGHT] =0;
- }
-#endif
}
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include "dimension-cache.hh"
+#include "dimension-cache.hh"
#include "bow.hh"
#include "debug.hh"
#include "paper-def.hh"
*/
+#include "staff-symbol-referencer.hh"
#include "breathing-sign-engraver.hh"
#include "breathing-sign.hh"
#include "musical-request.hh"
{
if(breathing_sign_req_l_) {
breathing_sign_p_ = new Breathing_sign;
+ Staff_symbol_referencer_interface st (breathing_sign_p_);
+ st.set_interface ();
announce_element (Score_element_info (breathing_sign_p_, breathing_sign_req_l_));
}
TODO: --> see breathing-sign-engraver.cc
*/
+#include "staff-symbol-referencer.hh"
#include "breathing-sign.hh"
#include "string.hh"
Molecule*
Breathing_sign::do_brew_molecule_p () const
{
- Real dl = staff_line_leading_f();
+ Staff_symbol_referencer_interface si (this);
+
+ Real dl = si.staff_line_leading_f();
Interval i1(0, dl / 6), i2(-dl / 2, dl / 2);
Box b(i1, i2);
void
Breathing_sign::do_post_processing()
{
- Real dl = staff_line_leading_f();
+ Real dl = Staff_symbol_referencer_interface (this).staff_line_leading_f();
translate_axis(2.0 * dl * get_direction (), Y_AXIS);
}
if (Stem* s = dynamic_cast<Stem *> (i.elem_l_))
{
int type_i = prev_start_req_->type_i_;
- s->flag_i_ = intlog2 (type_i) - 2;
+ s->set_elt_property ("duration-log", gh_int2scm (intlog2 (type_i) - 2));
- s->beams_i_drul_[LEFT] = s->flag_i_;
- s->beams_i_drul_[RIGHT] = s->flag_i_;
+ s->beams_i_drul_[LEFT] = s->flag_i ();
+ s->beams_i_drul_[RIGHT] = s->flag_i ();
- abeam_p_->multiplicity_i_ = s->flag_i_;
+ abeam_p_->multiplicity_i_ = s->flag_i ();
/*
abbrev gaps on all but half note
*/
#if 0
if (s->type_i () != 1)
{
- int gap_i =s->flag_i_ - ((s->type_i () >? 2) - 2);
+ int gap_i =s->flag_i () - ((s->type_i () >? 2) - 2);
s->set_elt_property ("beam-gap", gh_int2scm(gap_i));
}
#else
if (s->type_i () != 1)
{
- int gap_i =s->flag_i_ - ((s->type_i () >? 2) - 2);
+ int gap_i =s->flag_i () - ((s->type_i () >? 2) - 2);
abeam_p_->set_elt_property ("beam-gap", gh_int2scm(gap_i));
}
#endif
*/
#include <ctype.h>
+#include "staff-symbol-referencer.hh"
#include "bar.hh"
#include "clef-engraver.hh"
#include "clef-item.hh"
{
if (Note_head * h = dynamic_cast<Note_head*>(it_l))
{
- h->set_position (int (h->position_f ()) + c0_position_i_);
+ Staff_symbol_referencer_interface si (h);
+ si.set_position (int (si.position_f ()) + c0_position_i_);
}
else if (Local_key_item *i = dynamic_cast<Local_key_item*> (it_l))
{
Clef_item *c= new Clef_item;
c->set_elt_property ("break-aligned", SCM_BOOL_T);
announce_element (Score_element_info (c, clef_req_l_));
+
+ Staff_symbol_referencer_interface si(c);
+ si.set_interface ();
+
clef_p_ = c;
}
-
+ Staff_symbol_referencer_interface si(clef_p_);
clef_p_->symbol_ = clef_type_str_;
- clef_p_->set_position(clef_position_i_);
+ si.set_position (clef_position_i_);
if (octave_dir_)
{
clef_p_->set_elt_property ("octave-dir", gh_int2scm (octave_dir_));
#include "text-item.hh"
#include "paper-score.hh"
#include "dimension-cache.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
void
Clef_item::do_pre_processing()
{
- Staff_symbol_referencer::do_pre_processing();
SCM style_sym =get_elt_property ("style");
String style;
if (style_sym != SCM_UNDEFINED)
set_elt_property ("breakable", SCM_BOOL_T);
symbol_ = "treble";
- set_position(-2);
}
void
bool merge =
downpos == uppos
- && nu_l->balltype_i_ == nd_l->balltype_i_
+ && nu_l->balltype_i () == nd_l->balltype_i ()
&& nu_l->dots_i () == nd_l->dots_i ();
/*
void
Dimension_cache::invalidate ()
{
- off_valid_b_ =false;
- valid_b_ = false;
+ /* off_valid_b_ =false;
+ valid_b_ = false;*/
}
Real
Dimension_cache::get_offset () const
{
- if (!off_valid_b_)
+ Dimension_cache *me = (Dimension_cache*) this;
+ while (off_callbacks_.size ())
{
- Dimension_cache *d = (Dimension_cache*) this;
-
- d->basic_offset_ =0.0;
- d->off_valid_b_ = true;
- for (int i=0; i < off_callbacks_.size (); i++)
- d->basic_offset_ += (*off_callbacks_[i]) (d);
+ Offset_cache_callback c = me->off_callbacks_[0];
+ me->off_callbacks_.del (0);
+ me->basic_offset_ += (*c) (me);
}
-
return basic_offset_ + extra_offset_;
}
set_direction (get_default_dir());
}
-#if 0
-Offset
-Directional_spanner::center () const
-{
- Real w= extent (X_AXIS).length ();
- Offset o (w/2, 0);
- return o;
-}
-#endif
+
#include "dot-column.hh"
#include "rhythmic-head.hh"
#include "group-interface.hh"
+#include "staff-symbol-referencer.hh"
void
Dot_column::add_dots (Dots *d)
int
Dot_column::compare (Dots * const &d1, Dots * const &d2)
{
- return int (d1->position_f () - d2->position_f ());
+ Staff_symbol_referencer_interface s1(d1);
+ Staff_symbol_referencer_interface s2(d2);
+
+
+ return int (s1.position_f () - s2.position_f ());
}
int conflicts = 0;
for (int i=0; i < dots.size (); i++)
{
+ Real p = Staff_symbol_referencer_interface (dots[i]).position_f ();
for (int j=0; j < taken_posns.size (); j++)
- if (taken_posns[j] == (int) dots[i]->position_f ())
- conflicts++;
- taken_posns.push ((int)dots[i]->position_f ());
- s.unite (Slice ((int)dots[i]->position_f (),
- (int)dots[i]->position_f ()));
+ {
+ if (taken_posns[j] == (int) p)
+ conflicts++;
+ }
+ taken_posns.push ((int)p);
+ s.unite (Slice ((int)p,
+ (int)p));
}
if (!conflicts)
for (int i=0; i <dots.size (); pos += 2, i++)
{
- dots[i]->set_position(pos);
+ staff_symbol_referencer_interface (dots[i]).set_position(pos);
}
}
#include "molecule.hh"
#include "paper-def.hh"
#include "lookup.hh"
+#include "staff-symbol-referencer.hh"
Dots::Dots ()
{
if (!get_direction ())
set_direction (UP);
- int p = int (position_f ());
+ Staff_symbol_referencer_interface si (this);
+ int p = si.position_f ();
if (!(p % 2))
- set_position (p + get_direction ());
+ si.set_position (p + get_direction ());
}
}
Molecule*
#include "staff-symbol.hh"
#include "note-column.hh"
#include "text-item.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "engraver.hh"
#include "stem.hh"
#include "note-head.hh"
return;
warning (_("Unattached grace notes. Attaching to last musical column."));
- Axis_group_element * ae = dynamic_cast<Axis_group_element*> (elt);
/* if (ae)
ae->remove_element (align_l_);
else if (elt)*/
- align_l_->set_parent (0, X_AXIS);
+
+
+ align_l_->set_parent (0, X_AXIS);
last_musical_col_l_->add_element (align_l_);
}
name_ = s;
}
bool
-Group_interface::supports_interface_b ()
+Group_interface::has_interface_b ()
{
SCM el = elt_l_->get_elt_property (name_);
void
Group_interface::add_element (Score_element*p)
{
+ p->used_b_ = true;
+ elt_l_->used_b_ = true;
+
elt_l_->set_elt_property (name_,
gh_cons (p->self_scm_, elt_l_->get_elt_property (name_)));
}
void
Group_interface::set_interface ()
{
- if (!supports_interface_b ())
+ if (!has_interface_b ())
{
elt_l_->set_elt_property (name_, SCM_EOL);
}
{
/// modify fields of E for removal.
void do_remove (Score_element*e);
- void purge_extra ();
-
-
protected:
virtual Link_array<Score_element> get_extra_dependencies() const;
virtual Link_array<Score_element> elem_l_arr() const;
static Interval extent_callback (Dimension_cache const*);
-
-
- Interval extra_extent (Axis a) const;
public:
- // keep array in order.
- bool ordered_b_;
Axis axes_[2];
- Interval my_extent (Axis) const;
-
-
-
- bool contains_b (Score_element const *) const;
void add_element (Score_element*);
- /**
- add an element that only influences size, but does not have X/Y parent
- relationship with THIS.
- */
- void add_extra_element (Score_element*);
-
-
Axis_group_element ();
void set_axes (Axis,Axis);
*/
class Axis_group_item : public virtual Axis_group_element,
- public virtual Item {
-protected:
- virtual void do_breakable_col_processing();
+ public virtual Item
+{
public:
VIRTUAL_COPY_CONS(Score_element);
};
public virtual Spanner
{
- void do_break_processing_if_unbroken();
-protected:
- virtual void do_break_processing();
public:
VIRTUAL_COPY_CONS(Score_element);
};
#define BREATHING_SIGN_HH
#include "item.hh"
-#include "staff-symbol-referencer.hh"
#include "parray.hh"
#include "directional-element.hh"
class Breathing_sign : public Item,
- public Staff_symbol_referencer,
public Directional_element
{
public:
+++ /dev/null
-/*
- chord-tremolo-engraver.hh -- declare Chord_tremolo_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
- Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef Chord_tremolo_HH
-#define Chord_tremolo_HH
-
-#include "beam.hh"
-
-/** a beam connects multiple stems Beam adjusts the stems its owns to
- make sure that they reach the beam and that point in the correct
- direction */
-class Chord_tremolo : public Beam {
-public:
- VIRTUAL_COPY_CONS(Score_element);
-
-protected:
- virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
-};
-
-#error
-#endif // Chord_tremolo_HH
-
#include "direction.hh"
#include "pointer.hh"
-#include "staff-symbol-referencer.hh"
+
/**
Set a clef in a staff.
change: is this a change clef (smaller size)?
*/
-class Clef_item : public Item, public Staff_symbol_referencer {
+class Clef_item : public Item
+{
protected:
virtual void do_pre_processing();
virtual Molecule* do_brew_molecule_p() const;
#define DOTS_HH
#include "item.hh"
-#include "staff-symbol-referencer.hh"
+
#include "directional-element.hh"
/**
The dots to go with a notehead/rest. A separate class, since they
are a party in collision resolution.
*/
-class Dots : public Item, public Staff_symbol_referencer,
+class Dots :
+ public Item,
public Directional_element
{
protected:
+++ /dev/null
-/*
- graphical-element.hh -- declare Graphical_element
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef GRAPHICAL_ELEMENT_HH
-#define GRAPHICAL_ELEMENT_HH
-
-#include "offset.hh"
-#include "lily-proto.hh"
-#include "interval.hh"
-#include "virtual-methods.hh"
-#error
-
-
-/** The 2d geometric aspects of a score-element.
- */
-class Graphical_element
-{
-};
-
-#endif // GRAPHICAL_ELEMENT_HH
-
Group_interface (Score_element const*);
Group_interface (Score_element const*, String);
int count ();
- bool supports_interface_b ();
+ bool has_interface_b ();
void set_interface ();
void add_element (Score_element*);
};
#include "item.hh"
#include "array.hh"
-#include "staff-symbol-referencer.hh"
+
/// An item which places accidentals at the start of the line
-class Key_item :public Item, public Staff_symbol_referencer {
+class Key_item :public Item
+{
Array<int> pitch_arr_;
Array<int> acc_arr_;
Array<int> old_pitch_arr_;
#include "item.hh"
#include "array.hh"
#include "musical-pitch.hh"
-#include "staff-symbol-referencer.hh"
+
#include "note-head-side.hh"
struct Local_key_cautionary_tuple
*/
-class Local_key_item : public Note_head_side, public Staff_symbol_referencer {
+class Local_key_item : public Note_head_side
+{
Array<Local_key_cautionary_tuple> accidental_arr_;
Molecule accidental (int,bool,bool) const;
#define MULTI_MEASURE_REST_HH
#include "spanner.hh"
-#include "staff-symbol-referencer.hh"
-class Multi_measure_rest : public Spanner, public Staff_symbol_referencer
+
+class Multi_measure_rest : public Spanner
{
public:
Multi_measure_rest ();
virtual void do_add_processing ();
virtual void do_post_processing ();
- virtual void do_print () const;
virtual Array<Rod> get_rods () const;
};
*/
-class Note_head : public Rhythmic_head {
+class Note_head : public Rhythmic_head
+{
public:
-
Note_head ();
void flip_around_stem (Direction);
static int compare (Note_head * const &a, Note_head *const &b) ;
protected:
Molecule make_molecule () const;
-
static Interval dim_callback (Dimension_cache const*);
virtual void do_pre_processing();
class Rest : public Rhythmic_head
{
-public:
-
protected:
- virtual void do_add_processing ();
virtual void do_post_processing ();
virtual Molecule * do_brew_molecule_p () const;
};
#define RHYTHMIC_HEAD_HH
#include "item.hh"
-#include "staff-symbol-referencer.hh"
-class Rhythmic_head : public Item, public Staff_symbol_referencer
+
+class Rhythmic_head : public Item
{
- Dots * dots_l_;
- Stem * stem_l_;
public:
-
- int balltype_i_;
+ int balltype_i () const;
void add_dots (Dots *);
- Rhythmic_head ();
Stem * stem_l ()const;
Dots * dots_l ()const;
int dots_i ()const;
protected:
virtual void do_post_processing ();
-
- virtual void do_print () const;
};
#endif // RHYTHMIC_HEAD_HH
*/
SCM element_property_alist_;
- Link_array<Score_element> dependency_arr_;
/**
The lookup, determined by the font size. Cache this value.
*/
static SCM handle_broken_smobs (SCM, SCM criterion);
void recurse_into_smobs (SCM s, void (Score_element::*meth_ptr)());
-
+ virtual void do_break_processing ();
virtual Score_element *find_broken_piece (Line_of_score*) const;
protected:
be handled by GUILE gc. */
virtual ~Score_element ();
- Score_element* dependency (int) const;
- int dependency_size () const;
-
virtual void output_processing ();
static Interval molecule_extent (Dimension_cache const*);
/// do calculations after determining horizontal spacing
virtual void do_post_processing ();
- virtual void do_break_processing ();
-
virtual Link_array<Score_element> get_extra_dependencies () const;
static Interval dim_cache_callback (Dimension_cache const*);
--- /dev/null
+/*
+ side-position-interface.hh -- declare Side_position_interface
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef SIDE_POSITION_INTERFACE_HH
+#define SIDE_POSITION_INTERFACE_HH
+
+#include "spanner.hh"
+#include "item.hh"
+
+#include "directional-element.hh"
+
+struct Side_position_interface
+{
+ Score_element * elt_l_;
+public:
+ Side_position_interface (Score_element const*);
+ static Real side_position (Dimension_cache const *);
+ static Real self_alignment (Dimension_cache const *);
+ static Real aligned_side (Dimension_cache const *);
+ static Real quantised_position (Dimension_cache const*);
+ void set_axis (Axis);
+ void set_quantised (Axis);
+ Axis get_axis () const;
+
+ bool supported_b () const;
+ bool has_interface_b () const;
+ void add_support (Score_element*);
+
+ Direction get_direction () const;
+ void set_direction (Direction);
+};
+
+
+#endif /* SIDE_POSITION_INTERFACE_HH */
+
friend Axis_group_spanner; // UGH
virtual void do_space_processing ();
- // void handle_broken_dependents ();
virtual void do_break_processing ();
Real spanner_length () const;
virtual Line_of_score*line_l () const;
#define STAFF_BAR_HH
#include "bar.hh"
-#include "staff-symbol-referencer.hh"
+
/**
A bar that is on a staff.
Ugh. Entita non multiplicandum ...
*/
-class Staff_bar : public Bar, public Staff_symbol_referencer
+class Staff_bar : public Bar
{
public:
- virtual void do_pre_processing ();
VIRTUAL_COPY_CONS(Score_element);
virtual Real get_bar_size () const;
};
+++ /dev/null
-/*
- staff-side.hh -- declare Staff_side_{element,spanner,item}
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#ifndef STAFF_SIDE_HH
-#define STAFF_SIDE_HH
-
-
-#include "spanner.hh"
-#include "item.hh"
-#include "staff-symbol-referencer.hh"
-#include "directional-element.hh"
-
-struct Side_position_interface
-{
- Score_element * elt_l_;
-public:
- Side_position_interface (Score_element*);
- static Real side_position (Dimension_cache const *);
- static Real self_alignment (Dimension_cache const *);
- static Real aligned_side (Dimension_cache const *);
- static Real quantised_position (Dimension_cache const*);
- void set_axis (Axis);
- void set_quantised (Axis);
- Axis get_axis () const;
-
- bool supported_b () const;
- bool is_staff_side_b () const;
- void add_support (Score_element*);
-
- Direction get_direction () const;
- void set_direction (Direction);
-};
-
-
-
-#endif /* STAFF_SIDE_HH */
-
+++ /dev/null
-/*
- staff-sym-engraver.hh -- declare Staff_symbol_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef STAFF_SYMBOL_GRAV_HH
-#define STAFF_SYMBOL_GRAV_HH
-#include "engraver.hh"
-#include "moment.hh"
-
-/**
- Manage the staff symbol.
- */
-class Staff_symbol_engraver : public Engraver {
- Staff_symbol *span_p_;
-public:
- VIRTUAL_COPY_CONS(Translator);
- Staff_symbol_engraver();
-
-protected:
- virtual ~Staff_symbol_engraver();
-
- virtual void acknowledge_element (Score_element_info);
- virtual void do_removal_processing();
- virtual void do_creation_processing();
-
-};
-#endif // STAFF_SYMBOL_GRAV_HH
lines, leading).
*/
-class Staff_symbol_referencer : public virtual Score_element
+class Staff_symbol_referencer_interface
{
public:
- Staff_symbol_referencer ();
+ Score_element * elt_l_;
+ Staff_symbol_referencer_interface (Score_element const*);
+ void set_interface ();
+ bool has_interface_b ();
void set_position (Real);
static Real callback (Dimension_cache const*);
Leading are the lead strips between the sticks (lines) of
typeface. ie. leading is vertical space.
*/
+
Real staff_line_leading_f () const;
Staff_symbol * staff_symbol_l () const;
int lines_i () const;
Real position_f () const;
};
+
+Staff_symbol_referencer_interface staff_symbol_referencer_interface (Score_element const*);
+
#endif /* STAFF_SYMBOL_REFERENCER_HH */
/// this many lines.
int no_lines_i_;
Real staff_line_leading_f_;
+ Real staff_line_leading_f ();
+
Staff_symbol ();
int steps_i() const;
+++ /dev/null
-/*
- stem-staff-side.hh -- declare Stem_staff_side
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#ifndef Stem_STAFF_SIDE_HH
-#define Stem_STAFF_SIDE_HH
-
-#error
-
-#include "staff-side.hh"
-/**
- Position self, analogous to Staff_side_item, but use Stem direction
- for determining direction.
-
- Properties:
-
- padding :: Real
-
- Padding in staffline leading
-
- */
-class Stem_staff_side_item : public Staff_side_item
-{
- Stem *stem_l_;
-public:
- Direction relative_dir_;
-
- void set_stem (Stem*);
- Stem_staff_side_item ();
-protected:
- virtual Direction get_default_direction ()const;
- virtual void do_pre_processing ();
- virtual void do_post_processing ();
-};
-
-#endif /* Stem_STAFF_SIDE_HH */
-
#ifndef STEM_HH
#define STEM_HH
+
#include "item.hh"
#include "array.hh"
#include "moment.hh"
#include "molecule.hh"
-#include "staff-symbol-referencer.hh"
#include "directional-element.hh"
#include "stem-info.hh"
*/
-// todo: remove baseclass Staff_symbol_referencer, since stem
-// can be across a staff.
-class Stem : public Item, public Staff_symbol_referencer,
+class Stem : public Item,
public Directional_element
{
/**extent of the stem (positions).
fractional, since Beam has to adapt them.
*/
- Drul_array<Real> yextent_drul_;
+ Interval yextent_;
public:
-
-
/// log of the duration. Eg. 4 -> 16th note -> 2 flags
- int flag_i_;
+ int flag_i () const;
+
+ Drul_array<int> beams_i_drul_;
+
/**
don't print flag when in beam.
*/
Beam* beam_l () const;
Note_head * first_head () const;
-
- Drul_array<int> beams_i_drul_;
Stem ();
/// ensure that this Stem also encompasses the Notehead #n#
void add_head (Rhythmic_head*n);
- Stem_info get_info () const;
Real hpos_f () const;
+ Stem_info calc_stem_info () const;
+
Real chord_start_f () const;
int type_i () const;
-
- void do_print() const;
void set_stemend (Real);
Direction get_default_dir() const;
#include "local-key-item.hh"
#include "bar.hh"
#include "timing-translator.hh"
+#include "staff-symbol-referencer.hh"
Key_engraver::Key_engraver ()
{
if (!item_p_)
{
item_p_ = new Key_item;
+ Staff_symbol_referencer_interface st (item_p_);
+ st.set_interface ();
+
item_p_->set_elt_property ("break-aligned", SCM_BOOL_T); // ugh
item_p_->multi_octave_b_ = key_.multi_octave_b_;
#include "paper-def.hh"
#include "lookup.hh"
#include "musical-pitch.hh"
+#include "staff-symbol-referencer.hh"
const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
const int SHARP_TOP_PITCH=4; /* ais and bis typeset in lower octave */
Key_item::do_brew_molecule_p() const
{
Molecule*output = new Molecule;
- Real inter = staff_line_leading_f ()/2.0;
+
+ Staff_symbol_referencer_interface si (this);
+ Real inter = si.staff_line_leading_f ()/2.0;
int j;
if ((break_status_dir () == LEFT || break_status_dir () == CENTER)
broken_into_l_arr_.push (line_l);
}
-
- for (int i=0; i < broken_into_l_arr_.size (); i++)
- {
- broken_into_l_arr_[i]->handle_broken_dependencies ();
- }
-
- handle_broken_dependencies ();
}
void
#include "timing-translator.hh"
#include "engraver-group-engraver.hh"
#include "grace-align-item.hh"
+#include "staff-symbol-referencer.hh"
Local_key_engraver::Local_key_engraver()
{
if (!key_item_p_)
{
key_item_p_ = new Local_key_item;
+ Staff_symbol_referencer_interface si(key_item_p_);
+ si.set_interface ();
+
announce_element (Score_element_info (key_item_p_, 0));
}
*/
#include "local-key-item.hh"
#include "molecule.hh"
+#include "staff-symbol-referencer.hh"
#include "lookup.hh"
#include "paper-def.hh"
Local_key_item::do_brew_molecule_p() const
{
Molecule*output = new Molecule;
- Real note_distance = staff_line_leading_f ()/2;
+ Staff_symbol_referencer_interface si (this);
+ Real note_distance = si.staff_line_leading_f ()/2;
Molecule *octave_mol_p = 0;
int lastoct = -100;
#include "engraver-group-engraver.hh"
#include "timing-translator.hh"
#include "bar.hh"
+#include "staff-symbol-referencer.hh"
ADD_THIS_TRANSLATOR (Multi_measure_rest_engraver);
Timing_translator * time = dynamic_cast<Timing_translator*> (tr);
mmrest_p_ = new Multi_measure_rest;
+ Staff_symbol_referencer_interface si (mmrest_p_);
+ si.set_interface ();
+
+
if(dynamic_cast<Repetitions_req *> (multi_measure_req_l_))
mmrest_p_->set_elt_property ("alt-symbol",
ly_str02scm ("scripts-repeatsign"));
#include "misc.hh"
#include "group-interface.hh"
#include "stem.hh"
+#include "staff-symbol-referencer.hh"
Multi_measure_rest::Multi_measure_rest ()
{
set_elt_property ("columns", SCM_EOL);
}
-void
-Multi_measure_rest::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << "measures_i_ " << measures_i_;
-#endif
-}
+
}
mol_p->add_molecule (s);
- Real interline_f = staff_line_leading_f ();
+ Real interline_f
+ = staff_symbol_referencer_interface (this).staff_line_leading_f ();
if (measures_i_ == 1 && rest_symbol)
{
mol_p->translate_axis (interline_f, Y_AXIS);
#include "debug.hh"
#include "paper-def.hh"
#include "group-interface.hh"
+#include "staff-symbol-referencer.hh"
bool
Note_column::rest_b () const
for (; gh_pair_p (h); h = gh_cdr (h))
{
Score_element *se = unsmob_element (gh_car (h));
+ Staff_symbol_referencer_interface si (se);
- int j = int (dynamic_cast<Staff_symbol_referencer*> (se)->position_f ());
+ int j = int (si.position_f ());
iv.unite (Slice (j,j));
}
return iv;
void
Note_column::translate_rests (int dy_i)
{
- invalidate_cache (Y_AXIS);
+ // invalidate_cache (Y_AXIS);
SCM s = get_elt_property ("rests");
for (; gh_pair_p (s); s = gh_cdr (s))
{
- Score_element * se = unsmob_element ( gh_car (s));
- Staff_symbol_referencer *str = dynamic_cast<Staff_symbol_referencer*> (se);
- se->translate_axis (dy_i * str->staff_line_leading_f ()/2.0, Y_AXIS);
+ Score_element * se = unsmob_element (gh_car (s));
+ Staff_symbol_referencer_interface si (se);
+
+ se->translate_axis (dy_i * si.staff_line_leading_f ()/2.0, Y_AXIS);
}
}
SCM s = get_elt_property ("rests");
Score_element * se = unsmob_element (gh_car (s));
- Staff_symbol_referencer *str = dynamic_cast<Staff_symbol_referencer*> (se);
+ Staff_symbol_referencer_interface si (se);
- Real staff_space = str->staff_line_leading_f ();
+ Real staff_space = si.staff_line_leading_f ();
Real rest_dim = extent (Y_AXIS)[d]*2.0 /staff_space ;
Real minimum_dist
Real dist =
minimum_dist + -d * (beamy - rest_dim) >? 0;
- int stafflines = str->lines_i ();
+ int stafflines = si.lines_i ();
// move discretely by half spaces.
int discrete_dist = int (ceil (dist ));
*/
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "note-head-side.hh"
void
Note_head_side::add_support (Item*head_l)
#include "molecule.hh"
#include "musical-request.hh"
#include "dimension-cache.hh"
+#include "staff-symbol-referencer.hh"
void
Note_head::flip_around_stem (Direction d)
void
Note_head::do_pre_processing ()
{
- Rhythmic_head::do_pre_processing ();
-
// 8 ball looks the same as 4 ball:
String type;
SCM style = get_elt_property ("style");
}
- if (balltype_i_ > 2 || type == "harmonic" || type == "cross")
- balltype_i_ = 2;
+ if (balltype_i () > 2 || type == "harmonic" || type == "cross")
+ set_elt_property ("duration-log", gh_int2scm (2));
- if (dots_l ()) // move into Rhythmic_head?
- dots_l ()->set_position(int (position_f ()));
+ if (Dots *d = dots_l ())
+ { // move into Rhythmic_head?
-
+ Staff_symbol_referencer_interface si (d);
+ Staff_symbol_referencer_interface me (this);
+
+ si.set_position(int (me.position_f ()));
+ }
}
-
-
int
Note_head::compare (Note_head *const &a, Note_head * const &b)
{
- return sign(a->position_f () - b->position_f ());
-}
-
+ Staff_symbol_referencer_interface s1(a);
+ Staff_symbol_referencer_interface s2(b);
+ return sign(s1.position_f () - s2.position_f ());
+}
Molecule
Note_head::make_molecule () const
}
return lookup_l()->afm_find (String ("noteheads-")
- + to_str (balltype_i_) + type);
+ + to_str (balltype_i ()) + type);
}
Molecule*
Note_head::do_brew_molecule_p() const
{
- Real inter_f = staff_line_leading_f ()/2;
- int sz = lines_i ()-1;
-
- int streepjes_i = abs (position_f ()) < sz
+ Staff_symbol_referencer_interface si (this);
+
+ Real inter_f = si.staff_line_leading_f ()/2;
+ int sz = si.lines_i ()-1;
+ Real p = si.position_f ();
+ int streepjes_i = abs (p) < sz
? 0
- : (abs((int)position_f ()) - sz) /2;
+ : (abs((int)p) - sz) /2;
Molecule* out = new Molecule (make_molecule ());
if (streepjes_i)
{
- Direction dir = (Direction)sign (position_f ());
+ Direction dir = (Direction)sign (p);
Interval hd = out->dim_[X_AXIS];
Real hw = hd.length ()/4;
= lookup_l ()->ledger_line (Interval (hd[LEFT] - hw,
hd[RIGHT] + hw));
- int parity = abs(int (position_f ())) % 2;
+ int parity = abs(int (p)) % 2;
for (int i=0; i < streepjes_i; i++)
{
#include "musical-request.hh"
#include "dots.hh"
#include "dot-column.hh"
+#include "staff-symbol-referencer.hh"
Note_heads_engraver::Note_heads_engraver()
{
for (int i=0; i < note_req_l_arr_.size (); i++)
{
Note_head *note_p = new Note_head;
+
+ Staff_symbol_referencer_interface si (note_p);
+ si.set_interface ();
+
+
Note_req * note_req_l = note_req_l_arr_[i];
- note_p->balltype_i_ = note_req_l->duration_.durlog_i_ <? 2;
+ note_p->set_elt_property ("duration-log",
+ gh_int2scm (note_req_l->duration_.durlog_i_ <? 2));
if (note_req_l->duration_.dots_i_)
{
Dots * d = new Dots;
+
+ Staff_symbol_referencer_interface sd (d);
+ sd.set_interface ();
+
note_p->add_dots (d);
d->dots_i_ = note_req_l->duration_.dots_i_;
announce_element (Score_element_info (d,0));
dot_p_arr_.push (d);
}
- note_p->set_position(note_req_l->pitch_.steps ());
+ si.set_position(note_req_l->pitch_.steps ());
/*
TODO: transparent note heads.
Array<Column_x_positions> breaking = calc_breaking ();
line_l_->break_into_pieces (breaking);
+ for (SCM s = element_smob_list_; gh_pair_p (s); s = gh_cdr (s))
+ {
+ Score_element *sc = unsmob_element (gh_car (s));
+ sc->do_break_processing ();
+ }
+ for (SCM s = element_smob_list_; gh_pair_p (s); s = gh_cdr (s))
+ {
+ Score_element *sc = unsmob_element (gh_car (s));
+ sc->handle_broken_dependencies ();
+ }
+
outputter_l_ = new Paper_outputter ;
outputter_l_->output_header ();
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "staff-symbol-referencer.hh"
#include "pitch-squash-engraver.hh"
#include "note-head.hh"
{
if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
{
- nh->set_position(0);
+ Staff_symbol_referencer_interface (nh).set_position(0);
}
}
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-
+#include "staff-symbol-referencer.hh"
#include "rest-engraver.hh"
#include "musical-request.hh"
#include "dots.hh"
if (rest_req_l_ && !rest_p_)
{
rest_p_ = new Rest;
- rest_p_->balltype_i_ = rest_req_l_->duration_.durlog_i_;
-
+ Staff_symbol_referencer_interface si (rest_p_);
+ si.set_interface ();
+
+ rest_p_->set_elt_property ("duration-log",
+ gh_int2scm (rest_req_l_->duration_.durlog_i_));
+
if (rest_req_l_->duration_.dots_i_)
{
dot_p_ = new Dots;
+
+ Staff_symbol_referencer_interface si (dot_p_);
+ si.set_interface ();
+
rest_p_->add_dots (dot_p_);
dot_p_->dots_i_ = rest_req_l_->duration_.dots_i_;
announce_element (Score_element_info (dot_p_,0));
#include "dots.hh"
#include "axis-group-element.hh"
#include "paper-score.hh"
+#include "staff-symbol-referencer.hh"
-void
-Rest::do_add_processing ()
-{
- if (balltype_i_ == 0)
- set_position (position_f () + 2);
-
- Rhythmic_head::do_add_processing ();
-}
void
Rest::do_post_processing ()
{
- Rhythmic_head::do_post_processing ();
- if (dots_l ()
- && balltype_i_ > 4) // UGH.
+ if (balltype_i () == 0)
+ {
+ Staff_symbol_referencer_interface si (this);
+ si.set_position (si.position_f () + 2);
+ }
+
+ Dots * d = dots_l ();
+ if (d && balltype_i () > 4) // UGH.
{
/*
UGH.
*/
- if (balltype_i_ == 7)
- dots_l ()->set_position (4);
- else
- dots_l ()->set_position (3);
+ staff_symbol_referencer_interface (d)
+ .set_position ((balltype_i () == 7) ? 4 : 3);
}
}
{
bool ledger_b =false;
- if (balltype_i_ == 0 || balltype_i_ == 1)
- ledger_b = abs(position_f () - (2* balltype_i_ - 1)) > lines_i ();
-
+ if (balltype_i () == 0 || balltype_i () == 1)
+ {
+ Staff_symbol_referencer_interface si(this);
+ ledger_b = abs(si.position_f () - (2* balltype_i () - 1))
+ > si.lines_i ();
+ }
String style;
SCM style_sym =get_elt_property ("style");
- if (balltype_i_ >= 2 && style_sym != SCM_UNDEFINED)
+ if (balltype_i () >= 2 && style_sym != SCM_UNDEFINED)
{
style = ly_scm2string (style_sym);
}
- String idx = ("rests-") + to_str (balltype_i_) + (ledger_b ? "o" : "") + style;
+ String idx = ("rests-") + to_str (balltype_i ()) + (ledger_b ? "o" : "") + style;
return new Molecule(lookup_l ()->afm_find (idx));
}
#include "axis-group-element.hh"
#include "paper-score.hh"
#include "stem.hh"
+#include "staff-symbol-referencer.hh"
Dots*
return dynamic_cast<Dots*> (unsmob_element (s));
}
+int
+Rhythmic_head::balltype_i () const
+{
+ SCM s = get_elt_property ("duration-log");
+
+ return gh_number_p (s) ? gh_scm2int (s) : 0;
+}
+
Stem*
Rhythmic_head::stem_l () const
{
void
Rhythmic_head::do_post_processing ()
{
- if (dots_l ())
+ if (Dots *d = dots_l ())
{
- dots_l ()->set_position(int (position_f ()));
+ Staff_symbol_referencer_interface si (d);
+ Staff_symbol_referencer_interface me (d);
+ si.set_position(int (me.position_f ()));
}
}
dot_l->add_dependency (this);
}
-Rhythmic_head::Rhythmic_head ()
-{
- balltype_i_ =0;
-}
-
-
-
-void
-Rhythmic_head::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << "balltype = "<< balltype_i_ << "dots = " << dots_i ();
-#endif
-}
#include <string.h>
+#include "group-interface.hh"
#include "misc.hh"
#include "paper-score.hh"
#include "paper-def.hh"
#include "misc.hh"
#include "paper-outputter.hh"
#include "dimension-cache.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "item.hh"
Score_element::Score_element()
element_property_alist_ = SCM_EOL;
smobify_self ();
+
+
+ set_elt_property ("dependencies", SCM_EOL);
}
SCM ly_deep_copy (SCM);
should protect because smobify_self () might trigger GC.
*/
element_property_alist_ = scm_protect_object (ly_deep_copy (s.element_property_alist_));
- dependency_arr_ = s.dependency_arr_;
+
output_p_ =0;
status_i_ = s.status_i_;
lookup_l_ = s.lookup_l_;
delete dim_cache_[Y_AXIS];
}
-Score_element*
-Score_element::dependency (int i) const
-{
- return dependency_arr_ [i];
-}
-
-int
-Score_element::dependency_size () const
-{
- return dependency_arr_.size ();
-}
Real
Score_element::get_real (String s) const
if (flower_dstream && !flower_dstream->silent_b ("Score_element"))
ly_display_scm (element_property_alist_);
- DEBUG_OUT << "dependencies: " << dependency_size();
if (original_l_)
DEBUG_OUT << "Copy ";
do_print();
Paper_def*
Score_element::paper_l () const
{
- return pscore_l_->paper_l_;
+ return pscore_l_ ? pscore_l_->paper_l_ : 0;
}
Lookup const *
assert (status_i_!= busy);
status_i_= busy;
- for (int i=0; i < dependency_arr_.size(); i++)
- dependency_arr_[i]->calculate_dependencies (final, busy, funcptr);
+ Link_array<Score_element> dependency_arr =
+ Group_interface__extract_elements (this, (Score_element*)0, "dependencies");
+
+ for (int i=0; i < dependency_arr.size(); i++)
+ dependency_arr[i]->calculate_dependencies (final, busy, funcptr);
Link_array<Score_element> extra (get_extra_dependencies());
for (int i=0; i < extra.size(); i++)
void
Score_element::do_break_processing()
{
- handle_broken_dependencies();
}
void
{
if (e)
{
- dependency_arr_.push (e);
- e->used_b_ = true;
+ Group_interface gi (this, "dependencies");
+ gi.add_element (e);
}
else
programming_error ("Null dependency added");
gh_set_car_x (s, handle_broken_smobs (gh_car (s), criterion));
gh_set_cdr_x (s, handle_broken_smobs (gh_cdr (s), criterion));
- if (gh_car (s) == SCM_UNDEFINED && gh_list_p (gh_cdr(s)))
- return gh_cdr (s);
+ SCM c = gh_cdr(s);
+
+ // gh_list_p () is linear, this is O(1)
+ bool list = gh_pair_p (c) || c == SCM_EOL;
+
+ if (gh_car (s) == SCM_UNDEFINED && list)
+ return c;
}
return s;
}
-
+#if 0
void
Score_element::recurse_into_smobs (SCM s, void (Score_element::*meth_ptr)())
{
recurse_into_smobs (gh_cdr (s), meth_ptr);
}
}
+#endif
void
Score_element::handle_broken_dependencies()
line ? line->self_scm_ : SCM_UNDEFINED);
- recurse_into_smobs (element_property_alist_,
- &Score_element::handle_broken_dependencies);
-
if (!line)
return;
-
-
- Link_array<Score_element> new_deps;
-
- for (int i=0; i < dependency_size(); i++)
- {
- Score_element * elt = dependency (i);
- if (elt->line_l() != line)
- {
- Score_element * broken = elt->find_broken_piece (line);
- elt = broken ;
- }
- if (elt)
- new_deps.push (elt);
- }
- dependency_arr_ = new_deps;
}
void
Score_element::invalidate_cache (Axis a)
{
- dim_cache_[a]->invalidate ();
+ // dim_cache_[a]->invalidate ();
}
Score_element*
#include "engraver.hh"
#include "script-column.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "dimension-cache.hh"
/**
if (!thing)
return;
- if (Side_position_interface (thing).is_staff_side_b ())
+ if (Side_position_interface (thing).has_interface_b ())
{
if (!thing->breakable_b () && Side_position_interface (thing).get_axis () == Y_AXIS)
{
*/
#include "script-column.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "dimension-cache.hh"
#include "group-interface.hh"
#include "script-engraver.hh"
#include "script.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "musical-request.hh"
#include "stem.hh"
#include "staff-symbol.hh"
continue;
}
Script *p =new Script;
- Side_position_interface stafy (p);
+ Side_position_interface stafy (p);
+
list = gh_cdr (list);
p->set_elt_property ("molecule",
#include "debug.hh"
#include "script.hh"
#include "lookup.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "paper-def.hh"
#include "dimension-cache.hh"
--- /dev/null
+/*
+ staff-side.cc -- implement Staff_side_element
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "side-position-interface.hh"
+#include "staff-symbol.hh"
+#include "debug.hh"
+#include "warn.hh"
+#include "dimensions.hh"
+#include "dimension-cache.hh"
+#include "staff-symbol-referencer.hh"
+
+Side_position_interface::Side_position_interface (Score_element const *e)
+{
+ elt_l_ = (Score_element*)e;
+}
+
+
+void
+Side_position_interface::add_support (Score_element*e)
+{
+ SCM sup = elt_l_->get_elt_property ("side-support");
+ elt_l_->set_elt_property ("side-support",
+ gh_cons (e->self_scm_,sup));
+}
+
+
+
+Direction
+Side_position_interface::get_direction () const
+{
+ SCM d = elt_l_->get_elt_property ("direction");
+ if (isdir_b (d))
+ return to_dir (d) ? to_dir (d) : DOWN;
+
+ Direction relative_dir = UP;
+ SCM reldir = elt_l_->get_elt_property ("side-relative-direction"); // should use a lambda.
+ if (isdir_b (reldir))
+ {
+ relative_dir = to_dir (reldir);
+ }
+
+ SCM other_elt = elt_l_->get_elt_property ("direction-source");
+ Score_element * e = unsmob_element(other_elt);
+ if (e)
+ {
+ return (Direction)(relative_dir * Side_position_interface (e).get_direction ());
+ }
+
+ return DOWN;
+}
+
+/**
+ Callback that does the aligning.
+ */
+Real
+Side_position_interface::side_position (Dimension_cache const * c)
+{
+ Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
+
+ Interval dim;
+ Axis axis = c->axis ();
+ Score_element *common = me->parent_l (axis);
+ SCM support = me->get_elt_property ("side-support");
+ for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
+ {
+ Score_element * e = unsmob_element ( gh_car (s));
+ if (e)
+ common = common->common_refpoint (e, axis);
+ }
+
+ for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
+ {
+
+ Score_element * e = unsmob_element ( gh_car (s));
+ if (e)
+ {
+ Real coord = e->relative_coordinate (common, axis);
+
+ dim.unite (coord + e->extent (axis));
+ }
+ }
+
+ if (dim.empty_b ())
+ {
+ dim = Interval(0,0);
+ }
+
+ Real off = me->parent_l (axis)->relative_coordinate (common, axis);
+
+
+ Direction dir = Side_position_interface (me).get_direction ();
+
+ SCM pad = me->remove_elt_property ("padding");
+ if (pad != SCM_UNDEFINED)
+ {
+ off += gh_scm2double (pad) * dir;
+ }
+ Real total_off = dim[dir] + off;
+
+ if (fabs (total_off) > 100 CM)
+ programming_error ("Huh ? Improbable staff side dim.");
+
+ return total_off;
+}
+
+Real
+Side_position_interface::self_alignment (Dimension_cache const *c)
+{
+ String s ("self-alignment-");
+ Axis ax = c->axis ();
+ s += (ax == X_AXIS) ? "X" : "Y";
+ Score_element *elm = dynamic_cast<Score_element*> (c->element_l ());
+ SCM align (elm->get_elt_property (s));
+ if (isdir_b (align))
+ {
+ Direction d = to_dir (align);
+ Interval ext(elm->extent (ax));
+ if (d)
+ {
+ return - ext[d];
+ }
+ return - ext.center ();
+ }
+ else
+ return 0.0;
+}
+
+
+Real
+directed_round (Real f, Direction d)
+{
+ if (d < 0)
+ return floor (f);
+ else
+ return ceil (f);
+}
+
+Real
+Side_position_interface::quantised_position (Dimension_cache const *c)
+{
+ Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
+ Side_position_interface s(me);
+ Direction d = s.get_direction ();
+ Staff_symbol_referencer_interface si (me);
+
+ if (si.has_interface_b ())
+ {
+ Real p = si.position_f ();
+ Real rp = directed_round (p, d);
+
+ int ip = int (rp);
+ if ((ip % 2) == 0)
+ {
+ ip += d;
+ rp += d;
+ }
+
+ return (rp - p) * si.staff_line_leading_f () / 2.0;
+ }
+ return 0.0;
+}
+
+Real
+Side_position_interface::aligned_side (Dimension_cache const *c)
+{
+ Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
+ Side_position_interface s(me);
+ Direction d = s.get_direction ();
+ Axis ax = c->axis ();
+ Real o = side_position (c);
+
+ Interval iv = me->extent (ax);
+
+ if (!iv.empty_b ())
+ {
+ o += - iv[-d];
+
+ SCM pad = me->get_elt_property ("padding");
+ if (gh_number_p (pad))
+ o += d *gh_scm2double (pad) ;
+ }
+ return o;
+}
+
+
+
+
+void
+Side_position_interface::set_axis (Axis a)
+{
+ // prop transparent ?
+ if (elt_l_->get_elt_property ("side-support") == SCM_UNDEFINED)
+ elt_l_->set_elt_property ("side-support" ,SCM_EOL);
+
+ elt_l_->dim_cache_[a]->off_callbacks_.push (aligned_side);
+}
+
+
+void
+Side_position_interface::set_quantised (Axis a)
+{
+ Dimension_cache * c = elt_l_->dim_cache_[a];
+
+ c->off_callbacks_.push (quantised_position);
+}
+
+Axis
+Side_position_interface::get_axis () const
+{
+ Dimension_cache * c = elt_l_->dim_cache_[X_AXIS];
+ for (int i=0 ; i < c->off_callbacks_.size();i ++)
+ if (c->off_callbacks_[i] == side_position
+ ||c->off_callbacks_[i] == aligned_side)
+ return X_AXIS;
+
+
+ return Y_AXIS;
+}
+
+void
+Side_position_interface::set_direction (Direction d)
+{
+ elt_l_->set_elt_property ("direction", gh_int2scm (d));
+}
+
+bool
+Side_position_interface::has_interface_b () const
+{
+ return elt_l_->get_elt_property ("side-support") != SCM_UNDEFINED;
+}
+
+bool
+Side_position_interface::supported_b () const
+{
+ SCM s =elt_l_->get_elt_property ("side-support");
+ return s != SCM_UNDEFINED && s != SCM_EOL;
+}
span_p->set_bounds(RIGHT,bounds[RIGHT]);
pscore_l_->typeset_element (span_p);
- span_p->handle_broken_dependencies();
-
broken_into_l_arr_.push (span_p);
}
Spanner::do_break_processing()
{
break_into_pieces ();
- handle_broken_dependencies();
}
Spanner::Spanner ()
Spanner::find_broken_piece (Line_of_score*l) const
{
Spanner* me = (Spanner*) this;
- break_into_pieces ();
+ me->break_into_pieces ();
int idx = binsearch_link_array (broken_into_l_arr_, (Spanner*)l, Spanner::compare);
if(sc != NULL &&
sc->break_status_dir () == RIGHT)
{
- // We could possibly return the right edge of the whole Score_column here,
- // but we do a full search for the Break_align_item.
-
/*
- In fact that doesn't make a difference, since the Score_column
+
+ We used to do a full search for the Break_align_item.
+ But that doesn't make a difference, since the Score_column
is likely to contain only a Break_align_item.
*/
-#if 0
- for(SCM s = sc->get_elt_property ("elements"); gh_pair_p (s);
- s = gh_cdr (s))
- {
- Score_element *e = SMOB_TO_TYPE (Score_element, gh_car (s));
- if(dynamic_cast<Break_align_item*> (e))
- {
- return e->extent (X_AXIS) [RIGHT];
- }
- }
-#endif
return sc->extent (X_AXIS)[RIGHT];
}
+++ /dev/null
-#if 0
-// not finished yet.
-/*
- specialty-engraver.cc -- implement Specialty_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-
-#include "engraver.hh"
-
-class Specialty_engraver : public Engraver
-{
-
-public:
- VIRTUAL_COPY_CONS(Translator);
-protected:
- void acknowledge_element (Score_element_info);
-};
-
-
-void
-Specialty_engraver::acknowledge_element (Score_element_info )
-{
- /*
- We could do groovy stuff, by inserting our own custom (FUNC,FONT)
- pairs (Atoms in fact) into acknowledged elements.
-
- But not yet. This would be cleaner if we had SCM as properties.
- */
-}
-#endif
*/
#include "staff-bar.hh"
+#include "staff-symbol-referencer.hh"
Real
Staff_bar::get_bar_size () const
if (gh_number_p (size))
return gh_scm2double (size);
else
- return (lines_i () -1) * staff_line_leading_f ();
+ {
+ Staff_symbol_referencer_interface si (this);
+ return (si.lines_i () -1) * si.staff_line_leading_f ();
+ }
}
-void
-Staff_bar::do_pre_processing ()
-{
- Bar::do_pre_processing ();
- Staff_symbol_referencer::do_pre_processing ();
-}
#include "bar.hh"
#include "timing-translator.hh"
#include "text-item.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
ADD_THIS_TRANSLATOR (Staff_margin_engraver);
+++ /dev/null
-/*
- staff-side.cc -- implement Staff_side_element
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#include "staff-side.hh"
-#include "staff-symbol.hh"
-#include "debug.hh"
-#include "warn.hh"
-#include "dimensions.hh"
-#include "dimension-cache.hh"
-
-Side_position_interface::Side_position_interface (Score_element *e)
-{
- elt_l_ = e;
-}
-
-
-void
-Side_position_interface::add_support (Score_element*e)
-{
- SCM sup = elt_l_->get_elt_property ("side-support");
- elt_l_->set_elt_property ("side-support",
- gh_cons (e->self_scm_,sup));
-}
-
-
-
-Direction
-Side_position_interface::get_direction () const
-{
- SCM d = elt_l_->get_elt_property ("direction");
- if (isdir_b (d))
- return to_dir (d) ? to_dir (d) : DOWN;
-
- Direction relative_dir = UP;
- SCM reldir = elt_l_->get_elt_property ("side-relative-direction"); // should use a lambda.
- if (isdir_b (reldir))
- {
- relative_dir = to_dir (reldir);
- }
-
- SCM other_elt = elt_l_->get_elt_property ("direction-source");
- Score_element * e = unsmob_element(other_elt);
- if (e)
- {
- return relative_dir * Side_position_interface (e).get_direction ();
- }
-
- return DOWN;
-}
-
-/**
- Callback that does the aligning.
- */
-Real
-Side_position_interface::side_position (Dimension_cache const * c)
-{
- Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
-
- Interval dim;
- Axis axis = c->axis ();
- Score_element *common = me->parent_l (axis);
- SCM support = me->get_elt_property ("side-support");
- for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
- {
- Score_element * e = unsmob_element ( gh_car (s));
- if (e)
- common = common->common_refpoint (e, axis);
- }
-
- for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
- {
-
- Score_element * e = unsmob_element ( gh_car (s));
- if (e)
- {
- Real coord = e->relative_coordinate (common, axis);
-
- dim.unite (coord + e->extent (axis));
- }
- }
-
- if (dim.empty_b ())
- {
- dim = Interval(0,0);
- }
-
- Real off = me->parent_l (axis)->relative_coordinate (common, axis);
-
-
- Direction dir = Side_position_interface (me).get_direction ();
-
- SCM pad = me->remove_elt_property ("padding");
- if (pad != SCM_UNDEFINED)
- {
- off += gh_scm2double (pad) * dir;
- }
- Real total_off = dim[dir] + off;
-
- if (fabs (total_off) > 100 CM)
- programming_error ("Huh ? Improbable staff side dim.");
-
- return total_off;
-}
-
-Real
-Side_position_interface::self_alignment (Dimension_cache const *c)
-{
- String s ("self-alignment-");
- Axis ax = c->axis ();
- s += (ax == X_AXIS) ? "X" : "Y";
- Score_element *elm = dynamic_cast<Score_element*> (c->element_l ());
- SCM align (elm->get_elt_property (s));
- if (isdir_b (align))
- {
- Direction d = to_dir (align);
- Interval ext(elm->extent (ax));
- if (d)
- {
- return - ext[d];
- }
- return - ext.center ();
- }
- else
- return 0.0;
-}
-
-
-Real
-directed_round (Real f, Direction d )
-{
- if (d < 0)
- return floor (f);
- else
- return ceil (f);
-}
-
-Real
-Side_position_interface::quantised_position (Dimension_cache const *c)
-{
- Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
- Side_position_interface s(me);
- Direction d = s.get_direction ();
-
- Staff_symbol_referencer *ref = dynamic_cast<Staff_symbol_referencer*> (me);
- if (ref)
- {
- Real p = ref->position_f ();
- Real rp = directed_round (d, p);
-
- int ip = int (p);
- if (!(ip % 2))
- {
- ip += d;
- rp += d;
- }
-
- return (rp - p) * ref->staff_line_leading_f ();
- }
- return 0.0;
-}
-
-Real
-Side_position_interface::aligned_side (Dimension_cache const *c)
-{
- Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
- Side_position_interface s(me);
- Direction d = s.get_direction ();
- Axis ax = c->axis ();
- Real o = side_position (c);
-
- Interval iv = me->extent (ax);
-
- if (!iv.empty_b ())
- {
- o += - iv[-d];
-
- SCM pad = me->get_elt_property ("padding");
- if (gh_number_p (pad))
- o += d *gh_scm2double (pad) ;
- }
- return o;
-}
-
-
-
-
-void
-Side_position_interface::set_axis (Axis a)
-{
- // prop transparent ?
- if (elt_l_->get_elt_property ("side-support") == SCM_UNDEFINED)
- elt_l_->set_elt_property ("side-support" ,SCM_EOL);
-
- elt_l_->dim_cache_[a]->off_callbacks_.push (aligned_side);
-}
-
-
-void
-Side_position_interface::set_quantised (Axis a)
-{
- Dimension_cache * c = elt_l_->dim_cache_[a];
- for (int i=0; i < c->off_callbacks_.size (); i++)
- if (c->off_callbacks_[i] == aligned_side)
- c->off_callbacks_[i] = side_position ;
- c->off_callbacks_.push (quantised_position);
-}
-
-Axis
-Side_position_interface::get_axis () const
-{
- Dimension_cache * c = elt_l_->dim_cache_[X_AXIS];
- for (int i=0 ; i < c->off_callbacks_.size();i ++)
- if (c->off_callbacks_[i] == side_position
- ||c->off_callbacks_[i] == aligned_side)
- return X_AXIS;
-
-
- return Y_AXIS;
-}
-
-void
-Side_position_interface::set_direction (Direction d)
-{
- elt_l_->set_elt_property ("direction", gh_int2scm (d));
-}
-
-bool
-Side_position_interface::is_staff_side_b () const
-{
- return elt_l_->get_elt_property ("side-support") != SCM_UNDEFINED;
-}
-
-bool
-Side_position_interface::supported_b () const
-{
- SCM s =elt_l_->get_elt_property ("side-support");
- return s != SCM_UNDEFINED && s != SCM_EOL;
-}
+++ /dev/null
-/*
- staff-sym-reg.cc -- implement Staff_symbol_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "staff-sym-engraver.hh"
-#include "staff-symbol.hh"
-#include "score.hh"
-#include "paper-column.hh"
-#include "staff-symbol-referencer.hh"
-#include "paper-def.hh"
-#include "staff-side.hh"
-
-Staff_symbol_engraver::~Staff_symbol_engraver()
-{
- assert (!span_p_);
-}
-
-Staff_symbol_engraver::Staff_symbol_engraver()
-{
- span_p_ = 0;
-}
-
-void
-Staff_symbol_engraver::do_creation_processing()
-{
- span_p_ = new Staff_symbol;
- span_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
- announce_element (Score_element_info (span_p_, 0));
-}
-
-void
-Staff_symbol_engraver::do_removal_processing()
-{
- SCM l (get_property ("numberOfStaffLines", 0));
- if (gh_number_p(l))
- {
- span_p_->no_lines_i_ = gh_scm2int (l);
- }
-
- SCM sz (get_property ("staffLineLeading", 0));
- if (gh_number_p(sz))
- {
- span_p_->staff_line_leading_f_ = gh_scm2double (sz);
- }
- else
- {
- span_p_->staff_line_leading_f_ = paper_l ()->get_var ("interline");
- }
- span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
- typeset_element (span_p_);
- span_p_ =0;
-}
-
-void
-Staff_symbol_engraver::acknowledge_element (Score_element_info s)
-{
- s.elem_l_->set_elt_property ("staff-symbol", span_p_->self_scm_);
- s.elem_l_->add_dependency (span_p_); // UGH. UGH. UGH
-
- SCM ss =s.elem_l_->remove_elt_property ("staff-support");
- if (gh_boolean_p (ss) && gh_scm2bool (ss))
- {
- Side_position_interface si (s.elem_l_);
- if (si.is_staff_side_b ())
- si.add_support (span_p_);
- }
-}
-
-
-ADD_THIS_TRANSLATOR(Staff_symbol_engraver);
-
+++ /dev/null
-/*
- staffsym.cc -- implement Staff_symbol
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-#include "staff-symbol.hh"
-#include "lookup.hh"
-#include "dimensions.hh"
-#include "paper-def.hh"
-#include "molecule.hh"
-#include "debug.hh"
-#include "item.hh"
-
-
-Staff_symbol::Staff_symbol ()
-{
- no_lines_i_ = 5;
- staff_line_leading_f_ = 5.0 PT;
-}
-
-void
-Staff_symbol::do_print() const
-{
-#ifndef NPRINT
- Spanner::do_print();
- DEBUG_OUT << "lines: " << no_lines_i_;
-#endif
-}
-
-
-Molecule*
-Staff_symbol::do_brew_molecule_p() const
-{
- Score_element * common
- = spanned_drul_[LEFT]->common_refpoint (spanned_drul_[RIGHT], X_AXIS);
-
-#if 0
- Interval r = spanned_drul_[RIGHT]->extent (X_AXIS);
- Interval l = spanned_drul_[LEFT]->extent (X_AXIS);
-
- Real left_shift =l.empty_b () ? 0.0: l[LEFT];
- Real right_shift =r.empty_b () ? 0.0: r[RIGHT];
-#endif
- Real width =
- // right_shift - left_shift
- + spanned_drul_[RIGHT]->relative_coordinate (common , X_AXIS)
- - spanned_drul_[LEFT]->relative_coordinate (common, X_AXIS)
- ;
-
- Real t = paper_l ()->get_var ("stafflinethickness");
- Molecule rule = lookup_l ()->filledbox (Box (Interval (0,width),
- Interval (-t/2, t/2)));
-
- Real height = (no_lines_i_-1) * staff_line_leading_f_ /2;
- Molecule * m = new Molecule;
- for (int i=0; i < no_lines_i_; i++)
- {
- Molecule a (rule);
- a.translate_axis (height - i * staff_line_leading_f_, Y_AXIS);
- m->add_molecule (a);
- }
-
- // m->translate_axis (left_shift, X_AXIS);
- return m;
-}
-
-
-int
-Staff_symbol::steps_i() const
-{
- return no_lines_i_*2;
-}
--- /dev/null
+/*
+ staff-sym-reg.cc -- implement Staff_symbol_engraver
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "staff-symbol.hh"
+#include "score.hh"
+#include "paper-column.hh"
+#include "paper-def.hh"
+#include "side-position-interface.hh"
+#include "engraver.hh"
+#include "moment.hh"
+
+/**
+ Manage the staff symbol.
+ */
+class Staff_symbol_engraver : public Engraver {
+ Staff_symbol *span_p_;
+public:
+ VIRTUAL_COPY_CONS(Translator);
+ Staff_symbol_engraver();
+
+protected:
+ virtual ~Staff_symbol_engraver();
+
+ virtual void acknowledge_element (Score_element_info);
+ virtual void do_removal_processing();
+ virtual void do_creation_processing();
+
+};
+
+
+Staff_symbol_engraver::~Staff_symbol_engraver()
+{
+ assert (!span_p_);
+}
+
+Staff_symbol_engraver::Staff_symbol_engraver()
+{
+ span_p_ = 0;
+}
+
+void
+Staff_symbol_engraver::do_creation_processing()
+{
+ span_p_ = new Staff_symbol;
+ span_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
+ announce_element (Score_element_info (span_p_, 0));
+}
+
+void
+Staff_symbol_engraver::do_removal_processing()
+{
+ SCM l (get_property ("numberOfStaffLines", 0));
+ if (gh_number_p(l))
+ {
+ span_p_->no_lines_i_ = gh_scm2int (l);
+ }
+
+ SCM sz (get_property ("staffLineLeading", 0));
+ if (gh_number_p(sz))
+ {
+ span_p_->staff_line_leading_f_ = gh_scm2double (sz);
+ }
+ else
+ {
+ span_p_->staff_line_leading_f_ = paper_l ()->get_var ("interline");
+ }
+ span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
+ typeset_element (span_p_);
+ span_p_ =0;
+}
+
+void
+Staff_symbol_engraver::acknowledge_element (Score_element_info s)
+{
+ s.elem_l_->set_elt_property ("staff-symbol", span_p_->self_scm_);
+ s.elem_l_->add_dependency (span_p_); // UGH. UGH. UGH
+
+ SCM ss =s.elem_l_->remove_elt_property ("staff-support");
+ if (gh_boolean_p (ss) && gh_scm2bool (ss))
+ {
+ Side_position_interface si (s.elem_l_);
+ if (si.has_interface_b ())
+ si.add_support (span_p_);
+ }
+}
+
+
+ADD_THIS_TRANSLATOR(Staff_symbol_engraver);
+
#include "paper-def.hh"
#include "dimension-cache.hh"
-Staff_symbol_referencer::Staff_symbol_referencer ()
+Staff_symbol_referencer_interface::Staff_symbol_referencer_interface (Score_element const *sc)
{
- set_elt_property ("staff-position", gh_double2scm (0.0));
- dim_cache_[Y_AXIS]->off_callbacks_.push (callback);
+ elt_l_ = (Score_element*)sc;
+}
+
+void
+Staff_symbol_referencer_interface::set_interface ()
+{
+ elt_l_->set_elt_property ("staff-position", gh_double2scm (0.0));
+ elt_l_->dim_cache_[Y_AXIS]->off_callbacks_.push (callback);
+}
+
+
+bool
+Staff_symbol_referencer_interface::has_interface_b ()
+{
+ return unsmob_element (elt_l_->get_elt_property ("staff-symbol"))
+ || gh_number_p (elt_l_->get_elt_property ("staff-position"));
}
int
-Staff_symbol_referencer::lines_i () const
+Staff_symbol_referencer_interface::lines_i () const
{
Staff_symbol *st = staff_symbol_l ();
return st ? st->no_lines_i_ : 5;
}
Staff_symbol*
-Staff_symbol_referencer::staff_symbol_l () const
+Staff_symbol_referencer_interface::staff_symbol_l () const
{
- SCM st = get_elt_property ("staff-symbol");
+ SCM st = elt_l_->get_elt_property ("staff-symbol");
return dynamic_cast<Staff_symbol* > (unsmob_element(st));
}
Real
-Staff_symbol_referencer::staff_line_leading_f () const
+Staff_symbol_referencer_interface::staff_line_leading_f () const
{
Staff_symbol * st = staff_symbol_l ();
if (st)
return st->staff_line_leading_f_;
- else if (pscore_l_ && paper_l ())
- paper_l ()->get_var ("interline");
+ else if (elt_l_->pscore_l_ && elt_l_->paper_l ())
+ elt_l_->paper_l ()->get_var ("interline");
return 0.0;
}
Real
-Staff_symbol_referencer::position_f () const
+Staff_symbol_referencer_interface::position_f () const
{
Real p =0.0;
- SCM pos = get_elt_property ("staff-position");
+ SCM pos = elt_l_->get_elt_property ("staff-position");
if (gh_number_p (pos))
p = gh_scm2double (pos);
Staff_symbol * st = staff_symbol_l ();
if (st)
{
- Score_element * c = common_refpoint (st, Y_AXIS);
- Real y = relative_coordinate (c, Y_AXIS)
+ Score_element * c = elt_l_->common_refpoint (st, Y_AXIS);
+ Real y = elt_l_->relative_coordinate (c, Y_AXIS)
- st->relative_coordinate (c, Y_AXIS);
- p += 2.0 * y / staff_line_leading_f ();
+ p += 2.0 * y / st->staff_line_leading_f ();
}
return p;
}
should use offset callback!
*/
Real
-Staff_symbol_referencer::callback (Dimension_cache const * c)
+Staff_symbol_referencer_interface::callback (Dimension_cache const * c)
{
Score_element * sc = dynamic_cast<Score_element*> (c->element_l ());
- Staff_symbol_referencer * ref = dynamic_cast<Staff_symbol_referencer*> (sc);
+
+
SCM pos = sc->get_elt_property ("staff-position");
Real off =0.0;
if (gh_number_p (pos))
{
- off = gh_scm2double (pos) * ref->staff_line_leading_f () /2.0;
+ Real space = staff_symbol_referencer_interface (sc).staff_line_leading_f ();
+ off = gh_scm2double (pos) * space/2.0;
}
sc->set_elt_property ("staff-position", gh_double2scm (0.0));
void
-Staff_symbol_referencer::set_position (Real p)
+Staff_symbol_referencer_interface::set_position (Real p)
{
- Real halfspace = staff_line_leading_f ()* 0.5;
-
- translate_axis (- halfspace * position_f (), Y_AXIS);
- Staff_symbol *st = staff_symbol_l ();
- if (st)
- translate_axis (halfspace * p, Y_AXIS);
+ Staff_symbol * st = staff_symbol_l ();
+ if (st && elt_l_->common_refpoint(st, Y_AXIS))
+ {
+ Real oldpos = position_f ();
+ elt_l_->set_elt_property ("staff-position", gh_double2scm (p - oldpos));
+ }
else
{
- // SCM pos = get_elt_property ("staff-position");
- set_elt_property ("staff-position",
- gh_double2scm (p));
- // gh_double2scm (p + gh_scm2double (pos)));
+ elt_l_->set_elt_property ("staff-position",
+ gh_double2scm (p));
+
}
+
+ Array<Offset_cache_callback> &callbacks (elt_l_->dim_cache_[Y_AXIS]->off_callbacks_);
+ for (int i=0; i < callbacks.size ();i++)
+ if (callbacks[i] == callback)
+ return ;
+
+ callbacks.push (callback);
}
+Staff_symbol_referencer_interface
+staff_symbol_referencer_interface (Score_element const*e)
+{
+ return e; // gee, I'm so smart!
+}
--- /dev/null
+/*
+ staffsym.cc -- implement Staff_symbol
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+#include "staff-symbol.hh"
+#include "lookup.hh"
+#include "dimensions.hh"
+#include "paper-def.hh"
+#include "molecule.hh"
+#include "debug.hh"
+#include "item.hh"
+
+
+Staff_symbol::Staff_symbol ()
+{
+ no_lines_i_ = 5;
+ staff_line_leading_f_ = 5.0 PT;
+}
+
+void
+Staff_symbol::do_print() const
+{
+#ifndef NPRINT
+ Spanner::do_print();
+ DEBUG_OUT << "lines: " << no_lines_i_;
+#endif
+}
+
+
+Molecule*
+Staff_symbol::do_brew_molecule_p() const
+{
+ Score_element * common
+ = spanned_drul_[LEFT]->common_refpoint (spanned_drul_[RIGHT], X_AXIS);
+
+#if 0
+ Interval r = spanned_drul_[RIGHT]->extent (X_AXIS);
+ Interval l = spanned_drul_[LEFT]->extent (X_AXIS);
+
+ Real left_shift =l.empty_b () ? 0.0: l[LEFT];
+ Real right_shift =r.empty_b () ? 0.0: r[RIGHT];
+#endif
+ Real width =
+ // right_shift - left_shift
+ + spanned_drul_[RIGHT]->relative_coordinate (common , X_AXIS)
+ - spanned_drul_[LEFT]->relative_coordinate (common, X_AXIS)
+ ;
+
+ Real t = paper_l ()->get_var ("stafflinethickness");
+ Molecule rule = lookup_l ()->filledbox (Box (Interval (0,width),
+ Interval (-t/2, t/2)));
+
+ Real height = (no_lines_i_-1) * staff_line_leading_f_ /2;
+ Molecule * m = new Molecule;
+ for (int i=0; i < no_lines_i_; i++)
+ {
+ Molecule a (rule);
+ a.translate_axis (height - i * staff_line_leading_f_, Y_AXIS);
+ m->add_molecule (a);
+ }
+
+ // m->translate_axis (left_shift, X_AXIS);
+ return m;
+}
+
+
+int
+Staff_symbol::steps_i() const
+{
+ return no_lines_i_*2;
+}
+Real
+Staff_symbol::staff_line_leading_f ()
+{
+ return staff_line_leading_f_;
+}
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "staff-symbol-referencer.hh"
#include "stem-engraver.hh"
#include "note-head.hh"
#include "stem.hh"
if (!stem_p_)
{
stem_p_ = new Stem;
- stem_p_->flag_i_ = duration_log;
+ Staff_symbol_referencer_interface st(stem_p_);
+ st.set_interface ();
+
+ stem_p_->set_elt_property ("duration-log", gh_int2scm (duration_log));
if (abbrev_req_l_)
{
announce_element (Score_element_info (stem_p_, r));
}
- if (stem_p_->flag_i_ != duration_log)
+ if (stem_p_->flag_i () != duration_log)
{
- r->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 << stem_p_->flag_i_));
+ r->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 << stem_p_->flag_i ()));
}
stem_p_->add_head (h);
// UGH. Should mark non-forced instead.
SCM dir = stem_p_->get_elt_property ("direction");
- if (gh_number_p (dir) && gh_int2scm (dir))
+ if (gh_number_p (dir) && to_dir(dir))
{
stem_p_->set_elt_property ("dir-forced", SCM_BOOL_T);
}
#include "stem.hh"
#include "offset.hh"
#include "dimension-cache.hh"
+#include "staff-symbol-referencer.hh"
+
Stem_tremolo::Stem_tremolo ()
{
Stem_tremolo::dim_callback (Dimension_cache const *c)
{
Stem_tremolo * s = dynamic_cast<Stem_tremolo*> (c->element_l ());
- Real space = s->stem_l ()->staff_line_leading_f ();
+ Real space = Staff_symbol_referencer_interface (s->stem_l ())
+ .staff_line_leading_f ();
return Interval (-space, space);
}
Real interbeam_f = paper_l ()->interbeam_f (mult);
Real w = gh_scm2double (get_elt_property ("beam-width"));
- Real space = st->staff_line_leading_f ();
+ Real space = Staff_symbol_referencer_interface (st).staff_line_leading_f ();
Real internote_f = space / 2;
Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));
#include "rest.hh"
#include "group-interface.hh"
#include "cross-staff.hh"
+#include "staff-symbol-referencer.hh"
Stem::Stem ()
{
beams_i_drul_[LEFT] = beams_i_drul_[RIGHT] = -1;
- yextent_drul_[DOWN] = yextent_drul_[UP] = 0;
- flag_i_ = 2;
}
Interval_t<int>
Interval_t<int> r;
for (int i =0; i < head_l_arr.size (); i++)
{
- int p = (int)head_l_arr[i]->position_f ();
+ Staff_symbol_referencer_interface si (head_l_arr[i]);
+ int p = (int)si.position_f ();
r[BIGGER] = r[BIGGER] >? p;
r[SMALLER] = r[SMALLER] <? p;
}
return r;
}
-void
-Stem::do_print () const
-{
-#ifndef NPRINT
- DEBUG_OUT << "flag "<< flag_i_;
-#endif
-}
Real
Stem::stem_length_f () const
{
- return yextent_drul_[UP]-yextent_drul_[DOWN] ;
+ return yextent_.length();
}
Real
Stem::stem_begin_f () const
{
- return yextent_drul_[Direction(-get_direction ())];
+ return yextent_[Direction(-get_direction ())];
}
Real
Stem::chord_start_f () const
{
- return head_positions()[get_direction ()] * staff_line_leading_f ()/2.0;
+ return head_positions()[get_direction ()]
+ * Staff_symbol_referencer_interface (this).staff_line_leading_f ()/2.0;
}
Real
Stem::stem_end_f () const
{
- return yextent_drul_[get_direction ()];
+ return yextent_[get_direction ()];
}
void
warning (_ ("Weird stem size; check for narrow beams"));
- yextent_drul_[get_direction ()] = se;
- yextent_drul_[Direction(-get_direction ())] = head_positions()[-get_direction ()];
+ yextent_[get_direction ()] = se;
+ yextent_[Direction(-get_direction ())] = head_positions()[-get_direction ()];
}
int
Stem::type_i () const
{
-
- return first_head ()->balltype_i_;
+ return first_head ()->balltype_i ();
}
Note_head*
bool
Stem::invisible_b () const
{
- return !(first_head () && first_head()->balltype_i_ >= 1);
+ return !(first_head () && first_head()->balltype_i () >= 1);
}
int
return Direction (int(paper_l ()->get_var ("stem_default_neutral_direction")));
}
-
-
void
Stem::set_default_stemlen ()
{
if (((int)chord_start_f ())
&& (get_direction () != get_default_dir ()))
length_f -= shorten_f;
-
- if (flag_i_ >= 5)
+
+ if (flag_i () >= 5)
length_f += 2.0;
- if (flag_i_ >= 6)
+ if (flag_i () >= 6)
length_f += 1.0;
set_stemend ((get_direction () > 0) ? head_positions()[BIGGER] + length_f:
set_stemend (0);
}
+int
+Stem::flag_i () const
+{
+ SCM s = get_elt_property ("duration-log");
+ return (gh_number_p (s)) ? gh_scm2int (s) : 2;
+}
+
//xxx
void
Stem::set_default_extents ()
head_l_arr.top ()->set_elt_property ("extremal", SCM_BOOL_T);
int parity=1;
- int lastpos = int (beginhead->position_f ());
+ int lastpos = int (Staff_symbol_referencer_interface (beginhead).position_f ());
for (int i=1; i < head_l_arr.size (); i ++)
{
- int dy =abs (lastpos- (int)head_l_arr[i]->position_f ());
+ Real p = Staff_symbol_referencer_interface (head_l_arr[i]).position_f ();
+ int dy =abs (lastpos- (int)p);
if (dy <= 1)
{
}
else
parity = 1;
- lastpos = int (head_l_arr[i]->position_f ());
+ lastpos = int (p);
}
}
void
Stem::do_pre_processing ()
{
- if (yextent_drul_[DOWN]== yextent_drul_[UP])
+ if (yextent_.empty_b ())
set_default_extents ();
set_noteheads ();
char c = (get_direction () == UP) ? 'u' : 'd';
Molecule m = lookup_l ()->afm_find (String ("flags-") + to_str (c) +
- to_str (flag_i_));
+ to_str (flag_i ()));
if (!style.empty_b ())
m.add_molecule(lookup_l ()->afm_find (String ("flags-") + to_str (c) + style));
return m;
Stem * s = dynamic_cast<Stem*> (c->element_l ());
Interval r (0, 0);
- if (s->get_elt_property ("beam") != SCM_UNDEFINED || abs (s->flag_i_) <= 2)
+ if (s->get_elt_property ("beam") != SCM_UNDEFINED || abs (s->flag_i ()) <= 2)
; // TODO!
else
{
Stem::do_brew_molecule_p () const
{
Molecule *mol_p =new Molecule;
- Drul_array<Real> stem_y = yextent_drul_;
- Real dy = staff_line_leading_f ()/2.0;
+ Interval stem_y = yextent_;
+ Real dy = staff_symbol_referencer_interface (this)
+ .staff_line_leading_f ()/2.0;
Real head_wid = 0;
if (first_head ())
}
if (get_elt_property ("beam") == SCM_UNDEFINED
- && abs (flag_i_) > 2)
+ && abs (flag_i ()) > 2)
{
Molecule fl = flag ();
fl.translate_axis(stem_y[get_direction ()]*dy, Y_AXIS);
Stem_info
-Stem::get_info () const
+Stem::calc_stem_info () const
{
assert (beam_l ());
SCM bd = get_elt_property ("beam-dir");
- Real internote_f = staff_line_leading_f ()/2;
+ Real internote_f
+ = staff_symbol_referencer_interface (this).staff_line_leading_f ()/2;
Direction beam_dir;
Stem_info info;
- if (gh_number_p (bd))
+ if (isdir_b (bd))
{
- beam_dir = (Direction)gh_scm2int (bd);
+ beam_dir = to_dir (bd);
}
else
{
#include "dimension-cache.hh"
#include "engraver.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
#include "text-item.hh"
#include "musical-request.hh"
#include "note-head.hh"
#include "note-head.hh"
#include "paper-column.hh"
#include "debug.hh"
-#include "group-interface.hh"
-
-
-
+#include "staff-symbol-referencer.hh"
void
Tie::set_head (Direction d, Note_head * head_l)
assert (!head (d));
if (d == LEFT)
gh_set_car_x (get_elt_property ("heads"), head_l->self_scm_ );
- else if (d == LEFT)
+ else if (d == RIGHT)
gh_set_cdr_x (get_elt_property ("heads"), head_l->self_scm_ );
set_bounds (d, head_l);
Direction
Tie::get_default_dir () const
{
- int m = int (head (LEFT)->position_f ()
- + head (RIGHT)->position_f ()) /2;
+ Real p1 = Staff_symbol_referencer_interface (head (LEFT)).position_f () ;
+ Real p2 = Staff_symbol_referencer_interface (head (RIGHT)).position_f () ;
+
+ int m = int (p1 + p2);
/*
If dir is not determined: inverse of stem: down
void
Tie::do_post_processing()
{
- assert (head (LEFT) || head (RIGHT));
+ if (!head (LEFT) && !head (RIGHT))
+ {
+ programming_error ("Tie without heads.");
+ set_elt_property ("transparent", SCM_BOOL_T);
+ set_empty (X_AXIS);
+ set_empty (Y_AXIS);
+ return;
+ }
Real interline_f = paper_l ()->get_var ("interline");
Real internote_f = interline_f / 2;
for smal slurs
*/
- Real ypos = head (LEFT) ? head (LEFT)->position_f ()
- : head (RIGHT)->position_f ();
+
+ Real ypos = head (LEFT)
+ ? Staff_symbol_referencer_interface (head (LEFT)).position_f ()
+ : Staff_symbol_referencer_interface (head (RIGHT)).position_f () ;
Real y_f = internote_f * ypos;
int ypos_i = int (ypos);
bool
Vertical_align_engraver::qualifies_b (Score_element_info i) const
{
-#if 0
- Translator * t = i.origin_trans_l_arr_[0];
-#endif
int sz = i.origin_trans_l_arr_.size() ;
-#if 0
- return (sz == 1 && dynamic_cast<Translator_group*> (t))
- || (sz == 2 && dynamic_cast<Axis_group_engraver*> (t));
-#endif
Axis_group_element * elt = dynamic_cast<Axis_group_element *> (i.elem_l_);
Begin3
Title: LilyPond
-Version: 1.3.10
-Entered-date: 08DEC99
+Version: 1.3.11
+Entered-date: 14DEC99
Description:
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.10.tar.gz
+ 1000k lilypond-1.3.11.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.10.tar.gz
+ 1000k lilypond-1.3.11.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.10
+Version: 1.3.11
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.10.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.11.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# get Packager from (undocumented?) ~/.rpmmacros!