]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/slur-configuration.hh
Run `make grand-replace'.
[lilypond.git] / lily / include / slur-configuration.hh
1 /*
2   slur-configuration.hh -- declare Slur_configuration
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef SLUR_CONFIGURATION_HH
10 #define SLUR_CONFIGURATION_HH
11
12 #include "bezier.hh"
13 #include "lily-proto.hh"
14 #include "std-vector.hh"
15
16
17 enum Configuration_tag
18   {
19     SLUR_STEM = 0x01,
20     SLUR_HEAD = 0x02,
21     SLUR_FREE = 0x04,
22     SLUR_FREE_HEAD = 0x08,
23     SLUR_FREE_STEM = 0x10,
24     SLUR_STEM_TIP = 0x10,
25   };
26
27 class Slur_configuration
28 {
29   Real score_;
30   string score_card_;
31
32 public:
33   Drul_array<Offset> attachment_;
34   Bezier curve_;
35   Real height_;
36   unsigned tags_;
37   int index_;
38
39   Slur_configuration ();
40
41   Real score () const { return score_; }
42   string card () const { return score_card_; } 
43   void add_score (Real, string);
44   
45   void generate_curve (Slur_score_state const &state, Real r0, Real h_inf,
46                        vector<Offset> const &);
47   void calculate_score (Slur_score_state const &);
48 protected:
49   void score_extra_encompass (Slur_score_state const &);
50   void score_slopes (Slur_score_state const &);
51   void score_edges (Slur_score_state const &);
52   void score_encompass (Slur_score_state const &);
53 };
54
55 #endif /* SLUR_CONFIGURATION_HH */
56