/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1999--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1999--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
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 <map>
+using std::map;
+using std::vector;
+
typedef map<Grob *, vector <Grob *> > Grob_scripts_map;
void
return;
Pointer_group_interface::add_grob (me, ly_symbol2scm ("scripts"), script);
+ script->set_object ("script-column", me->self_scm ());
}
LY_DEFINE (ly_grob_script_priority_less, "ly:grob-script-priority-less",
2, 0, 0, (SCM a, SCM b),
"Compare two grobs by script priority. For internal use.")
{
- Grob *i1 = unsmob_grob (a);
- Grob *i2 = unsmob_grob (b);
+ Grob *i1 = unsmob<Grob> (a);
+ Grob *i2 = unsmob<Grob> (b);
SCM p1 = i1->get_property ("script-priority");
SCM p2 = i2->get_property ("script-priority");
SCM
Script_column::row_before_line_breaking (SCM smob)
{
- Grob *me = unsmob_grob (smob);
+ Grob *me = unsmob<Grob> (smob);
vector<Grob *> horizontal_grobs;
extract_grob_set (me, "scripts", scripts);
/*
Don't want to consider scripts horizontally next to notes.
*/
- if (Accidental_placement::has_interface (sc)
- || Arpeggio::has_interface (sc))
+ if (has_interface<Accidental_placement> (sc)
+ || has_interface<Arpeggio> (sc))
{
affect_all_grobs.push_back (sc);
}
SCM
Script_column::before_line_breaking (SCM smob)
{
- Grob *me = unsmob_grob (smob);
+ Grob *me = unsmob<Grob> (smob);
vector<Grob *> staff_sided;
extract_grob_set (me, "scripts", scripts);
for (SCM s = ss; scm_is_pair (s);
s = scm_cdr (s), last = g, last_initial_outside_staff = initial_outside_staff)
{
- g = unsmob_grob (scm_car (s));
+ g = unsmob<Grob> (scm_car (s));
initial_outside_staff = g->get_property ("outside-staff-priority");
if (last) //not the first grob in the list
{
*/
if (!scm_is_number (last_outside_staff))
for (SCM t = ss; !scm_is_eq (t, s); t = scm_cdr (t))
- Side_position_interface::add_support (g, unsmob_grob (scm_car (t)));
+ Side_position_interface::add_support (g, unsmob<Grob> (scm_car (t)));
/*
if outside_staff_priority is missing or is equal to original
outside_staff_priority of previous grob, set new
" @code{script-priority} and @code{outside-staff-priority}.",
/* properties */
- ""
+ "scripts "
);