2 bar.cc -- implement Bar
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "dimension-cache.hh"
12 #include "molecule.hh"
13 #include "paper-def.hh"
20 set_elt_property ("breakable", SCM_BOOL_T);
25 Bar::do_print () const
29 DEBUG_OUT << "type = " << s;
34 Bar::get_bar_size () const
42 Bar::do_brew_molecule_p () const
44 Molecule *output = new Molecule (lookup_l ()->bar (type_str_, get_bar_size (), paper_l ()));
50 Prescriptions for splitting bars.
51 TODO: put this in SCM.
53 static char const *bar_breaks[][3] ={
62 {"", "scorebar", "scorepostbreak"},
63 {"", "brace", "brace"},
64 {"", "bracket", "bracket"},
69 Bar::do_pre_processing ()
71 for (int i=0; bar_breaks[i][0]; i++)
73 if (bar_breaks[i][1] == type_str_)
75 type_str_ = bar_breaks[i][break_status_dir ()+1];
81 if (remove_elt_property ("at-line-start") == SCM_BOOL_T // UGR.
82 && (break_status_dir () == RIGHT) && (type_str_ == ""))
88 set_empty (true, X_AXIS);