#include "side-position-interface.hh"
#include "axis-group-interface.hh"
#include "stem.hh"
+#include "pointer-group-interface.hh"
/*
TODO: let Dot_column communicate with stem via Note_column.
Dot_column::force_shift_callback (SCM element_smob, SCM axis)
{
Grob *me = unsmob_grob (element_smob);
- Axis a = (Axis) scm_to_int (axis);
- assert (a == Y_AXIS);
+ (void) axis;
+ assert (scm_to_int (axis) == Y_AXIS);
me = me->get_parent (X_AXIS);
if (!to_boolean (me->get_property ("positioning-done")))
do_shifts (me);
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
MAKE_SCHEME_CALLBACK (Dot_column, side_position, 2);
Dot_column::side_position (SCM element_smob, SCM axis)
{
Grob *me = unsmob_grob (element_smob);
- Axis a = (Axis) scm_to_int (axis);
- assert (a == X_AXIS);
+ (void) axis;
+ assert (scm_to_int (axis) == X_AXIS);
- Grob *stem = unsmob_grob (me->get_property ("stem"));
+ Grob *stem = unsmob_grob (me->get_object ("stem"));
if (stem
&& !Stem::get_beam (stem)
&& Stem::duration_log (stem) > 2
}
};
-typedef std::map < int, Dot_position> Dot_configuration;
+typedef std::map<int, Dot_position> Dot_configuration;
/*
Value CFG according.
else
{
if (new_cfg.find (p) == new_cfg.end ())
- {
- offset = 0;
- }
+ offset = 0;
new_cfg[p + offset] = i->second;
}
}
else
{
if (new_cfg.find (p) == new_cfg.end ())
- {
- offset = 0;
- }
+ offset = 0;
new_cfg[p + offset] = i->second;
}
Dot_column::do_shifts (Grob *me)
{
Link_array<Grob> dots
- = extract_grob_array (me, ly_symbol2scm ("dots"));
+ = extract_grob_array (me, "dots");
{ /*
Trigger note collision resolution first, since that may kill off
Grob *note = dots[i]->get_parent (Y_AXIS);
if (note)
{
- Grob *stem = unsmob_grob (note->get_property ("stem"));
+ Grob *stem = unsmob_grob (note->get_object ("stem"));
if (stem)
dp.extremal_head_ = Stem::first_head (stem) == note;
}
for (Dot_configuration::const_iterator i (cfg.begin ());
i != cfg.end (); i++)
- {
- Staff_symbol_referencer::set_position (i->second.dot_, i->first);
- }
+ Staff_symbol_referencer::set_position (i->second.dot_, i->first);
return SCM_UNSPECIFIED;
}
void
Dot_column::add_head (Grob *me, Grob *rh)
{
- Grob *d = unsmob_grob (rh->get_property ("dot"));
+ Grob *d = unsmob_grob (rh->get_object ("dot"));
if (d)
{
Side_position_interface::add_support (me, rh);
}
}
-
ADD_INTERFACE (Dot_column, "dot-column-interface",
"Groups dot objects so they form a column, and position dots so they do not "
"clash with staff lines ",