~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/include/tie-configuration.hh

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  tie-configuration.hh -- declare Tie_configuration
 
3
 
 
4
  source file of the GNU LilyPond music typesetter
 
5
 
 
6
  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
7
 
 
8
*/
 
9
 
 
10
#ifndef TIE_CONFIGURATION_HH
 
11
#define TIE_CONFIGURATION_HH
 
12
 
 
13
#include "main.hh"
 
14
#include "lily-proto.hh"
 
15
#include "direction.hh"
 
16
#include "interval.hh"
 
17
#include "compare.hh"
 
18
#include "std-vector.hh"
 
19
 
 
20
class Tie_configuration
 
21
{
 
22
#if DEBUG_SLUR_SCORING
 
23
  string score_card_;
 
24
#endif
 
25
  Real score_;
 
26
  bool scored_;
 
27
  friend class Tie_formatting_problem;
 
28
public:
 
29
  Real score () const { return score_; }
 
30
  string card () const { return score_card_; }
 
31
 
 
32
  int position_;
 
33
  Direction dir_;
 
34
  Real delta_y_;
 
35
 
 
36
  /* computed. */
 
37
  Interval attachment_x_;
 
38
 
 
39
  void add_score (Real, string);
 
40
  Tie_configuration ();
 
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
  
 
46
  static int compare (Tie_configuration const &a,
 
47
                      Tie_configuration const &b);
 
48
  static Real distance (Tie_configuration const &a,
 
49
                       Tie_configuration const &b);
 
50
};
 
51
 
 
52
INSTANTIATE_COMPARE (Tie_configuration, Tie_configuration::compare);
 
53
 
 
54
class Ties_configuration : public vector<Tie_configuration>
 
55
{
 
56
  Real score_;
 
57
  string score_card_;
 
58
  bool scored_;
 
59
  vector<string> tie_score_cards_;
 
60
 
 
61
  friend class Tie_formatting_problem;
 
62
public:
 
63
  Ties_configuration ();
 
64
  void add_score (Real amount, string description);
 
65
  void add_tie_score (Real amount, int i, string description);
 
66
  Real score () const;
 
67
  void reset_score ();
 
68
  string card () const; 
 
69
  string tie_card (int i) const { return tie_score_cards_[i]; }
 
70
};
 
71
 
 
72
#endif /* TIE_CONFIGURATION_HH */
 
73
 
 
74
 
 
75