X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fsemi-tie.cc;h=4f3c6b39d81c9bd38af5c5c71a93e10a955d4472;hb=c3323499a4793a10899fcb74a97b0c0866bb4a61;hp=bddae0e2b2330ae7024803445b8609e0f2b7dad0;hpb=9f3572d98bb948c9689cd1f75401a029451fa001;p=lilypond.git diff --git a/lily/semi-tie.cc b/lily/semi-tie.cc index bddae0e2b2..4f3c6b39d8 100644 --- a/lily/semi-tie.cc +++ b/lily/semi-tie.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2005--2006 Han-Wen Nienhuys + (c) 2005--2007 Han-Wen Nienhuys */ @@ -15,25 +15,25 @@ #include "warn.hh" #include "staff-symbol-referencer.hh" -ADD_INTERFACE(Semi_tie, - - "semi-tie-interface", - - "A tie which is only on one side connected to note heads. ", +ADD_INTERFACE (Semi_tie, + "A tie which is only on one side connected to a note head.", /* properties */ "control-points " "direction " "details " + "head-direction " "note-head " "thickness " ); -MAKE_SCHEME_CALLBACK(Semi_tie, calc_control_points, 1) +MAKE_SCHEME_CALLBACK (Semi_tie, calc_control_points, 1) SCM Semi_tie::calc_control_points (SCM smob) { Grob *me = unsmob_grob (smob); + (void) me->get_property ("direction"); + if (Semi_tie_column::has_interface (me->get_parent (Y_AXIS))) { me->get_parent (Y_AXIS)->get_property ("positioning-done"); @@ -43,24 +43,8 @@ Semi_tie::calc_control_points (SCM smob) programming_error ("lv tie without Semi_tie_column. Killing lv tie."); me->suicide (); } - - return SCM_UNSPECIFIED; -} - -MAKE_SCHEME_CALLBACK(Semi_tie, calc_direction, 1) -SCM -Semi_tie::calc_direction (SCM smob) -{ - Grob *me = unsmob_grob (smob); - if (Semi_tie_column::has_interface (me->get_parent (Y_AXIS))) - me->get_parent (Y_AXIS)->get_property("positioning-done"); - else - { - programming_error ("lv tie without Semi_tie_column"); - set_grob_direction (me, UP); - } - return SCM_UNSPECIFIED; + return me->get_property_data ("control-points"); } int @@ -70,10 +54,10 @@ Semi_tie::get_position (Grob *me) return (int) rint (Staff_symbol_referencer::get_position (h)); } -int -Semi_tie::compare (Grob *const &s1, - Grob *const &s2) +bool +Semi_tie::less (Grob *const &s1, + Grob *const &s2) { - return sign (get_position (s1) - get_position (s2)); + return get_position (s1) < get_position (s2); }