2 directional-element.cc -- implement Directional_element
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "directional-element-interface.hh"
13 SCM
Directional_element_interface::direction_sym
;
18 Directional_element_interface::direction_sym
= scm_permanent_object (ly_symbol2scm ("direction"));
20 ADD_SCM_INIT_FUNC (Directional
, init_functions
);
24 Directional_element_interface::has_interface (Grob
*me
)
26 return isdir_b (me
->get_grob_property (direction_sym
));
30 Directional_element_interface::get (Grob
*me
)
33 SCM d
= me
->get_grob_property (direction_sym
);
41 Directional_element_interface::set (Grob
*me
, Direction d
)
43 SCM sd
= gh_int2scm (d
);
45 if (me
->get_grob_property (direction_sym
) != sd
)
46 me
->set_grob_property (direction_sym
, sd
);