]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/simple-spacer.hh
(struct Simple_spacer): remove
[lilypond.git] / lily / include / simple-spacer.hh
1 /*   
2   simple-spacer.hh -- declare Simple_spacer
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef SIMPLE_SPACER_HH
11 #define SIMPLE_SPACER_HH
12
13 #include "parray.hh"
14 #include "lily-proto.hh"
15
16
17 struct Spring_description
18 {
19   Real ideal_;
20   Real hooke_;
21   bool is_active_;
22   Real block_force_;
23
24   Real length (Real force) const;
25   Spring_description ();
26
27   bool is_sane () const;
28 };
29
30 struct Simple_spacer
31 {
32   Array<Spring_description> springs_;
33   Link_array<Grob> spaced_cols_;
34   Link_array<Grob> loose_cols_;
35   Real force_;
36   Real indent_;
37   Real line_len_;
38   Real default_space_;
39   int active_count_;
40   
41   Simple_spacer ();
42   
43   void solve (Column_x_positions *, bool);
44   void add_columns (Link_array<Grob> const &);
45   void my_solve_linelen ();
46   void my_solve_natural_len ();
47   Real active_springs_stiffness () const;
48   Real range_stiffness (int, int) const;
49   void add_rod (int l, int r, Real dist);
50   Real range_ideal_len (int l, int r) const;
51   Real is_activelocking_force ()const;
52   Real configuration_length ()const;
53   void set_active_states ();
54   bool is_active () const;
55 };
56
57 #endif /* SIMPLE_SPACER_HH */
58