]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/axis-group-element.hh
release: 1.3.10
[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   /// modify fields of E for removal.
23   void do_remove (Score_element*e);
24   void purge_extra ();
25
26
27
28 protected:
29   virtual Link_array<Score_element> get_extra_dependencies() const;
30   virtual Link_array<Score_element> elem_l_arr() const;
31   static Interval extent_callback (Dimension_cache const*);
32   
33
34
35   Interval extra_extent (Axis a) const;
36 public:
37   // keep array in order.
38   bool ordered_b_;              
39   Axis axes_[2];
40     
41   Interval my_extent (Axis) const;
42
43
44
45   bool contains_b (Score_element const *) const;
46   void add_element (Score_element*);
47
48   /**
49      add an element that only influences size, but does not have  X/Y parent
50      relationship with THIS.
51   */
52   void add_extra_element (Score_element*);
53
54
55   Axis_group_element ();
56   void set_axes (Axis,Axis);
57
58   Link_array<Score_element> get_children ();
59 };
60
61 #endif // AXIS_GROUP_ELEMENT_HH