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 (Grob
*s
)
18 s
->set_extent_callback (SCM_EOL
, X_AXIS
);
19 s
->set_extent_callback (SCM_EOL
, Y_AXIS
);
23 Separation_item::add_item (Grob
*s
,Item
* i
)
26 Pointer_group_interface::add_element (s
,"elements",i
);
27 s
->add_dependency (i
);
31 Separation_item::my_width (Grob
*me
)
33 Item
*item
= dynamic_cast<Item
*> (me
);
34 Paper_column
* pc
= item
->column_l ();
37 for (SCM s
= me
->get_grob_property ("elements"); gh_pair_p (s
); s
= gh_cdr (s
))
40 if (!unsmob_grob (elt
))
43 Item
*il
= dynamic_cast<Item
*> (unsmob_grob (elt
));
44 if (pc
!= il
->column_l ())
46 /* this shouldn't happen, but let's continue anyway. */
47 programming_error (_("Separation_item: I've been drinking too much"));
51 if (to_boolean (il
->get_grob_property ("no-spacing-rods")))
56 Interval
iv (il
->extent (pc
, X_AXIS
));
64 // add this->offset_ ? this-> relative_coordinate ()?