lilypond-1.5.9
[lilypond.git] / lily / directional-element.cc
blob4cc5ebb52f1ae2a3b416ab01fd7e72ece015df41
1 /*
2 directional-element.cc -- implement Directional_element
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #include "directional-element-interface.hh"
13 Directional_element_interface::Directional_element_interface (Score_element const *s)
15 elt_l_ = (Score_element*)s;
18 bool
19 Directional_element_interface::has_interface_b () const
21 return isdir_b (elt_l_->get_elt_property ("direction"));
27 Direction
28 Directional_element_interface::get () const
30 // return dir_;
31 SCM d= elt_l_->get_elt_property ("direction");
32 if (!isdir_b(d))
33 return CENTER;
35 return to_dir (d);
38 void
39 Directional_element_interface::set (Direction d)
41 elt_l_->set_elt_property ("direction", gh_int2scm (d));
44 Directional_element_interface
45 directional_element (Score_element const*s)
47 return s;