#include <set>
#include <map>
-using namespace std;
#include "accidental-interface.hh"
#include "accidental-placement.hh"
#include "warn.hh"
#include "unpure-pure-container.hh"
+using std::set;
+using std::string;
+using std::vector;
+
void
Side_position_interface::add_support (Grob *me, Grob *e)
{
for (vsize i = 0; i < proto_support.size (); i++)
{
- if (Accidental_placement::has_interface (proto_support[i]))
+ if (has_interface<Accidental_placement> (proto_support[i]))
{
Grob *accs = proto_support[i];
for (SCM acs = accs->get_object ("accidental-grobs"); scm_is_pair (acs);
continue; // so 'me' may not move in response to 'e'
if (a == Y_AXIS
- && Stem::has_interface (e))
+ && has_interface<Stem> (e))
{
// If called as 'pure' we may not force a stem to set its direction,
if (pure && !is_direction (e->get_property_data ("direction")))
: e->maybe_pure_coordinate (common[Y_AXIS], Y_AXIS, pure, start, end);
Skyline_pair copy = *unsmob<Skyline_pair> (sp);
if (a == Y_AXIS
- && Stem::has_interface (e)
+ && has_interface<Stem> (e)
&& to_boolean (me->get_maybe_pure_property ("add-stem-support", pure, start, end)))
copy[dir].set_minimum_height (copy[dir].max_height ());
copy.shift (a == X_AXIS ? yc : xc);
total_off = minimum_space * dir;
if (current_off)
- total_off = dir * max (dir * total_off,
+ total_off = dir * std::max (dir * total_off,
dir * (*current_off));
/* FIXME: 1000 should relate to paper size. */
staff_span.widen (1);
if (staff_span.contains (position)
/* If we are between notehead and staff, quantize for ledger lines. */
- || (Note_head::has_interface (head)
+ || (has_interface<Note_head> (head)
&& dir * position < 0))
{
total_off += (rounded - position) * 0.5 * ss;
Real diff = (dir * staff_extent[dir] + staff_padding
- dir * total_off
+ dir * (staff_position - parent_position));
- total_off += dir * max (diff, 0.0);
+ total_off += dir * std::max (diff, 0.0);
}
}
return scm_from_double (total_off);