]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.37
authorfred <fred>
Tue, 26 Mar 2002 21:48:26 +0000 (21:48 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:48:26 +0000 (21:48 +0000)
43 files changed:
Documentation/tex/other-packages.bib
flower/include/killing-cons.tcc [new file with mode: 0644]
lib/include/source.hh
lib/source.cc
lily/abbreviation-beam-engraver.cc
lily/axis-align-item.cc [new file with mode: 0644]
lily/axis-align-spanner.cc [new file with mode: 0644]
lily/bar-engraver.cc
lily/bar-script-engraver.cc
lily/dot-column.cc
lily/g-staff-side.cc
lily/hara-kiri-line-group-engraver.cc
lily/hara-kiri-vertical-group-spanner.cc
lily/include/axis-align-spanner.hh [new file with mode: 0644]
lily/include/axis-group-item.hh
lily/include/bar-engraver.hh
lily/include/bar.hh
lily/include/base-span-bar-engraver.hh
lily/include/break-align-item.hh
lily/include/collision.hh
lily/include/dot-column.hh
lily/include/dots.hh
lily/include/g-staff-side.hh
lily/include/graphical-axis-group.hh
lily/include/hara-kiri-vertical-group-spanner.hh
lily/include/key-engraver.hh
lily/include/key-item.hh
lily/include/lily-proto.hh
lily/include/line-group-group-engraver.hh
lily/include/note-head.hh
lily/include/p-col.hh
lily/include/script-column.hh
lily/include/stem-info.hh
lily/include/stem.hh
lily/include/vertical-align-engraver.hh
lily/key-engraver.cc
lily/key-item.cc
lily/line-group-group-engraver.cc
lily/p-col.cc
lily/script-column.cc
lily/stem.cc
lily/text-engraver.cc
lily/tie.cc

index 866659ee0d12db72916206de4bf65eeb5c0e8c7d..e2c7aaafc99f80fa4f7a56dde9d6d0795ccca908 100644 (file)
@@ -168,7 +168,14 @@ html=                {http://www.musicwareinc.com/},
   note={A rewrite of MusicTeX.  After licensing quarrels, MusiXTeX has 
   been split into two (both still non-GNU GPL licensed) branches.},
 }
-  
+
+
+
+@Misc{opus,
+  title =       {opus},
+html={http://www.sincrosoft.com}
+}
+
 @misc{musixtex2,
   title = {MusiXTeX},
   HTML={http://www.gmd.de/Misc/Music/},
diff --git a/flower/include/killing-cons.tcc b/flower/include/killing-cons.tcc
new file mode 100644 (file)
index 0000000..f6fcff7
--- /dev/null
@@ -0,0 +1,44 @@
+/*   
+  killing-cons.tcc -- declare Killing_cons
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef KILLING_CONS_TCC
+#define KILLING_CONS_TCC
+
+#include "cons.hh"
+
+template<class T>
+Killing_cons<T>::~Killing_cons ()
+{
+  delete car_;
+}
+
+template<class T>
+void 
+copy_killing_cons_list (Cons_list<T> &dest, Cons<T> *src) 
+{
+  for (; src; src  = src->next_)
+    {
+      T *t = new T(*src->car_);
+      dest.append ( new Killing_cons<T> (t, 0));
+    }
+}
+
+template<class T>
+void
+clone_killing_cons_list (Cons_list<T> & dest, Cons<T> *src)
+{
+  for (; src; src  = src->next_)
+    {
+      T *t = src->car_->clone ();
+      dest.append (new Killing_cons<T> (t, 0));      
+    }
+}
+
+#endif /* KILLING_CONS_TCC */
+
index 395a9d8bb46602c215e39c75a72f5213a537897a..7f4a21e7d1cabd2f118fbb8ae50ee08d69880d05 100644 (file)
@@ -5,9 +5,9 @@
 
 #ifndef SOURCE_HH
 #define SOURCE_HH
-
+#include "cons.hh"
 #include "proto.hh"
-#include "plist.hh"
+
 
 class Sources 
 {
@@ -22,7 +22,7 @@ public:
 
 private:
   const File_path * path_C_;
-  Pointer_list<Source_file*> sourcefile_p_list_;
+  Cons<Source_file> *sourcefile_p_list_;
   bool binary_b_ ;
 };
 
index ead33c63a952a7f9faf2b591abc0654c3c7a8043..66372945de4cc60ac2e7f8f47049828b83a4bdcc 100644 (file)
@@ -8,11 +8,10 @@
 
 
 #include <assert.h>
-
+#include "killing-cons.tcc"
 #include "binary-source-file.hh"
 #include "string.hh"
 #include "proto.hh"
-#include "plist.hh"
 #include "source-file.hh"
 #include "source.hh"
 #include "file-path.hh"
@@ -62,7 +61,7 @@ Sources::get_file_l (String &file_str) //UGH
 void
 Sources::add (Source_file* sourcefile_p)
 {
-  sourcefile_p_list_.bottom ().add (sourcefile_p);
+  sourcefile_p_list_ = new Killing_cons<Source_file> (sourcefile_p, sourcefile_p_list_);
 }
 
 /**
@@ -73,10 +72,10 @@ Sources::add (Source_file* sourcefile_p)
 Source_file*
 Sources::sourcefile_l (char const* ch_C)
 {
-  PCursor<Source_file*> sourcefile_l_pcur (sourcefile_p_list_.top ());
-  for (; sourcefile_l_pcur.ok (); sourcefile_l_pcur++)
-    if (sourcefile_l_pcur->in_b (ch_C))        
-      return *sourcefile_l_pcur;
+
+  for (Cons<Source_file> *i = sourcefile_p_list_; i; i = i->next_)
+    if (i->car_->in_b (ch_C))  
+      return i->car_;
   return 0;
 }
 
index 6f67fab90a7a2c13a242055dbaae670659f8cc49..4b58b02be4b9c3857eead02fa81a0719cac17c47 100644 (file)
@@ -88,7 +88,8 @@ Abbreviation_beam_engraver::acknowledge_element (Score_element_info i)
 
   abeam_p_->multiple_i_ = s->flag_i_;
   if (s->type_i () != 1) // no abbrev gaps on half note
-    s->beam_gap_i_ = s->flag_i_ - ((s->type_i () >? 2) - 2);
+    s->set_elt_property (beam_gap_scm_sym,
+                        gh_int2scm(s->flag_i_ - ((s->type_i () >? 2) - 2)));
 
   abeam_p_->add_stem (s);
 }
diff --git a/lily/axis-align-item.cc b/lily/axis-align-item.cc
new file mode 100644 (file)
index 0000000..a8859ba
--- /dev/null
@@ -0,0 +1,14 @@
+/*   
+  axis-align-item.cc --  implement 
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "axis-align-item.hh"
+
+Axis_align_item::Axis_align_item ()
+{
+}
diff --git a/lily/axis-align-spanner.cc b/lily/axis-align-spanner.cc
new file mode 100644 (file)
index 0000000..4aaf48e
--- /dev/null
@@ -0,0 +1,13 @@
+/*   
+  axis-align-spanner.cc --  implement 
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+#include "axis-align-spanner.hh"
+
+Axis_align_spanner::Axis_align_spanner()
+{
+}
index 71655de8e16ebe774472356c3de2ffebeee836f2..434f5bb88da82269816579573415ab56cbce8f23 100644 (file)
@@ -38,15 +38,7 @@ Bar_engraver::do_try_music (Music*r_l)
 
 }
 
-void
-Bar_engraver::acknowledge_element (Score_element_info i)
-{
-  if (Bar *b = dynamic_cast<Bar *> (i.elem_l_))
-    {
-      // only bar-engraver should create bars
-      assert (0);
-    }
-}
+
 
 void
 Bar_engraver::create_bar ()
@@ -69,7 +61,7 @@ Bar_engraver::create_bar ()
       Scalar prop = get_property ("barAtLineStart", 0);
       if (prop.to_bool ())
        {
-         bar_p_->at_line_start_b_ = true;
+         bar_p_->set_elt_property (at_line_start_scm_sym, SCM_BOOL_T);
        }
       announce_element (Score_element_info (bar_p_, bar_req_l_));
     }
index a623c132e582fef1025a49447ce73cff1671108d..2fc8e86b177098475dc367d1b58ee49fd9ea6691 100644 (file)
@@ -138,7 +138,7 @@ Bar_script_engraver::create_items (Request *rq)
   Scalar padding = get_property (type_ + "ScriptPadding", 0);
   if (padding.length_i() && padding.isnum_b ())
     {
-      staff_side_p_->padding_f_ = Real(padding);
+      staff_side_p_->set_elt_property (padding_scm_sym, gh_double2scm(Real(padding)));
     }
 
   
index c2e1d912b036b83c90d4cee6588d2e9aadd4be86..b673b77092de22500c2a77fbef8c8d56658ba2ea 100644 (file)
@@ -54,3 +54,8 @@ Dot_column::do_pre_processing ()
 }
 
 
+
+Dot_column::Dot_column ()
+{
+  set_axes(X_AXIS,X_AXIS);
+}
index 4c3920dca1afa9c6c6b324fc68b8c543ffc5691c..20812e55ad33b661c37cd42cd5f563cca3758050 100644 (file)
@@ -15,7 +15,7 @@ G_staff_side_item::G_staff_side_item ()
   dir_ = CENTER;
   to_position_l_ = 0;
   set_elt_property (transparent_scm_sym, SCM_BOOL_T);
-  padding_f_ = 0;
+
   axis_ = Y_AXIS;
 }
 
@@ -86,8 +86,13 @@ G_staff_side_item::position_self ()
       common = dim_cache_[axis_].parent_l_;
     }
   Interval sym_dim = to_position_l_->extent (axis_);
-  Real off = dim_cache_[axis_].relative_coordinate (common) - padding_f_ * dir_;
-  
+  Real off = dim_cache_[axis_].relative_coordinate (common);
+
+  SCM pad =   remove_elt_property (padding_scm_sym);
+  if (pad != SCM_BOOL_F)
+    {
+      off -= gh_scm2double (SCM_CDR(pad)) * dir_;
+    }
   dim_cache_[axis_].set_offset (dim[dir_] - sym_dim[-dir_] - off);
 }
 
index 5fc4ede7b31710185598cb92393b510d16e026e1..2d9fe8a91603d09771f724ac64a80ca2024852da 100644 (file)
@@ -16,7 +16,8 @@ ADD_THIS_TRANSLATOR (Hara_kiri_line_group_engraver);
 void
 Hara_kiri_line_group_engraver::create_line_spanner ()
 {
-  staffline_p_ = new Hara_kiri_vertical_group_spanner;
+  staffline_p_ = new Hara_kiri_group_spanner;
+  
 }
 
 void
@@ -24,7 +25,7 @@ Hara_kiri_line_group_engraver::typeset_element(Score_element * e)
 {
   if (Rhythmic_head *h = dynamic_cast<Rhythmic_head *> (e))
     {
-      dynamic_cast<Hara_kiri_vertical_group_spanner*> (staffline_p_)
+      dynamic_cast<Hara_kiri_group_spanner*> (staffline_p_)
        ->add_interesting_item (h);
     }
   Line_group_engraver_group::typeset_element (e);
index 84872173a41ed72cc2240b2c88fae88f387b2650..5b80d2cddb44793435f1ab3841cfccb3a4db1f5d 100644 (file)
 #include "debug.hh"
 #include "item.hh"
 
-Hara_kiri_vertical_group_spanner::Hara_kiri_vertical_group_spanner()
+Hara_kiri_group_spanner::Hara_kiri_group_spanner()
 {
+  set_axes(Y_AXIS,Y_AXIS);
 }
 
 void 
-Hara_kiri_vertical_group_spanner::add_interesting_item (Item* n)
+Hara_kiri_group_spanner::add_interesting_item (Item* n)
 {
   add_dependency (n);
   interesting_items_.push (n);
 }
 
 void 
-Hara_kiri_vertical_group_spanner::do_post_processing ()
+Hara_kiri_group_spanner::do_post_processing ()
 {
   if (!interesting_items_.empty ())
     return;
@@ -39,7 +40,7 @@ Hara_kiri_vertical_group_spanner::do_post_processing ()
 }
 
 void
-Hara_kiri_vertical_group_spanner::do_substitute_element_pointer (Score_element*o, Score_element*n)
+Hara_kiri_group_spanner::do_substitute_element_pointer (Score_element*o, Score_element*n)
 {
   if (Item *it = dynamic_cast<Item *> (o))
     interesting_items_.substitute (it, dynamic_cast<Item *> (n));
@@ -47,7 +48,7 @@ Hara_kiri_vertical_group_spanner::do_substitute_element_pointer (Score_element*o
 
 
 void
-Hara_kiri_vertical_group_spanner::do_print () const
+Hara_kiri_group_spanner::do_print () const
 {
   Axis_group_spanner::do_print ();
 }
diff --git a/lily/include/axis-align-spanner.hh b/lily/include/axis-align-spanner.hh
new file mode 100644 (file)
index 0000000..04ebf26
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+  vertical-align-spanner.hh -- declare Vertical_align_spanner
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef VERTICAL_ALIGN_SPANNER_HH
+#define VERTICAL_ALIGN_SPANNER_HH
+
+#include "spanner.hh"
+#include "align-element.hh"
+#include "axis-group-spanner.hh"
+
+class Axis_align_spanner : public virtual Align_element,
+                          public virtual Axis_group_spanner
+{
+public:
+  VIRTUAL_COPY_CONS(Score_element);
+  Axis_align_spanner ();
+  virtual void do_print() const {}
+};
+#endif // VERTICAL_ALIGN_SPANNER_HH
index 9d0852b64a028600e4ae850ed0e44cfbab51b8ad..b3701a15348025759f647929fec696386f9a3c88 100644 (file)
   A grouping item. Its special support is in do_breakable_col_processing().
  */
 
-class Axis_group_item : public virtual Axis_group_element, public Item {
+class Axis_group_item : public virtual Axis_group_element,
+                       public virtual Item {
 protected:
   virtual void do_breakable_col_processing();
   void OK() const;
   virtual void do_print() const;
+public:
+  VIRTUAL_COPY_CONS(Score_element);
 };
 
 #endif // AXIS_ITEM_HH
index 647a47e05d252db17a6ee030e98aaa1b99fbff39..bbb26c7c70562e976eb25149c1bb6c18c4fd7c5d 100644 (file)
@@ -24,7 +24,6 @@ public:
   void request_bar (String type_str);
     
 protected:
-  virtual void acknowledge_element (Score_element_info i);
   virtual void do_creation_processing ();
   virtual void do_removal_processing ();
   virtual bool do_try_music (Music *req_l);
index 08e48d2f6e31a48340d4bc767bbdeb08fa931868..3c43bc0dcd92139465b020c96fc12e564a00b18c 100644 (file)
@@ -14,9 +14,6 @@
 class Bar:public Item {
 public:
   String type_str_;
-  bool at_line_start_b_;
-
-  
   VIRTUAL_COPY_CONS(Score_element);
   Bar ();
 
@@ -24,6 +21,7 @@ protected:
   virtual void do_pre_processing ();
   virtual Molecule* do_brew_molecule_p () const;
   virtual Real get_bar_size () const;
+
 private:
   void do_print () const;
 };
index cf992c8fb9d5df33c2401a9378f6122823199fd4..47c274d758c2528a74d6825d8f7d517f794acf85 100644 (file)
@@ -11,7 +11,7 @@
 #define SPAN_BAR_GRAV_HH
 
 #include "engraver.hh"
-
+class Axis_align_spanner;
 /** 
 
   Make bars that span multiple "staffs". Catch bars, and span a
@@ -22,7 +22,7 @@ class Base_span_bar_engraver : public Engraver
 {
   Span_bar * spanbar_p_;
   Array<Bar*> bar_l_arr_;
-  Vertical_align_spanner * valign_l_;
+  Axis_align_spanner * valign_l_;
 public:
   VIRTUAL_COPY_CONS(Translator);
   
index d127e7879b6bea4e8413a092e28770636370ab89..d2b98fa7ce4f97d62bcaeffaf916f0b0f9e96f1f 100644 (file)
 #ifndef BREAK_ALIGN_ITEM_HH
 #define BREAK_ALIGN_ITEM_HH
 
-#include "horizontal-align-item.hh"
+#include "axis-align-item.hh"
 
 /// align breakable items (clef, bar, etc.)
-class Break_align_item : public Horizontal_align_item {
+class Break_align_item : public Axis_align_item {
 
 protected:
-    virtual void do_pre_processing();
+  virtual void do_pre_processing();
 public:
-    
-    VIRTUAL_COPY_CONS(Score_element);
+  Break_align_item ();
+  VIRTUAL_COPY_CONS(Score_element);
        
 };
 #endif // BREAK_ALIGN_ITEM_HH
index 832ac89704443844d533e64d872234a0cbbd0ae0..42b14277cfe4403044b088af78795e8dcde2bc8e 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef COLLISION_HH
 #define COLLISION_HH
 #include "lily-proto.hh"
-#include "horizontal-vertical-group-item.hh"
+#include "axis-group-item.hh"
 
 /**
   Resolve conflicts between various Note_columns (chords).
@@ -20,7 +20,7 @@
   multistaff support (see Chlapik: equal noteheads should be on the
   same hpos.)  
 */
-class Collision : public Horizontal_vertical_group_item {
+class Collision : public Axis_group_item {
 protected:
     virtual void do_substitute_element_pointer (Score_element*,Score_element*);
     virtual void do_pre_processing();
index 67a62429c263438445c189bec7f7ec873ed29008..374181e0142fa0ceb2c7f5821fb51811ad679bfc 100644 (file)
 #ifndef DOT_COLUMN_HH
 #define DOT_COLUMN_HH
 
-#include "horizontal-group-item.hh"
+#include "axis-group-item.hh"
 
 /**
   Group dots.  This is needed because, the dots have to be aligned per voice
  */
-class Dot_column : public Horizontal_group_item
+class Dot_column : public Axis_group_item
 {
   Link_array<Rhythmic_head> head_l_arr_;
   Link_array<Dots> dot_l_arr_;
@@ -24,7 +24,7 @@ public:
   
   void add_head (Rhythmic_head*);
   void add_dots (Dots*);
-
+  Dot_column ();
 protected:
   virtual void do_pre_processing ();
   virtual void do_substitute_element_pointer (Score_element *o, Score_element*n);
index 2ff6f061700a4619248ee19dd7669434bd6c95ac..919da6fb8ddcbad7071926401f8c715c201d55a5 100644 (file)
@@ -24,7 +24,6 @@ protected:
 public:
   int no_dots_i_;
   int position_i_;
-
   
   Dots ();
 };
index 6334233f1158f8e9f341b6a7a067be321df8c65a..c463360e273d1a80124d46e3a4c4162264a5b0f9 100644 (file)
@@ -20,7 +20,6 @@ public:
   Score_element * to_position_l_;
   Direction dir_;
   Link_array<Score_element> support_l_arr_;
-  Real padding_f_;
   Axis axis_;
   
   G_staff_side_item ();
index 73249862b60ef52405c7415e2da0ec7bf7c1ea81..c21995c39c1ee509ed6a3332bdc1640469614b46 100644 (file)
  */
 class Graphical_axis_group : public virtual Graphical_element {
 public:
+  // keep array in order.
+  bool ordered_b_;             
   Link_array<Graphical_element> elem_l_arr_;
   Axis axes_[2];
     
   Interval extent (Axis) const;
   virtual void do_print() const;
   Graphical_axis_group (Graphical_axis_group const&);
-  Graphical_axis_group (Axis,Axis);
+  Graphical_axis_group ();
+  virtual void set_axes (Axis,Axis);
   void remove_all ();
 
   bool contains_b (Graphical_element const *) const;
   void add_element (Graphical_element*);
   void remove_element (Graphical_element*);
-  
 };
 
 #endif // Graphical_axis_group_HH
index 3f5031ba48824c31d1d990fa071d7ddbd180379c..7479e90b29deb4d2f5f2d1942645e0c1eef32887 100644 (file)
 #ifndef HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
 #define HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
 
-#include "vertical-group-spanner.hh"
+#include "axis-group-spanner.hh"
 
 /** 
   As Vertical_group_spanner, but keep track of interesting items.  If
   we don't contain any interesting items after linebreaking, then
   gracefully commit suicide.  Objective: don't disgrace Lily by
   typesetting empty lines in orchestral scores.  */
-class Hara_kiri_vertical_group_spanner : public Vertical_group_spanner
+class Hara_kiri_group_spanner : public Axis_group_spanner
 {
 public:
-  Hara_kiri_vertical_group_spanner ();
+  Hara_kiri_group_spanner ();
   virtual void do_post_processing ();
   void add_interesting_item (Item* n);
 protected:
index e93907886c17431e82b65245f0bed3f06cd78fdc..aef3f27fafed8495335910b6562197b8dacce756 100644 (file)
@@ -27,11 +27,11 @@ public:
   VIRTUAL_COPY_CONS(Translator);
   Key key_;
   Key_change_req * keyreq_l_;
-  Key_item * kit_p_;
+  Key_item * item_p_;
   Array<Musical_pitch> accidental_idx_arr_;
   Array<Musical_pitch> old_accidental_idx_arr_;
-  bool default_key_b_;
-  bool change_key_b_;
+
+
     
 protected:
   virtual bool do_try_music (Music *req_l);
index 0833aca9612cc90e0b9fc11f9e7cc341bb612fa9..82f72cb871c8d5795c4b7c98798b5599265e42c2 100644 (file)
 
 /// An item which places accidentals at the start of the line
 class Key_item :public  Item, public Staff_symbol_referencer {
-public:
-  
   Array<int> pitch_arr_;
   Array<int> acc_arr_;
   Array<int> old_pitch_arr_;
   Array<int> old_acc_arr_;
+  int c0_position_;
+
+
+public:
+  bool multi_octave_b_;  
 
-  // ugh.  Naming 
-  int c_position;
-  // see above.
-  int c0_position;
-  bool default_b_;
-  bool multi_octave_b_;
+  int get_c_position () const;
     
   
   VIRTUAL_COPY_CONS(Score_element);
@@ -37,7 +35,6 @@ public:
   int calculate_position(int p, int a) const;
 
 protected:
-  virtual void do_pre_processing();
   virtual Molecule* do_brew_molecule_p() const;
 };
 
index 545ba25af6bd5519cd8d744dc856d3c2287a29ef..367ff2febd78a04b8c990210aecf118c8630af5c 100644 (file)
@@ -89,13 +89,9 @@ struct Graphical_element;
 struct Graphical_axis_group;
 struct Global_translator;
 struct Hara_kiri_line_group_engraver;
-struct Hara_kiri_vertical_group_spanner;
+struct Hara_kiri_group_spanner;
 struct Head_column;
 
-struct Horizontal_align_item;
-struct Horizontal_group_element;
-struct Horizontal_group_item;
-struct Horizontal_vertical_group;
 struct Idealspacing;
 struct Identifier;
 struct Input_file;
@@ -257,10 +253,7 @@ struct Translator_group;
 struct Timing_req;
 struct Vertical_brace;
 struct Vertical_spanner;
-struct Vertical_group_element;
-struct Vertical_group_spanner;
-struct Vertical_align_spanner;
-struct Vertical_align_engraver;
+
 struct Volta_spanner;
 struct Align_element;
 struct Sequential_music;
index 24d1dd668c52f68a41a22fea3b6741a2ecc5f9e7..93e917310b809c696e568cd398a70693e4767386 100644 (file)
@@ -18,7 +18,7 @@
   */
 class Line_group_engraver_group : public Engraver_group_engraver {
 protected:
-  Vertical_group_spanner *staffline_p_;   
+  Axis_group_spanner *staffline_p_;   
 
   virtual void create_line_spanner ();
   virtual void do_creation_processing();
index a48792349d61e81c52d615801858f5a449ca41b0..e931ede0ea9931b7674b848b99afc1dce43f3905 100644 (file)
 
 class Note_head : public Rhythmic_head {
 public:
-  
-  String note_head_type_str_;
-
-  /// position of top line (5 linestaff: 8)
   int position_i_;
 
-  /// -1 = lowest, 0 = inside, 1 = top
-  int extremal_i_;
-    
-  /// needed for the help-lines
-  int staff_size_i_;
-  Direction x_dir_;
-    
   Note_head ();
+  void flip_around_stem (Direction);
   static int compare (Note_head * const &a, Note_head *const &b) ;
 protected:
   virtual Interval do_width () const;
index 3f3f35e5177b2cf474f36ec3f2560221538c228c..fd379a33471af56158328e341019cecf1fce9cd9 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef P_COL_HH
 #define P_COL_HH
 
-#include "horizontal-group-item.hh"
+#include "axis-group-item.hh"
 #include "rod.hh"
 
 
@@ -27,7 +27,7 @@
     \end{itemize}
   */
 
-class Paper_column : public Horizontal_group_item { 
+class Paper_column : public Axis_group_item { 
 public:
   VIRTUAL_COPY_CONS(Score_element);
   Drul_array<Array<Column_rod> > minimal_dists_arr_drul_;
index 94d1e481e1b517a994a3ec988814d6fb0317ea1d..74ba090bad69189bd5548f9cc937dd12e2160321 100644 (file)
 #ifndef SCRIPT_COLUMN_HH
 #define SCRIPT_COLUMN_HH
 
-#include "horizontal-vertical-group-item.hh"
+#include "axis-group-item.hh"
 
 /** a struct for treating a group of noteheads (noteheads, stem
   (chord) and scripts) as a single entity.  */
-class Script_column : public Horizontal_vertical_group_item {
+class Script_column : public Axis_group_item {
 
 protected:
-    virtual void do_print() const;
-    virtual void do_substitute_element_pointer (Score_element*, Score_element*);
-    virtual void do_pre_processing() ;
+  virtual void do_print() const;
+  virtual void do_substitute_element_pointer (Score_element*, Score_element*);
+  virtual void do_pre_processing() ;
 public:
-    Link_array<Script> script_l_arr_;
-    Link_array<Item> support_l_arr_;
+  Link_array<Script> script_l_arr_;
+  Link_array<Item> support_l_arr_;
     
    
-    virtual void add_script (Script *);
-    void add_support (Item*);
+  virtual void add_script (Script *);
+  void add_support (Item*);
+  Script_column ();
 };
 
 #endif // SCRIPT_COLUMN_HH
index b73ef582cd1cba6d179b18587bd767f1e795b96e..a909ac952e39062e93f9c5d686652fb8552b45c2 100644 (file)
@@ -23,8 +23,9 @@ struct Stem_info {
   Real interstaff_f_;
   Stem* stem_l_;
 
+
   Stem_info ();
-  Stem_info (Stem *);
+  Stem_info (Stem *, int);
 };
 
 #endif // STEM_INFO_HH
index 003922789efe33c6b2d2764a0d9c7d9dd1c38959..f5e74a609dd7b9cf5cd62b3340745e3e742e58d8 100644 (file)
 
   dir_force: is direction explicitely specified? (bool)
 
+  /// how many abbrev beam don't reach stem?
+  int beam_gap_i_;
+
+
+  
   */
 // todo: remove baseclass Staff_symbol_referencer, since stem
 // can be across a staff.
@@ -43,19 +48,10 @@ class Stem : public Item, public Staff_symbol_referencer {
     */
   Drul_array<Real> yextent_drul_;
 
-  /**
-    geen gedonder, jij gaat onder.
-    -1 stem points down, +1: stem points up
-    */
-  Direction  stem_xdir_;
-
   Link_array<Note_head> head_l_arr_;
   Link_array<Rest> rest_l_arr_;
     
 public:
-  /// how many abbrev beam don't reach stem?
-  int beam_gap_i_;
-
   /// log of the duration. Eg. 4 -> 16th note -> 2 flags
   int flag_i_;
 
@@ -67,9 +63,6 @@ public:
 
   Drul_array<int> beams_i_drul_;
 
-  /// maximum number of beams
-  int mult_i_;
-
   /// direction stem (that's me)
   Direction dir_;
 
@@ -79,8 +72,6 @@ public:
   /// ensure that this Stem also encompasses the Notehead #n#
   void add_head (Rhythmic_head*n);
 
-  
-
   Real hpos_f () const;
   Real chord_start_f () const;
   
index 23b8dd85a56578679c54b9ee4aac23ab68470eb9..4115bc66dd2b331ee0afe82e62476c556e0de600 100644 (file)
@@ -11,9 +11,9 @@
 #define VERTICAL_ALIGN_GRAV_HH
 
 #include "engraver.hh"
-
+class Axis_align_spanner;
 class Vertical_align_engraver : public Engraver {
-  Vertical_align_spanner * valign_p_;
+  Axis_align_spanner * valign_p_;
     
 public:
   VIRTUAL_COPY_CONS(Translator);
index 248dca07c5679a21cc78a8acab166ac302c4a004..519d8f9500060b609f547cc2aaadd726152a54f5 100644 (file)
 
 Key_engraver::Key_engraver ()
 {
-  kit_p_ = 0;
+  item_p_ = 0;
   do_post_move_processing ();
 }
 
 void
 Key_engraver::create_key ()
 {
-  if (!kit_p_) 
+  if (!item_p_) 
     {
-      kit_p_ = new Key_item;
-      kit_p_->set_elt_property (break_priority_scm_sym, gh_int2scm(-1)); // ugh
-      kit_p_->multi_octave_b_ = key_.multi_octave_b_;
-      announce_element (Score_element_info (kit_p_,keyreq_l_));
+      item_p_ = new Key_item;
+      item_p_->set_elt_property (break_priority_scm_sym, gh_int2scm(-1)); // ugh
+      item_p_->multi_octave_b_ = key_.multi_octave_b_;
+      announce_element (Score_element_info (item_p_,keyreq_l_));
       
 
       for (int i = 0; i < accidental_idx_arr_.size(); i++) 
@@ -37,9 +37,9 @@ Key_engraver::create_key ()
          Musical_pitch m_l =accidental_idx_arr_[i];
          int a =m_l.accidental_i_;      
          if (key_.multi_octave_b_)
-           kit_p_->add (m_l.steps (), a);
+           item_p_->add (m_l.steps (), a);
          else
-           kit_p_->add (m_l.notename_i_, a);
+           item_p_->add (m_l.notename_i_, a);
        }
 
       for (int i = 0 ; i< old_accidental_idx_arr_.size(); i++) 
@@ -47,9 +47,9 @@ Key_engraver::create_key ()
          Musical_pitch m_l =old_accidental_idx_arr_[i];
          int a =m_l.accidental_i_;
          if (key_.multi_octave_b_)
-           kit_p_->add_old (m_l.steps  (), a);
+           item_p_->add_old (m_l.steps  (), a);
          else
-           kit_p_->add_old (m_l.notename_i_, a);
+           item_p_->add_old (m_l.notename_i_, a);
        }
     }
 }      
@@ -81,9 +81,13 @@ Key_engraver::acknowledge_element (Score_element_info info)
   else if (dynamic_cast<Bar *> (info.elem_l_)
           && accidental_idx_arr_.size ()) 
     {
-      if (!keyreq_l_)
-       default_key_b_ = true;
+      bool def =  (!item_p_);
       create_key ();
+      if (def)
+       {
+         item_p_->set_elt_property (visibility_lambda_scm_sym,
+                                   gh_eval_str ("postbreak_only_visibility"));
+       }
     }
 
 }
@@ -100,11 +104,10 @@ Key_engraver::do_process_requests ()
 void
 Key_engraver::do_pre_move_processing ()
 { 
-  if (kit_p_) 
+  if (item_p_) 
     {
-      kit_p_->default_b_ = default_key_b_;
-      typeset_element (kit_p_);
-      kit_p_ = 0;
+      typeset_element (item_p_);
+      item_p_ = 0;
     }
 }
 
@@ -200,7 +203,6 @@ void
 Key_engraver::do_post_move_processing ()
 {
   keyreq_l_ = 0;
-  default_key_b_ = false;
   old_accidental_idx_arr_.clear ();
 }
 
index 34061b63838439f593fe3e024705e07af4281ef1..7fc7f2accfc438c2837309f3b7ef6ab9e679ba7f 100644 (file)
@@ -23,19 +23,24 @@ Key_item::Key_item ()
 {
   multi_octave_b_ = false;
   set_elt_property (breakable_scm_sym, SCM_BOOL_T);
-  default_b_ = false;
   set_c_position (0);
 }
 
-void 
-Key_item::set_c_position (int c0)
+int
+Key_item::get_c_position () const
 {
-  c0_position = c0;
   // Find the c in the range -4 through 2
-  int from_bottom_pos = c0 + 4;        
+  int from_bottom_pos = c0_position_ + 4;      
   from_bottom_pos = from_bottom_pos%7;
   from_bottom_pos = (from_bottom_pos + 7)%7; // Precaution to get positive.
-  c_position  = from_bottom_pos - 4;
+  return from_bottom_pos - 4;
+}
+
+
+void 
+Key_item::set_c_position (int c0)
+{
+  c0_position_ = c0;
 }
 
 
@@ -59,16 +64,16 @@ Key_item::calculate_position(int p, int a) const
 {
   if (multi_octave_b_) 
     {
-      return p + c0_position;
+      return p + c0_position_;
     }
   else {
-    if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+c_position>4)) && (p+c_position>1)) 
+    if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+get_c_position ()>4)) && (p+get_c_position ()>1)) 
        ||
-       (a>0 && ((p>SHARP_TOP_PITCH) || (p+c_position>5)) && (p+c_position>2))) 
+       (a>0 && ((p>SHARP_TOP_PITCH) || (p+get_c_position ()>5)) && (p+get_c_position ()>2))) 
       {
        p -= 7; /* Typeset below c_position */
       }
-    return p + c_position;
+    return p + get_c_position ();
   }
 }
 
@@ -133,15 +138,3 @@ Key_item::do_brew_molecule_p() const
 
 
 
-void 
-Key_item::do_pre_processing()
-{
-  if (default_b_) 
-    {
-      bool transparent = (break_status_dir() != RIGHT);
-      set_empty (transparent);
-
-      if (transparent)
-       set_elt_property (transparent_scm_sym, SCM_BOOL_T);
-    }
-}
index 4779cbfa13f171517c8b10d960791c72fbc7e81f..606fa918b905f9d67063610dabccd48c0b557451 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "staff-symbol.hh"
-#include "vertical-group-spanner.hh"
+#include "axis-group-spanner.hh"
 #include "command-request.hh"
 #include "bar.hh"
 #include "debug.hh"
@@ -51,7 +51,8 @@ Line_group_engraver_group::do_creation_processing()
 void
 Line_group_engraver_group::create_line_spanner ()
 {
-  staffline_p_ = new Vertical_group_spanner ;
+  staffline_p_ = new Axis_group_spanner ;
+  staffline_p_->set_axes (Y_AXIS,Y_AXIS);
 }
 
 void
index 4981cac3424c7cfc7d5a5a75565dd2c413f49109..98891d885d829712db4c9a0e69c00c395044f434 100644 (file)
@@ -104,6 +104,8 @@ Paper_column::breakpoint_b() const
 
 Paper_column::Paper_column()
 {
+  set_axes (X_AXIS, X_AXIS);
+
   line_l_=0;
   rank_i_ = -1;
 }
index 0609ca5260c9ac820dfc5d85da086c6a38910815..16eccc8a41acea70a62d33ce9af7de1877b18856 100644 (file)
@@ -42,6 +42,12 @@ idx (bool inside, int dir)
   return j;
 }
 
+
+Script_column::Script_column ()
+{
+  set_axes (X_AXIS,X_AXIS);
+}
+
 void
 Script_column::do_pre_processing()
 {
index c0221c73fde68c47ae737f5d1be8a7becaa79a4f..751220e7a6acfb7cdcc2b60c3398698eaa475b03 100644 (file)
@@ -26,14 +26,9 @@ Stem::~Stem ()
 Stem::Stem ()
 {
   beams_i_drul_[LEFT] = beams_i_drul_[RIGHT] = -1;
-  mult_i_ = 0;
-
   yextent_drul_[DOWN] = yextent_drul_[UP] = 0;
   flag_i_ = 2;
   dir_ = CENTER;
-  stem_xdir_ = LEFT;
-
-  beam_gap_i_ = 0;
   beam_l_ = 0;
 }
 
@@ -173,7 +168,7 @@ Stem::set_default_stemlen ()
     set_default_dir ();
   /* 
     stems in unnatural (forced) direction should be shortened, 
-    accoding to [Roush & Gourlay]
+    according to [Roush & Gourlay]
    */
   if (((int)chord_start_f ())
       && (dir_ != get_default_dir ()))
@@ -198,19 +193,8 @@ Stem::set_default_extents ()
   if (!stem_length_f ())
     set_default_stemlen ();
 
-
-  if (dir_ == UP)
-    stem_xdir_ = RIGHT;
-  if (invisible_b ())
-    stem_xdir_ = CENTER;
 }
 
-/*
-  TODO
-
-  move into note_column.cc
-
-  */
 void
 Stem::set_noteheads ()
 {
@@ -220,10 +204,13 @@ Stem::set_noteheads ()
   if (dir_ < 0)
     head_l_arr_.reverse ();
 
-  head_l_arr_[0]->extremal_i_ = -1;
-  head_l_arr_.top ()->extremal_i_ = 1;
+  Note_head * beginhead =   head_l_arr_[0];
+  beginhead->set_elt_property (extremal_scm_sym, SCM_BOOL_T);
+  if  (beginhead !=   head_l_arr_.top ())
+    head_l_arr_.top ()->set_elt_property (extremal_scm_sym, SCM_BOOL_T);
+  
   int parity=1;
-  int lastpos = head_l_arr_[0]->position_i_;
+  int lastpos = beginhead->position_i_;
   for (int i=1; i < head_l_arr_.size (); i ++)
     {
       int dy =abs (lastpos- head_l_arr_[i]->position_i_);
@@ -231,7 +218,7 @@ Stem::set_noteheads ()
       if (dy <= 1)
        {
          if (parity)
-           head_l_arr_[i]->x_dir_ = (stem_xdir_ == LEFT) ? LEFT : RIGHT;
+           head_l_arr_[i]->flip_around_stem (dir_);
          parity = !parity;
        }
       else
@@ -316,10 +303,10 @@ Stem::note_delta_f () const
       Interval head_wid(0,  head_l_arr_[0]->extent (X_AXIS).length ());
       Real rule_thick(paper_l ()->rule_thickness ());
       Interval stem_wid(-rule_thick/2, rule_thick/2);
-      if (stem_xdir_ == CENTER)
+      if (dir_ == CENTER)
        r = head_wid.center ();
       else
-       r = head_wid[stem_xdir_] - stem_wid[stem_xdir_];
+       r = head_wid[dir_] - stem_wid[dir_];
     }
   return r;
 }
@@ -330,29 +317,17 @@ Stem::hpos_f () const
   return note_delta_f () + Item::hpos_f ();
 }
 
-/*
-  TODO:  head_l_arr_/rest_l_arr_ in  
- */
 void
 Stem::do_substitute_element_pointer (Score_element*o,Score_element*n)
 {
   if (Note_head*h=dynamic_cast<Note_head*> (o))
-  head_l_arr_.substitute (h, dynamic_cast<Note_head*>(n));
+    head_l_arr_.substitute (h, dynamic_cast<Note_head*>(n));
   if (Rest *r=dynamic_cast<Rest*> (o))
     rest_l_arr_.substitute (r, dynamic_cast<Rest*>(n));
   if (Beam* b = dynamic_cast<Beam*> (o))
     {
       if (b == beam_l_) 
-       {
-         beam_l_ = dynamic_cast<Beam*> (n);
-         if (!beam_l_)
-           {
-             beams_i_drul_[LEFT] = 0;
-             beams_i_drul_[RIGHT] = 0;
-             mult_i_ = 0;
-           }
-       }
+       beam_l_ = dynamic_cast<Beam*> (n);
     }
   Staff_symbol_referencer::do_substitute_element_pointer (o,n);
-      
 }
index cf67bc47b26087fa921e88d5a6726cd9ed390726..16d5b76027993ba44cca120a517f74c77ade2ed5 100644 (file)
@@ -91,7 +91,7 @@ Text_engraver::do_process_requests ()
       Scalar padding = get_property ("textScriptPadding", 0);
       if (padding.length_i() && padding.isnum_b ())
        {
-         ss->padding_f_ = Real(padding);
+         ss->set_elt_property (padding_scm_sym, gh_double2scm(Real(padding)));
        }
 
       Scalar empty = get_property ("textEmptyDimension", 0);
index 83ba2c92b1b3d8fbe70f42d03f4da296ae1aec85..df313208cc6e0bee055aa4aae03b5e61e5882237 100644 (file)
@@ -93,7 +93,8 @@ Tie::do_post_processing()
   do
     {
       // tie attached to outer notehead
-      if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_)
+      if (head_l_drul_[d]
+         && head_l_drul_[d]->remove_elt_property (extremal_scm_sym) != SCM_BOOL_F)
        {
          if (d == LEFT)
            dx_f_drul_[d] += notewidth;