(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "dimension-cache.hh"
-#include "p-score.hh"
+#include "paper-score.hh"
#include "debug.hh"
#include "item.hh"
-#include "p-col.hh"
+#include "paper-column.hh"
#include "spanner.hh"
#include "lily-guile.hh"
Real
Item::hpos_f() const
{
- return absolute_coordinate (X_AXIS);
+ return relative_coordinate (0, X_AXIS);
}
Line_of_score *
void
Item::copy_breakable_items()
{
- if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT]
- || ! breakable_b ())
- return;
+ if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT]
+ || !breakable_b ())
+ return ;
Drul_array<Item *> new_copies;
Direction i=LEFT;
int empty = gh_scm2bool (gh_cdr (result));
if (empty)
- set_empty (true);
+ set_empty (true, X_AXIS, Y_AXIS);
if (trans)
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
}
{
if (breakable_b ())
do_break ();
-
+ else
+ try_visibility_lambda ();
}
-Item*
-Item::find_prebroken_piece (Line_of_score*l) const
+
+Score_element*
+Item::find_broken_piece (Line_of_score*l) const
{
if (line_l() == l)
return (Item*)(this);
}
Item*
-Item::find_prebroken_piece (Direction d) const
+Item::find_broken_piece (Direction d) const
{
if (!d)
return (Item *) (this); // ugh
Direction d = LEFT;
do
{
- Item * broken_self = find_prebroken_piece (d);
- Item * broken_parent = parent->find_prebroken_piece (d);
+ Item * broken_self = find_broken_piece (d);
+ Item * broken_parent = parent->find_broken_piece (d);
- broken_self->dim_cache_[X_AXIS]->parent_l_ =
- broken_parent->dim_cache_[X_AXIS];
+ broken_self->set_parent (broken_parent, X_AXIS);
/*
ugh. Should do this is after breaking?
Score_element * yparent =dynamic_cast<Score_element*>(parent_l (Y_AXIS));
Item *yparenti = dynamic_cast<Item*> (yparent);
Item *broken_yparent = yparenti ?
- yparenti->find_prebroken_piece (d) : 0;
+ yparenti->find_broken_piece (d) : 0;
if (!yparent)
programming_error ("Vertical refpoint lost!");
else if (yparenti)
{
- broken_self->dim_cache_[Y_AXIS]->parent_l_ =
- broken_yparent->dim_cache_[Y_AXIS];
+ broken_self->set_parent (broken_yparent, Y_AXIS);
}
}
}
else
return CENTER;
}
+