]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pointer-group-interface.cc
Run `make grand-replace'.
[lilypond.git] / lily / pointer-group-interface.cc
index a04d4512c0fd3f06abc26978196b4602f68f0e1e..537bc4b964f12d533bb3bfc5527adbc35b761b1f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "pointer-group-interface.hh"
@@ -45,6 +45,18 @@ Pointer_group_interface::get_grob_array (Grob *me, SCM sym)
   return arr;
 }
 
+Grob *
+Pointer_group_interface::find_grob (Grob *me, SCM sym, bool (*pred) (Grob*))
+{
+  Grob_array *arr = get_grob_array (me, sym);
+
+  for (vsize i = 0; i < arr->size (); i++)
+    if (pred (arr->grob (i)))
+      return arr->grob (i);
+
+  return 0;
+}
+
 void
 Pointer_group_interface::add_grob (Grob *me, SCM sym, Grob *p)
 {