lilypond-1.3.130
[lilypond.git] / lily / elem-group.cc
blob4e215381cf37f1e6104012a34997d5f197fe33eb
1 /*
2 elem-group.cc -- implement Horizontal_vertical_group_element
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "elem-group.hh"
10 #include "interval.hh"
11 #include "item.hh"
12 #include "debug.hh"
15 void
16 Vertical_group_element::add_element (Graphical_element*e)
18 axis_admin_.add_element (e, this, Y_AXIS, Y_AXIS);
21 void
22 Vertical_group_element::remove_element (Graphical_element*e)
24 axis_admin_.remove_element (e, Y_AXIS, Y_AXIS);
28 Interval
29 Vertical_group_element::do_height() const
31 return axis_admin_.extent (Y_AXIS);
33 void
34 Vertical_group_element::remove_all()
36 axis_admin_.remove_all (Y_AXIS,Y_AXIS);
39 // ****************
41 void
42 Horizontal_group_element::remove_all()
44 axis_admin_.remove_all (X_AXIS,X_AXIS);
47 void
48 Horizontal_group_element::add_element (Graphical_element*e)
50 axis_admin_.add_element (e,this, X_AXIS,X_AXIS);
53 void
54 Horizontal_group_element::remove_element (Graphical_element*e)
56 axis_admin_.remove_element (e,X_AXIS,X_AXIS);
60 Interval
61 Horizontal_group_element::do_width() const
63 return axis_admin_.extent (X_AXIS);
67 // ****************
69 void
70 Horizontal_vertical_group_element::remove_all()
72 axis_admin_.remove_all (X_AXIS,Y_AXIS);
74 void
75 Horizontal_vertical_group_element::add_element (Graphical_element *e)
77 axis_admin_.add_element (e, this, X_AXIS, Y_AXIS);
80 void
81 Horizontal_vertical_group_element::remove_element (Graphical_element*e)
83 axis_admin_.remove_element (e, X_AXIS, Y_AXIS);
88 IMPLEMENT_IS_TYPE_B1(Axis_group_element, Score_elem);
89 IMPLEMENT_IS_TYPE_B1(Horizontal_group_element, Axis_group_element);
90 IMPLEMENT_IS_TYPE_B1(Vertical_group_element, Axis_group_element);
91 IMPLEMENT_IS_TYPE_B2(Horizontal_vertical_group_element, Horizontal_group_element, Vertical_group_element);