]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/directional-element-interface.cc
* mf/GNUmakefile: always trace pfa fonts.
[lilypond.git] / lily / directional-element-interface.cc
index 7075e2e44f41981fbdd5849a3a25f3c0244752a4..dec6d49ce3a52dde394cc5495dc21097d8a713d3 100644 (file)
@@ -3,35 +3,27 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "directional-element-interface.hh"
 
 
-SCM Directional_element_interface::direction_sym;
-
-static void
-init_functions ()
-{
-  Directional_element_interface::direction_sym = scm_permanent_object (ly_symbol2scm ("direction"));
-}
-ADD_SCM_INIT_FUNC(Directional, init_functions);
 
 
 bool
 Directional_element_interface::has_interface (Grob*me) 
 {
-  return isdir_b (me->get_grob_property (direction_sym));
+  return is_direction (me->get_grob_property ("direction"));
 }
 
 Direction
 Directional_element_interface::get (Grob*me) 
 {
   // return dir_;
-  SCM d= me->get_grob_property (direction_sym);
-  if (!isdir_b(d))
+  SCM d= me->get_grob_property ("direction");
+  if (!is_direction (d))
     return CENTER;
       
   return to_dir (d);
@@ -42,6 +34,9 @@ Directional_element_interface::set (Grob*me, Direction d)
 {
   SCM sd = gh_int2scm (d);
 
-  if (me->get_grob_property (direction_sym) != sd)
-    me->set_grob_property (direction_sym, sd);
+  /*
+    Vain attempt to save some conses.
+   */
+  if (me->get_grob_property ("direction") != sd)
+    me->set_grob_property ("direction", sd);
 }