From: fred Date: Mon, 4 Aug 1997 23:43:19 +0000 (+0000) Subject: lilypond-0.1.1 X-Git-Tag: release/1.5.59~6092 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=19c1e7cb5beef575cbe3bbb5c7ff7bead7d4313e;p=lilypond.git lilypond-0.1.1 --- diff --git a/lily/horizontal-group-item.cc b/lily/horizontal-group-item.cc new file mode 100644 index 0000000000..15af0bd803 --- /dev/null +++ b/lily/horizontal-group-item.cc @@ -0,0 +1,41 @@ +/* + horizontal-group-item.cc -- implement Horizontal_group_item + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "p-col.hh" +#include "horizontal-group-item.hh" + +IMPLEMENT_IS_TYPE_B2(Horizontal_group_item, Horizontal_group, Item); + +void +Horizontal_group_item::OK() const +{ + for (int i=0; i < elem_l_arr_.size(); i++) { + Item * it_l = elem_l_arr_[i]->item(); + + assert(it_l&& it_l->pcol_l_ == pcol_l_ ); + } +} + +void +Horizontal_group_item::do_breakable_col_processing() +{ + if (!pcol_l_->breakable_b()) + return; + OK(); + copy_breakable_items(); + + Link_array elems = elem_l_arr_; + + for (int i=0; i < elems.size(); i++) { + Item* it_l = elems[i]->item(); + for ( int j=0; j < 2; j++) { + Item *new_l = it_l->find_prebroken_piece(broken_to_a_[j]->pcol_l_); + ((Horizontal_group_item*)broken_to_a_[j])->add_element( new_l ); + } + } +} diff --git a/lily/include/horizontal-group-item.hh b/lily/include/horizontal-group-item.hh new file mode 100644 index 0000000000..3495af9f97 --- /dev/null +++ b/lily/include/horizontal-group-item.hh @@ -0,0 +1,25 @@ +/* + horizontal-group-item.hh -- declare Horizontal_group_item + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef HORIZONTAL_GROUP_ITEM_HH +#define HORIZONTAL_GROUP_ITEM_HH + +#include "elem-group.hh" +#include "item.hh" + +class Horizontal_group_item : public Item, public Horizontal_group { + DECLARE_MY_RUNTIME_TYPEINFO; + SCORE_ELEM_CLONE(Horizontal_group_item); +protected: + virtual void do_breakable_col_processing(); + void OK()const; + virtual void do_print() const { Elbement_group::do_print(); } +}; + +#endif // HORIZONTAL_GROUP_ITEM_HH