2 super-elem.cc -- implement Super_elem
4 source file of the LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "super-element.hh"
10 #include "line-of-score.hh"
13 #include "paper-outputter.hh"
16 Super_element::Super_element()
24 for administration of what was done already
26 enum Score_element_status {
27 ORPHAN=0, // not yet added to pstaff
28 VIRGIN, // added to pstaff
31 PRECALCED, // calcs before spacing done
35 POSTCALCING, // busy calculating. This is used to trap cyclic deps.
36 POSTCALCED, // after spacing calcs done
44 Super_element::pre_processing ()
46 calculate_dependencies (PRECALCING, PRECALCED, &Score_element::do_pre_processing);
50 Super_element::space_processing ()
52 calculate_dependencies (SPACING, SPACED, &Score_element::do_space_processing);
55 /* for break processing, use only one status, because copies have to
56 have correct status. (Previously,
57 Score_element::handle_[pre]broken_dependencies assigned to status_i_
60 Super_element::breakable_col_processing ()
62 calculate_dependencies (PREBROKEN, PREBROKEN, &Score_element::do_breakable_col_processing);
66 Super_element::break_processing ()
68 calculate_dependencies (BROKEN, BROKEN, &Score_element::do_break_processing);
71 Super_element::post_processing ()
73 calculate_dependencies (POSTCALCING, POSTCALCED, &Score_element::do_post_processing);
77 Super_element::output_all ()
79 pscore_l_->outputter_l_->start_line ();
80 calculate_dependencies (BREWING, BREWED, &Score_element::do_brew_molecule);
81 pscore_l_->outputter_l_->stop_line ();
87 Super_element::unlink_all ()
89 calculate_dependencies (UNLINKING, UNLINKED, &Score_element::junk_links);