]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/tie.hh
oops. Include $CONFIGFILE.make, not
[lilypond.git] / lily / include / tie.hh
1 /*
2   tie.hh -- declare Tie
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef TIE_HH
10 #define TIE_HH
11
12 #include "lily-guile.hh"
13 #include "lily-proto.hh"
14 #include "skyline.hh"
15
16
17
18   
19 class Tie_configuration
20 {
21 public:
22   int position_;
23   Direction dir_;
24   Real delta_y_;
25
26
27   Interval attachment_x_;
28   Grob *tie_;
29   int head_position_;
30   
31   Tie_configuration ();
32   void center_tie_vertically (Tie_details const &);
33   Bezier get_bezier (Tie_details const &) const;
34   Real height (Tie_details const&) const;
35   
36   static int compare (Tie_configuration const &a,
37                       Tie_configuration const &b);
38   static Real distance (Tie_configuration const &a,
39                        Tie_configuration const &b);
40 };
41
42 INSTANTIATE_COMPARE (Tie_configuration, Tie_configuration::compare);
43
44 class Ties_configuration
45 {
46 public:
47   Array<Tie_configuration> ties_;
48
49 };
50
51
52 class Tie
53 {
54 public:
55   static void set_head (Grob *, Direction, Grob *head);
56   static bool has_interface (Grob *);
57   static Grob *head (Grob *, Direction);
58   static int get_column_rank (Grob *, Direction);
59   static int get_position (Grob *);
60   static Direction get_default_dir (Grob *);
61   static void get_configuration (Grob *, Tie_configuration *,
62                                  Tie_formatting_problem const &);
63   static void set_control_points (Grob *, Grob *,
64                                   Tie_configuration const&,
65                                   Tie_details const&);
66   static void set_default_control_points (Grob *);
67   DECLARE_SCHEME_CALLBACK (print, (SCM));
68   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
69   DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
70   DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
71   static int compare (Grob *const &s1,
72                       Grob *const &s2);
73
74   static Interval get_default_attachments (Spanner *me, Grob *common, Real gap,
75                                            int *staff_position, bool *in_between,
76                                            Tie_details const &);
77   
78 };
79
80
81 #endif // TIE_HH