2 single-malt-grouping-item.cc -- implement Single_malt_grouping_item
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "single-malt-grouping-item.hh"
11 #include "paper-column.hh"
14 Single_malt_grouping_item ::Single_malt_grouping_item()
16 set_elt_property (break_helper_only_scm_sym, SCM_BOOL_T);
17 set_elt_property (transparent_scm_sym, SCM_BOOL_T);
19 // this is weird! , but needed!
20 set_empty (true, X_AXIS, Y_AXIS);
25 Single_malt_grouping_item::add_item (Item* i)
33 Single_malt_grouping_item::my_width () const
35 Paper_column * pc = column_l ();
37 for (int i=0; i < item_l_arr_.size (); i++)
39 Item *il = item_l_arr_[i];
40 if (pc != il->column_l ())
42 /* this shouldn't happen, but let's continue anyway. */
43 programming_error (_("Single_malt_grouping_item: I've been drinking too much"));
47 Interval iv (il->extent (X_AXIS));
50 Real off = il->relative_coordinate (pc, X_AXIS);
56 // add this->offset_ ? this-> relative_coordinate ()?
62 Single_malt_grouping_item::do_substitute_element_pointer (Score_element*o,
65 if (dynamic_cast <Item *> (o))
67 item_l_arr_.unordered_substitute (dynamic_cast <Item *> (o),
68 dynamic_cast <Item *> (n));
73 Single_malt_grouping_item::do_print () const
76 for (int i=0; i < item_l_arr_.size (); i++)
78 DEBUG_OUT << classname (item_l_arr_[i]) << ", ";