]> git.donarmstrong.com Git - lilypond.git/commitdiff
partial: 1.3.62.jcn
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 21 Jun 2000 14:36:07 +0000 (16:36 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 21 Jun 2000 14:36:07 +0000 (16:36 +0200)
======

* Made callbacks from Score_element::before_line_breaking() and
Score_element::after_line_breaking()

* Fixed website; backlinks should work again.

* Removed --ignore-version option. Added --verbose option.

1.3

lily/hara-kiri-group-spanner.cc [new file with mode: 0644]
lily/hara-kiri-vertical-group-spanner.cc
lily/include/hara-kiri-group-spanner.hh [new file with mode: 0644]
lily/include/hara-kiri-vertical-group-spanner.hh

diff --git a/lily/hara-kiri-group-spanner.cc b/lily/hara-kiri-group-spanner.cc
new file mode 100644 (file)
index 0000000..0094a01
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+  hara-kiri-vertical-group-spanner.cc -- implement Hara_kiri_group_spanner
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
+  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "axis-group-interface.hh"
+#include "hara-kiri-group-spanner.hh"
+#include "debug.hh"
+#include "item.hh"
+
+/*
+ */
+Hara_kiri_group_spanner::Hara_kiri_group_spanner(SCM s)
+  : Spanner (s)
+{
+  set_elt_pointer ("items-worth-living", SCM_EOL);
+}
+
+void 
+Hara_kiri_group_spanner::add_interesting_item (Item* n)
+{
+  add_dependency (n);
+  Pointer_group_interface (this, "items-worth-living").add_element (n);
+
+}
+
+GLUE_SCORE_ELEMENT(Hara_kiri_group_spanner,after_line_breaking);
+SCM 
+Hara_kiri_group_spanner::member_after_line_breaking ()
+{
+  SCM worth = get_elt_pointer ("items-worth-living");
+  /*
+    worth == self_scm  is a stupid way to signal that we're done.
+   */
+  if (gh_pair_p (worth))
+    return SCM_UNDEFINED;
+
+  Link_array<Score_element> childs = Axis_group_interface (this).get_children ();
+  for (int i = 0; i < childs.size (); i++)
+    {
+      Score_element* s = childs[i];
+
+      if ( line_l () != s->line_l ())
+       programming_error ("Killing other children too");
+      s->suicide ();
+    }
+
+  /*
+    very appropriate name here :-)
+   */
+  suicide ();
+  return SCM_UNDEFINED;
+}
+
+
+
+/*
+  We can't rely on offsets and dimensions of elements in a hara-kiri
+  group. Use a callback to make sure that hara-kiri has been done
+  before asking for offsets.  */
+Real
+Hara_kiri_group_spanner::force_hara_kiri_callback (Score_element const  *elt, Axis a)
+{
+  while (elt && !dynamic_cast<Hara_kiri_group_spanner const*> (elt))
+    elt = elt->parent_l(a);
+
+  if (elt)
+    {
+      Hara_kiri_group_spanner const  * seppuku = dynamic_cast<Hara_kiri_group_spanner const*> (elt);
+
+      ((Hara_kiri_group_spanner*)seppuku)->member_after_line_breaking ();
+    }
+  
+
+  return 0.0;
+}
index 21746accfd4374d45c95b67baa2e345744f82821..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,78 +0,0 @@
-/*
-  hara-kiri-vertical-group-spanner.cc 
-    -- implement Hara_kiri_vertical_group_spanner
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
-  Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "axis-group-interface.hh"
-#include "hara-kiri-vertical-group-spanner.hh"
-#include "debug.hh"
-#include "item.hh"
-
-/*
- */
-Hara_kiri_group_spanner::Hara_kiri_group_spanner(SCM s)
-  : Spanner (s)
-{
-  set_elt_pointer ("items-worth-living", SCM_EOL);
-}
-
-void 
-Hara_kiri_group_spanner::add_interesting_item (Item* n)
-{
-  add_dependency (n);
-  Pointer_group_interface (this, "items-worth-living").add_element (n);
-
-}
-
-void 
-Hara_kiri_group_spanner::after_line_breaking ()
-{
-  SCM worth = get_elt_pointer ("items-worth-living");
-  /*
-    worth == self_scm  is a stupid way to signal that we're done.
-   */
-  if (gh_pair_p (worth))
-    return;
-
-  Link_array<Score_element> childs = Axis_group_interface (this).get_children ();
-  for (int i = 0; i < childs.size (); i++)
-    {
-      Score_element* s = childs[i];
-
-      if ( line_l () != s->line_l ())
-       programming_error ("Killing other children too");
-      s->suicide ();
-    }
-
-  /*
-    very appropriate name here :-)
-   */
-  suicide ();
-}
-
-
-
-/*
-  We can't rely on offsets and dimensions of elements in a hara-kiri
-  group. Use a callback to make sure that hara-kiri has been done
-  before asking for offsets.  */
-Real
-Hara_kiri_group_spanner::force_hara_kiri_callback (Score_element const  *elt, Axis a)
-{
-  while (elt && !dynamic_cast<Hara_kiri_group_spanner const*> (elt))
-    elt = elt->parent_l(a);
-
-  if (elt)
-    {
-      Hara_kiri_group_spanner const  * seppuku = dynamic_cast<Hara_kiri_group_spanner const*> (elt);
-
-      ((Hara_kiri_group_spanner*)seppuku)->after_line_breaking ();
-    }
-
-  return 0.0;
-}
diff --git a/lily/include/hara-kiri-group-spanner.hh b/lily/include/hara-kiri-group-spanner.hh
new file mode 100644 (file)
index 0000000..476a18a
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+  hara-kiri-vertical-group-spanner.hh -- declare Har_kiri_vertical_group_spanner
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+
+#ifndef HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
+#define HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
+
+#include "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.
+
+  properties:
+
+  items-worth-living -- list of interesting items. If empty in a particular system,
+    clear this line
+
+*/
+class Hara_kiri_group_spanner : public Spanner
+{
+public:
+  static Real force_hara_kiri_callback (Score_element const* , Axis);
+  Hara_kiri_group_spanner (SCM);
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
+  
+  void add_interesting_item (Item* n);
+
+  VIRTUAL_COPY_CONS(Score_element);
+};
+
+
+#endif // HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
index abda869a39360594c5379863eecd09229d99e2ba..65296f81060baccd891380179b283fc7515acef0 100644 (file)
@@ -1,39 +1,2 @@
-/*
-  hara-kiri-vertical-group-spanner.hh -- declare Har_kiri_vertical_group_spanner
 
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-
-#ifndef HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
-#define HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
-
-#include "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.
-
-  properties:
-
-  items-worth-living -- list of interesting items. If empty in a particular system,
-    clear this line
-
-*/
-class Hara_kiri_group_spanner : public Spanner
-{
-public:
-  static Real force_hara_kiri_callback (Score_element const* , Axis);
-  Hara_kiri_group_spanner (SCM);
-  virtual void after_line_breaking ();
-  void add_interesting_item (Item* n);
-protected:
-  VIRTUAL_COPY_CONS(Score_element);
-};
-
-
-#endif // HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
+#error