]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/axis-group-element.hh
release: 1.2.4
[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 #include "graphical-axis-group.hh"
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                            public virtual Graphical_axis_group
22 {
23   Link_array<Score_element> extra_elems_;
24
25 protected:
26   virtual void do_print() const;
27   virtual Link_array<Score_element> get_extra_dependencies() const;
28   void purge_extra ();
29
30   virtual void do_substitute_element_pointer (Score_element*,Score_element*);
31   virtual Link_array<Score_element> elem_l_arr() const;
32   
33   virtual Interval do_height () const;
34   virtual Interval do_width () const;
35
36
37   Interval extra_extent (Axis a) const;
38
39  
40 public:
41   /**
42     Override Graphical_axis_group::extent: make sure that
43     Graphical_element::extent() is used as the public entry point.  */
44   Interval extent (Axis a) const;
45
46   /**
47      add an element that only influences size, but does not have  X/Y parent
48      relationship with THIS.
49   */
50   void add_extra_element (Score_element*);
51
52
53   Axis_group_element ();
54   virtual void set_axes (Axis,Axis);
55
56   virtual Link_array<Score_element> get_children ();
57 };
58
59 #endif // AXIS_GROUP_ELEMENT_HH