X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faxis-group-element.cc;h=928f64de0c6799c4b1ea34e0c72709ee5c0e0874;hb=9efbad2d9487a05b04423e7e9f062968e8f8eaf4;hp=b97b94cf61556b8065abba8ed204b78bd6a75b9b;hpb=1ff8f1c7e0baac008490e9e62995df70e0ed5128;p=lilypond.git diff --git a/lily/axis-group-element.cc b/lily/axis-group-element.cc index b97b94cf61..928f64de0c 100644 --- a/lily/axis-group-element.cc +++ b/lily/axis-group-element.cc @@ -3,10 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "axis-group-element.hh" +#include "graphical-axis-group.hh" void Axis_group_element::do_unlink() @@ -17,45 +18,70 @@ Axis_group_element::do_unlink() void Axis_group_element::do_junk_links() { - axis_admin_.elem_l_arr_.set_size (0); + elem_l_arr_.set_size (0); } -bool -Axis_group_element::contains_b (Graphical_element const*e) const -{ - return axis_admin_.contains_b (e); -} - -Link_array +Link_array Axis_group_element::get_extra_dependencies() const { return elem_l_arr (); } -Link_array +Link_array Axis_group_element::elem_l_arr () const { /* ugh. I know - */ - Link_array r; - for (int i=0; i < axis_admin_.elem_l_arr_.size (); i++) - r.push ((Score_elem*)axis_admin_.elem_l_arr_[i]); + */ + Link_array r; + for (int i=0; i < elem_l_arr_.size (); i++) + r.push (dynamic_cast(elem_l_arr_[i])); + return r; } +Link_array +Axis_group_element::get_children () +{ + Link_array childs; + Link_array elems = elem_l_arr (); + for (int i=0; i < elems.size (); i++) + { + Score_element* e = elems[i]; + childs.push (e) ; + Axis_group_element * axis_group= dynamic_cast (e); + if (axis_group) + childs.concat (axis_group->get_children ()); + } + + return childs; +} + void Axis_group_element::do_print() const { - axis_admin_.print(); + Graphical_axis_group::do_print(); } +Axis_group_element::Axis_group_element(Axis a1, Axis a2) + : Graphical_axis_group (a1,a2) +{ + transparent_b_ = true; +} -Axis_group_element::Axis_group_element() +Axis_group_element::Axis_group_element () + : Graphical_axis_group (X_AXIS, Y_AXIS) { transparent_b_ = true; } +Axis_group_element* +Axis_group_element::access_Axis_group_element () +{ + return this; +} + + -IMPLEMENT_IS_TYPE_B1(Axis_group_element, Score_elem); +IMPLEMENT_IS_TYPE_B2(Axis_group_element, Score_element, Graphical_axis_group);