]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.1
authorfred <fred>
Sun, 24 Mar 2002 19:52:50 +0000 (19:52 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:52:50 +0000 (19:52 +0000)
lily/elem-group-item.cc
lily/include/elem-group-item.hh
lily/include/line-group-grav.hh
lily/item.cc
lily/score-align-grav.cc

index c1903ffcd065d0909a1ea1dae77079b7b4b6a84a..138bd146a372a72beb3c8ee66949f9498325b42a 100644 (file)
@@ -8,6 +8,7 @@
 
 
 #include "elem-group-item.hh"
+#include "p-col.hh"
 
 void
 Horizontal_vertical_group_item::do_print()const
@@ -16,6 +17,3 @@ Horizontal_vertical_group_item::do_print()const
 }
 
 IMPLEMENT_IS_TYPE_B2(Horizontal_vertical_group_item,Horizontal_vertical_group,Item);
-    
-IMPLEMENT_IS_TYPE_B2(Horizontal_group_item, Horizontal_group, Item);
-
index a3e1ea6d16114ce0aa971039048cbf7bcce24ff9..bf532c035d592a6fe5060f96176cbe2a7f47ba51 100644 (file)
@@ -1,6 +1,6 @@
 /*
-  elem-group-item.hh -- declare Element_group_item
-
+  elem-group-item.hh -- declare Horizontal_vertical_group_item
+  
   source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
@@ -21,11 +21,4 @@ protected:
     virtual void do_print() const;
 };
 
-class Horizontal_group_item : public Item, public Horizontal_group {
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    SCORE_ELEM_CLONE(Horizontal_group_item);
-protected:
-    virtual void do_print() const { Elbement_group::do_print(); }
-};
-
 #endif // ELEM_GROUP_ITEM_HH
index e7153be0f56c92481fa17ff80fc27ba29487f6f3..2c3393806fcb527ad5925bbadf09b671c7484512 100644 (file)
@@ -16,7 +16,7 @@
   Engravers put elements on the same or lowel level in a line
   */
 class Line_group_engraver : public Engraver{
-    Line_of_staff *staffline_p_;   
+    Vertical_group_spanner *staffline_p_;   
 
 protected:
     virtual void do_creation_processing();
index 2481e4a35069fa7f4b3a4f75a9814c9d38dc31be..083798be00bbe1d4e4abd9300a585d92a30a362e 100644 (file)
@@ -5,20 +5,20 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
+
 #include "p-score.hh"
 #include "debug.hh"
 #include "item.hh"
 #include "p-col.hh"
+#include "elem-group.hh"
 
 Item::Item()
 {
     pcol_l_ = 0;
-
     broken_to_a_[0]
        = broken_to_a_[1]=0;
 }
 
-
 IMPLEMENT_IS_TYPE_B1(Item, Score_elem);
 
 void
@@ -58,6 +58,23 @@ Item::break_status_i() const
        return 1;
 }
 
+void
+Item::copy_breakable_items()
+{
+    for (int i=0; i < 2; i++) {
+       Item * item_p = clone()->item();
+       item_p->copy_dependencies(*this);
+       /* add our pre and postbreaks blondly to our own y_group
+          Let Vertical_group_spanner figure out the mess.
+        */
+       if  ( y_group_l_ )
+           y_group_l_->add_element( item_p );
+       pscore_l_->typeset_item(item_p, pcol_l_, -1+ 2*i);
+       item_p->handle_prebroken_dependencies();
+       broken_to_a_[i] = item_p;
+    }
+}
+
 void
 Item::do_breakable_col_processing()
 {
@@ -65,12 +82,7 @@ Item::do_breakable_col_processing()
     if (!c->breakable_b())
        return;
     
-    for (int i=0; i < 2; i++) {
-       broken_to_a_[i] = clone()->item();
-       pscore_l_->typeset_item(broken_to_a_[i], c, -1+ 2*i);
-       broken_to_a_[i]->handle_prebroken_dependencies();
-    }
-
+    copy_breakable_items();
     handle_prebroken_dependencies();
 }
 
index f2845632370734786745c9cfb477d3f80966dc0f..babf47bd321bb8d1f49a36ec2925ed4738b15444 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 
-#include "elem-group-item.hh"
+#include "horizontal-group-item.hh"
 #include "score-align-grav.hh"
 #include "item.hh"