]> git.donarmstrong.com Git - lilypond.git/blob - lily/directional-element-interface.cc
release: 1.3.65
[lilypond.git] / lily / directional-element-interface.cc
1 /*   
2   directional-element.cc -- implement Directional_element
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "directional-element-interface.hh"
11
12
13 Directional_element_interface::Directional_element_interface (Score_element const *s)
14 {
15   elt_l_ =  (Score_element*)s;
16 }
17
18 bool
19 Directional_element_interface::has_interface_b () const
20 {
21   return isdir_b (elt_l_->get_elt_property ("direction"));
22 }
23
24
25   
26
27 Direction
28 Directional_element_interface::get () const
29 {
30   // return dir_;
31   SCM d= elt_l_->get_elt_property ("direction");
32   if (!isdir_b(d))
33     return CENTER;
34       
35   return to_dir (d);
36 }
37
38 void
39 Directional_element_interface::set (Direction d) 
40 {
41   elt_l_->set_elt_property ("direction", gh_int2scm (d));
42 }