source file of the GNU LilyPond music typesetter
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "bar.hh"
#include "lookup.hh"
#include "debug.hh"
-Bar::Bar()
+
+Bar::Bar ()
{
breakable_b_ = true;
type_str_ = "|";
+ at_line_start_b_ = false;
}
-
-
-IMPLEMENT_IS_TYPE_B1(Bar,Item);
-
void
-Bar::do_print() const
+Bar::do_print () const
{
#ifndef NPRINT
DOUT << type_str_;
}
Molecule*
-Bar::brew_molecule_p() const
+Bar::do_brew_molecule_p () const
{
- Paper_def *p = paper();
- Atom s = p->lookup_l()->bar (type_str_,
- p->get_var ("barsize"));
+ Paper_def *p = paper ();
+ Molecule *output = new Molecule (lookup_l ()->bar (type_str_, p->get_var ("barsize")));
- Molecule*output = new Molecule (Atom (s));
return output;
}
{"|", "|", ""},
{"", "|s", "|"},
{"", "|:", "|:"},
- {"||.", "||.", ""},
+ {"|.", "|.", ""},
{":|", ":|", ""},
+ {"||", "||", ""},
+ {".|.", ".|.", ""},
+ {"", "scorebar", "|"},
+ {"", "{", "{"},
+ {"", "[", "["},
{0,0,0}
};
void
-Bar::do_pre_processing()
+Bar::do_pre_processing ()
{
for (int i=0; bar_breaks[i][0]; i++)
{
if (bar_breaks[i][1] == type_str_)
- type_str_ = bar_breaks[i][break_status_i()+1];
+ {
+ type_str_ = bar_breaks[i][break_status_dir ()+1];
+ if (at_line_start_b_ && (break_status_dir_ == 1) && (type_str_ == ""))
+ {
+ type_str_ = "|";
+ }
+ }
}
/*