]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/dot-configuration.hh
a7ab09fab3fc0ea3b48402f4211a19e9dd2eef6f
[lilypond.git] / lily / include / dot-configuration.hh
1 /*
2   dot-configuration.hh -- declare Dot_configuration
3
4   Source file of the GNU LilyPond music typesetter.  Distributed under
5   terms of the GNU General Public License.  LilyPond comes with NO
6   WARRANTY.
7
8   (c) 2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 */
10
11 #ifndef DOT_CONFIGURATION_HH
12 #define DOT_CONFIGURATION_HH
13
14 #include "lily-proto.hh"
15 #include "direction.hh"
16 #include "box.hh"
17
18 #include <map>
19
20 struct Dot_position
21 {
22   int pos_;
23   Direction dir_;
24   Grob *dot_;
25   Box dot_extents_;
26   bool extremal_head_;
27   Interval x_extent_;
28   
29   Dot_position ()
30   {
31     dot_ = 0;
32     pos_ = 0;
33     dir_ = CENTER;
34     extremal_head_ = false;
35   }
36 };
37
38 struct Dot_configuration : public map<int, Dot_position>
39 {
40   Dot_formatting_problem const *problem_;
41   
42   Dot_configuration (Dot_formatting_problem const &);
43   Real x_offset () const;
44   int badness () const;
45   void print () const;
46   Dot_configuration shifted (int k, Direction d) const;
47   void remove_collision (int p);
48 };
49
50 #endif