2 single-malt-grouping-item.cc -- implement Single_malt_grouping_item
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "single-malt-grouping-item.hh"
11 #include "paper-column.hh"
13 #include "group-interface.hh"
15 Single_malt_grouping_item ::Single_malt_grouping_item(SCM s
)
18 set_elt_pointer ("elements", SCM_EOL
);
20 // this is weird! , but needed!
21 set_extent_callback (0, X_AXIS
);
22 set_extent_callback (0, Y_AXIS
);
27 Single_malt_grouping_item::add_item (Item
* i
)
30 Pointer_group_interface (this).add_element (i
);
36 Single_malt_grouping_item::my_width () const
38 Paper_column
* pc
= column_l ();
41 for (SCM s
= get_elt_pointer ("elements"); gh_pair_p (s
); s
= gh_cdr (s
))
44 if (!SMOB_IS_TYPE_B(Score_element
, elt
))
47 Item
*il
= dynamic_cast<Item
*> (SMOB_TO_TYPE (Score_element
, elt
));
48 if (pc
!= il
->column_l ())
50 /* this shouldn't happen, but let's continue anyway. */
51 programming_error (_("Single_malt_grouping_item: I've been drinking too much"));
55 if (to_boolean (il
->get_elt_property ("no-spacing-rods")))
60 Interval
iv (il
->extent (X_AXIS
));
63 Real off
= il
->relative_coordinate (pc
, X_AXIS
);
69 // add this->offset_ ? this-> relative_coordinate ()?