2 group-interface.hh -- declare Group_interface
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef GROUP_INTERFACE_HH
11 #define GROUP_INTERFACE_HH
13 #include "lily-proto.hh"
15 #include "lily-guile.hh"
19 Look at Score element ELT as thing which has a list property called
20 NAME_. Normally the list would contain Grobs, but
21 sometimes it can be different things.
23 todo: reename as list_interface?
26 struct Group_interface
29 static int count (Grob* , String);
30 static void add_thing (Grob*, String nm, SCM);
33 struct Pointer_group_interface : public Group_interface {
35 static void add_element (Grob*, String nm, Grob*e);
38 Put all score elements of ELT's property called NAME into an array,
42 Pointer_group_interface__extract_elements (Grob const *elt, T *, const char* name)
46 for (SCM s = elt->get_grob_property (name); gh_pair_p (s); s = gh_cdr (s))
49 arr.push (dynamic_cast<T*> (unsmob_grob (e)));
59 #endif /* GROUP_INTERFACE_HH */