--- /dev/null
+/*
+ span-score-bar.hh -- declare Span_score_bar
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef SPAN_SCORE_BAR_HH
+#define SPAN_SCORE_BAR_HH
+
+#include "span-bar.hh"
+
+class Span_score_bar : public Span_bar
+{
+public:
+ NAME_MEMBERS();
+ SCORE_ELEM_CLONE(Span_score_bar);
+ Span_score_bar();
+protected:
+
+
+ virtual void do_pre_processing();
+};
+
+
+class Piano_brace : public Span_score_bar
+{
+public:
+ NAME_MEMBERS();
+ SCORE_ELEM_CLONE(Piano_brace);
+protected:
+ virtual Interval do_width()const;
+ virtual Symbol get_bar_sym(Real) const;
+};
+
+#endif // SPAN_SCORE_BAR_HH
return s;
}
+/*
+ should be handled via TeX code and Lookup::bar()
+ */
Symbol
Lookup::vbrace(Real &y) const
{
int idx = int(rint((y/2.0 - 20 ) + 148));
Symbol s = (*symtables_)("param")->lookup("brace");
-
- Array<String> a;
- a.push(idx);
- s.tex = substitute_args(s.tex,a);
- s.dim.y = Interval(0,y);
+ {
+ Array<String> a;
+ a.push(idx);
+ s.tex = substitute_args(s.tex,a);
+ s.dim.y = Interval(0,y);
+ }
+ {
+ Array<String> a;
+ a.push(print_dimen( y/2 ));
+ a.push(print_dimen(0));
+ a.push(s.tex);
+ s.tex = substitute_args("\\placebox{%}{%}{%}", a);
+ }
+
+
return s;
}
--- /dev/null
+/*
+ span-score-bar.cc -- implement Span_score_bar
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "span-score-bar.hh"
+#include "symbol.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
+
+Span_score_bar::Span_score_bar()
+{
+ type_str_ = "|";
+}
+
+void
+Span_score_bar::do_pre_processing()
+{
+ Span_bar::do_pre_processing();
+
+ if ( break_status_i() != 1) {
+ empty_b_ = transparent_b_ = true;
+ }
+}
+
+
+Symbol
+Piano_brace::get_bar_sym(Real dy)const
+{
+ return paper()->lookup_l()->vbrace(dy);
+}
+Interval
+Piano_brace::do_width()const
+{
+ return Interval(0,0);
+}
+
+IMPLEMENT_STATIC_NAME(Span_score_bar);
+IMPLEMENT_IS_TYPE_B1(Span_score_bar, Span_bar);
+IMPLEMENT_IS_TYPE_B1(Piano_brace, Span_score_bar);
+IMPLEMENT_STATIC_NAME(Piano_brace);
+