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>
11 #include "molecule.hh"
12 #include "paper-def.hh"
19 set_elt_property (breakable_scm_sym
, SCM_BOOL_T
);
24 Bar::do_print () const
32 DOUT
<< "type = " << s
;
37 Bar::get_bar_size () const
39 return paper_l ()->get_var ("barsize");
44 Bar::do_brew_molecule_p () const
46 Molecule
*output
= new Molecule (lookup_l ()->bar (type_str_
, get_bar_size ()));
52 Prescriptions for splitting bars.
53 TODO: put this in SCM.
55 static char const *bar_breaks
[][3] ={
64 {"", "scorebar", "scorepostbreak"},
71 Bar::do_pre_processing ()
73 for (int i
=0; bar_breaks
[i
][0]; i
++)
75 if (bar_breaks
[i
][1] == type_str_
)
77 type_str_
= bar_breaks
[i
][break_status_dir ()+1];
81 if (remove_elt_property (at_line_start_scm_sym
)!= SCM_BOOL_F
82 && (break_status_dir () == RIGHT
) && (type_str_
== ""))
88 dim_cache_
[X_AXIS
]->set_empty (true);