2 pointer-group-interface.hh -- declare Pointer_group_interface
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #ifndef POINTER_GROUP_INTERFACE_HH
10 #define POINTER_GROUP_INTERFACE_HH
12 #include "std-vector.hh"
13 #include "lily-proto.hh"
14 #include "lily-guile.hh"
16 struct Pointer_group_interface
19 static int count (Grob *, SCM);
20 static void add_grob (Grob *, SCM nm, Grob *e);
21 static void add_grob (Grob *, SCM nm, SCM x);
22 static void add_unordered_grob (Grob *, SCM nm, Grob *);
23 static void set_ordered (Grob *, SCM, bool);
24 static Grob_array *get_grob_array (Grob*, SCM);
25 static Grob *find_grob (Grob*, SCM, bool (*pred) (Grob*));
28 vector<Grob*> const &internal_extract_grob_array (Grob const *elt, SCM symbol);
29 vector<Item*> internal_extract_item_array (Grob const *elt, SCM symbol);
31 #define extract_grob_array(x, prop) internal_extract_grob_array (x, ly_symbol2scm (prop))
32 #define extract_item_array(x, prop) internal_extract_item_array (x, ly_symbol2scm (prop))
35 This is dubious coding style, but lets not risk that we change the
36 representation of grob sets again.
38 #define extract_grob_set(grob, prop, set) \
39 vector<Grob*> const &set (internal_extract_grob_array (grob, ly_symbol2scm (prop)))
40 #define extract_item_set(grob, prop, set) \
41 vector<Item*> set (internal_extract_item_array (grob, ly_symbol2scm (prop)))
43 #endif /* POINTER_GROUP_INTERFACE_HH */