2 tie-configuration.hh -- declare Tie_configuration
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #ifndef TIE_CONFIGURATION_HH
11 #define TIE_CONFIGURATION_HH
13 #include "direction.hh"
14 #include "interval.hh"
15 #include "std-vector.hh"
16 #include "main.hh" // DEBUG_SLUR_SCORING
18 class Tie_configuration
20 #if DEBUG_SLUR_SCORING
25 friend class Tie_formatting_problem;
28 Real score () const { return score_; }
29 string card () const { return score_card_; }
34 Drul_array<int> column_ranks_;
37 Interval attachment_x_;
39 void add_score (Real, string);
41 void center_tie_vertically (Tie_details const &);
42 Bezier get_transformed_bezier (Tie_details const &) const;
43 Bezier get_untransformed_bezier (Tie_details const &) const;
44 Real height (Tie_details const&) const;
45 int column_span_length () const;
47 static int compare (Tie_configuration const &a,
48 Tie_configuration const &b);
49 static Real distance (Tie_configuration const &a,
50 Tie_configuration const &b);
53 INSTANTIATE_COMPARE (Tie_configuration, Tie_configuration::compare);
55 class Ties_configuration : public vector<Tie_configuration>
60 vector<string> tie_score_cards_;
62 friend class Tie_formatting_problem;
64 Ties_configuration ();
65 void add_score (Real amount, string description);
66 void add_tie_score (Real amount, int i, string description);
70 string tie_card (int i) const { return tie_score_cards_[i]; }
71 string complete_tie_card (vsize i) const;
72 string complete_score_card () const;
75 #endif /* TIE_CONFIGURATION_HH */