2 single-malt-grouping-item.cc -- implement Separation_item
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "separation-item.hh"
11 #include "paper-column.hh"
13 #include "group-interface.hh"
16 Separation_item::set_interface (Score_element
*s
)
18 s
->set_elt_property ("elements", SCM_EOL
);
19 s
->set_extent_callback (0, X_AXIS
);
20 s
->set_extent_callback (0, Y_AXIS
);
24 Separation_item::add_item (Score_element
*s
,Item
* i
)
27 Pointer_group_interface (s
).add_element (i
);
28 s
->add_dependency (i
);
32 Separation_item::my_width (Score_element
*me
)
34 Item
*item
= dynamic_cast<Item
*> (me
);
35 Paper_column
* pc
= item
->column_l ();
38 for (SCM s
= me
->get_elt_property ("elements"); gh_pair_p (s
); s
= gh_cdr (s
))
41 if (!SMOB_IS_TYPE_B(Score_element
, elt
))
44 Item
*il
= dynamic_cast<Item
*> (unsmob_element (elt
));
45 if (pc
!= il
->column_l ())
47 /* this shouldn't happen, but let's continue anyway. */
48 programming_error (_("Separation_item: I've been drinking too much"));
52 if (to_boolean (il
->get_elt_property ("no-spacing-rods")))
57 Interval
iv (il
->extent (X_AXIS
));
60 Real off
= il
->relative_coordinate (pc
, X_AXIS
);
66 // add this->offset_ ? this-> relative_coordinate ()?