lilypond-1.1.55
[lilypond.git] / lily / super-element.cc
blob0401602c7ad5248a479c90a32a9db74433e647b2
1 /*
2 super-elem.cc -- implement Super_elem
4 source file of the LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "super-element.hh"
10 #include "line-of-score.hh"
11 #include "p-score.hh"
12 #include "string.hh"
13 #include "paper-outputter.hh"
16 /**
17 for administration of what was done already
19 enum Score_element_status {
20 ORPHAN=0, // not yet added to pstaff
21 VIRGIN, // added to pstaff
22 PREBROKEN,
23 PREBROKEN_SECOND,
24 PRECALCING,
25 PRECALCED, // calcs before spacing done
26 SPACING,
27 SPACED,
28 BROKEN,
29 POSTCALCING, // busy calculating. This is used to trap cyclic deps.
30 POSTCALCED, // after spacing calcs done
31 BREWING,
32 BREWED,
35 void
36 Super_element::pre_processing ()
38 calculate_dependencies (PRECALCED, PRECALCING, &Score_element::do_pre_processing);
41 void
42 Super_element::space_processing ()
44 calculate_dependencies (SPACED, SPACING, &Score_element::do_space_processing);
47 /* for break processing, use only one status, because copies have to
48 have correct status. (Previously,
49 Score_element::handle_[pre]broken_dependencies assigned to status_i_
51 void
52 Super_element::breakable_col_processing ()
54 calculate_dependencies (PREBROKEN, PREBROKEN, &Score_element::do_breakable_col_processing);
55 calculate_dependencies (PREBROKEN_SECOND, PREBROKEN_SECOND, &Score_element::handle_prebroken_dependents);
58 void
59 Super_element::break_processing ()
61 calculate_dependencies (BROKEN, BROKEN, &Score_element::do_break_processing);
63 void
64 Super_element::post_processing ()
66 calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::do_post_processing);
69 void
70 Super_element::output_all ()
72 calculate_dependencies (BREWED, BREWING, &Score_element::output_processing);