using namespace std;
#include "dots.hh"
+#include "dot-column.hh"
#include "rhythmic-head.hh"
#include "staff-symbol-referencer.hh"
#include "directional-element-interface.hh"
#include "side-position-interface.hh"
#include "axis-group-interface.hh"
#include "stem.hh"
+#include "grob.hh"
#include "pointer-group-interface.hh"
/*
Dot_column::side_position (SCM smob)
{
Grob *me = unsmob_grob (smob);
- Grob *stem = unsmob_grob (me->get_object ("stem"));
- if (stem
- && !Stem::get_beam (stem)
- && Stem::duration_log (stem) > 2
- && !Stem::is_invisible (stem))
+ extract_grob_set (me, "dots", dots);
+
+ for (vsize i = 0; i < dots.size (); i++)
{
- /*
- trigger stem end & direction calculation.
-
- This will add the stem to the support if a flag collision happens.
- */
- stem->get_property ("stem-end-position");
+ Grob *head = dots[i]->get_parent (Y_AXIS);
+ Grob *stem = head ? unsmob_grob (head->get_object ("stem")) : 0;
+ if (stem
+ && !Stem::get_beam (stem)
+ && Stem::duration_log (stem) > 2
+ && !Stem::is_invisible (stem))
+ {
+ /*
+ trigger stem end & direction calculation.
+
+ This will add the stem to the support if a flag collision happens.
+ */
+ stem->get_property ("stem-end-position");
+ }
}
-
- return Side_position_interface::x_aligned_side (smob);
+
+ return Side_position_interface::x_aligned_side (smob, SCM_EOL);
}
struct Dot_position
dot_ = 0;
pos_ = 0;
dir_ = CENTER;
+ extremal_head_ = false;
}
};
}
}
- vector_sort (dots, &compare_position);
+ vector_sort (dots, position_less);
for (vsize i = dots.size (); i--;)
if (!dots[i]->is_live ())
dots.erase (dots.begin () + i);
}
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 ",
/* properties */
+ "dots "
"positioning-done "
"direction "
- "stem");
+ );