]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/axis-group-element.hh
d2ea0b96ea885cfc22073919e0cbd5d7e02245c2
[lilypond.git] / lily / include / axis-group-element.hh
1 /*
2   axis-group-element.hh -- declare Axis_group_element
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef AXIS_GROUP_ELEMENT_HH
11 #define AXIS_GROUP_ELEMENT_HH
12
13 #include "score-element.hh"
14
15
16 /** 
17   Treat a group of elements a unity in either or both axis sense .
18   This is a wrapper around Axis_group_administration
19   */
20 class Axis_group_element : public virtual Score_element
21 {
22   Link_array<Score_element> extra_elems_;
23
24   /// modify fields of E for removal.
25   void do_remove (Score_element*e);
26   void purge_extra ();
27
28
29
30 protected:
31   virtual Link_array<Score_element> get_extra_dependencies() const;
32   virtual Link_array<Score_element> elem_l_arr() const;
33   static Interval extent_callback (Dimension_cache const*);
34   
35
36
37   Interval extra_extent (Axis a) const;
38 public:
39   // keep array in order.
40   bool ordered_b_;              
41   Link_array<Score_element> elem_l_arr_;
42   Axis axes_[2];
43     
44   Interval my_extent (Axis) const;
45
46
47
48   bool contains_b (Score_element const *) const;
49   void add_element (Score_element*);
50
51   /**
52      add an element that only influences size, but does not have  X/Y parent
53      relationship with THIS.
54   */
55   void add_extra_element (Score_element*);
56
57
58   Axis_group_element ();
59   void set_axes (Axis,Axis);
60
61   Link_array<Score_element> get_children ();
62 };
63
64 #endif // AXIS_GROUP_ELEMENT_HH