Correct left text alignment of DynamicTextSpanner.
[lilypond.git] / lily / include / grob-array.hh
blobf0eb32d01d44df6e6577402c0c630a323af0bf6b
1 /*
2 grob-array.hh -- declare Grob_array
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #ifndef GROB_ARRAY_HH
10 #define GROB_ARRAY_HH
12 #include "lily-proto.hh"
13 #include "smobs.hh"
14 #include "std-vector.hh"
16 class Grob_array
18 vector<Grob*> grobs_;
19 bool ordered_;
21 DECLARE_SIMPLE_SMOBS (Grob_array);
23 Grob_array ();
24 public:
25 bool ordered () const { return ordered_; }
26 void set_ordered (bool b) { ordered_ = b; }
27 Item *item (vsize i);
28 Spanner *spanner (vsize i);
29 Grob *grob (vsize i) { return grobs_.at (i); }
30 vsize size () const { return grobs_.size (); }
31 bool empty () const;
32 void remove_duplicates ();
33 void clear ();
34 void add (Grob *x) { grobs_.push_back (x); }
35 void set_array (vector<Grob*> const &src);
36 vector<Grob*> &array_reference ();
37 vector<Grob*> const &array () const;
38 static SCM make_array ();
41 DECLARE_UNSMOB (Grob_array, grob_array);
43 vector<Grob*> const &ly_scm2link_array (SCM x);
44 SCM grob_list_to_grob_array (SCM lst);
46 #endif /* GROB_ARRAY_HH */