*** empty log message ***
[lilypond.git] / lily / directional-element-interface.cc
blobdaf19d91a5c7607c716bb7151f82fee406cad4bf
1 /*
2 directional-element.cc -- implement Directional_element
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #include "directional-element-interface.hh"
15 bool
16 Directional_element_interface::has_interface (Grob*me)
18 return ly_dir_p (me->get_grob_property ("direction"));
21 Direction
22 Directional_element_interface::get (Grob*me)
24 // return dir_;
25 SCM d= me->get_grob_property ("direction");
26 if (!ly_dir_p (d))
27 return CENTER;
29 return to_dir (d);
32 void
33 Directional_element_interface::set (Grob*me, Direction d)
35 SCM sd = gh_int2scm (d);
38 Vain attempt to save some conses.
40 if (me->get_grob_property ("direction") != sd)
41 me->set_grob_property ("direction", sd);