/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2012 Jan Nieuwenhuizen <janneke@gnu.org>
+ Copyright (C) 1997--2015 Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "side-position-interface.hh"
#include "directional-element-interface.hh"
#include "lookup.hh"
-#include "tuplet-bracket.hh"
+#include "bracket.hh"
+#include "lily-imports.hh"
/*
this is too complicated. Yet another version of side-positioning,
SCM
Volta_bracket_interface::print (SCM smob)
{
- Spanner *me = unsmob_spanner (smob);
+ Spanner *me = unsmob<Spanner> (smob);
Spanner *orig_span = dynamic_cast<Spanner *> (me->original ());
bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0]
== (Spanner *)me);
Output_def *layout = me->layout ();
- Real half_space = 0.5;
Item *bound = dynamic_cast<Spanner *> (me)->get_bound (LEFT);
Interval empty;
Offset start;
- start[X_AXIS] = me->spanner_length () - left - half_space;
+ start[X_AXIS] = me->spanner_length () - left;
- /*
- ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
- */
Stencil total
- = Tuplet_bracket::make_bracket (me, Y_AXIS, start,
- edge_height, empty, flare, shorten);
+ = Bracket::make_bracket (me, Y_AXIS, start, edge_height, empty,
+ flare, shorten);
if (!orig_span || broken_first_bracket)
{
SCM properties = me->get_property_alist_chain (SCM_EOL);
SCM snum = Text_interface::interpret_markup (layout->self_scm (),
properties, text);
- Stencil num = *unsmob_stencil (snum);
+ Stencil num = *unsmob<Stencil> (snum);
num.align_to (Y_AXIS, UP);
num.translate_axis (-0.5, Y_AXIS);
total.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
else
str = "|";
- no_vertical_end
- |= (str != ":|"
- && str != "|:"
- && str != "|."
- && str != ":|:"
- && str != ":|.|:"
- && str != ":|.:"
- && str != ".|");
+ no_vertical_end |= ly_scm2bool (Lily::volta_bracket_calc_hook_visibility
+ (ly_string2scm (str)));
if (no_vertical_end || no_vertical_start)
{
"bars "
"thickness "
"height "
+ "shorten-pair "
);