]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-column.cc
* flower
[lilypond.git] / lily / paper-column.cc
index 8cf2a108f2880f5a4d268fb324d882f49cd38ec5..14de60d2dcebd156f0607748ea43beb23c8364e7 100644 (file)
 #include "font-interface.hh"
 #include "output-def.hh"
 
-Grob * 
+Grob *
 Paper_column::clone (int count) const
 {
   return new Paper_column (*this, count);
 }
 
-
 ADD_INTERFACE (Paper_column, "paper-column-interface",
               "@code{Paper_column} objects form the top-most X-parents for items. "
               "  The are two types of columns: musical columns, where are attached to, and "
@@ -37,8 +36,7 @@ ADD_INTERFACE (Paper_column, "paper-column-interface",
               "  Since many columns go unused, you should only use the rank field to\n"
               "  get ordering information.  Two adjacent columns may have\n"
               "  non-adjacent numbers.\n"
-              "\n"
-              ,
+              "\n",
               "between-cols when bounded-by-me "
               "page-penalty shortest-playing-duration shortest-starter-duration");
 
@@ -49,41 +47,38 @@ Paper_column::do_break_processing ()
   Item::do_break_processing ();
 }
 
-
 int
-Paper_column::get_rank (Grob*me) 
+Paper_column::get_rank (Grob *me)
 {
-  return dynamic_cast<Paper_column*> (me)->rank_;
+  return dynamic_cast<Paper_column *> (me)->rank_;
 }
 
-System*
+System *
 Paper_column::get_system () const
 {
   return system_;
 }
 
-Paper_column*
+Paper_column *
 Paper_column::get_column () const
 {
-  return (Paper_column*) (this);
+  return (Paper_column *) (this);
 }
 
-Paper_column::Paper_column (SCM l, Object_key const*key)
+Paper_column::Paper_column (SCM l, Object_key const *key)
   : Item (l, key)              // guh.?
 {
   system_ = 0;
   rank_ = -1;
 }
 
-
-Paper_column::Paper_column (Paper_column const& src, int count)
+Paper_column::Paper_column (Paper_column const &src, int count)
   : Item (src, count)
 {
   system_ = 0;
   rank_ = src.rank_;
 }
 
-
 Moment
 Paper_column::when_mom (Grob *me)
 {
@@ -104,19 +99,17 @@ Paper_column::is_musical (Grob *me)
     }
   return s != Moment (0);
 }
-  
 
 bool
-Paper_column::is_used (Grob*me)
+Paper_column::is_used (Grob *me)
 {
-  return scm_is_pair (me->get_property ("elements")) ||  Item::is_breakable (me)
-    || scm_is_pair (me->get_property ("bounded-by-me"))
-    ;
+  return scm_is_pair (me->get_property ("elements")) || Item::is_breakable (me)
+    || scm_is_pair (me->get_property ("bounded-by-me"));
 }
 
 /*
-  Print a vertical line and  the rank number, to aid debugging.  
- */
+  Print a vertical line and  the rank number, to aid debugging.
+*/
 
 MAKE_SCHEME_CALLBACK (Paper_column, print, 1);
 SCM
@@ -128,17 +121,17 @@ Paper_column::print (SCM p)
   SCM properties = Font_interface::text_font_alist_chain (me);
 
   SCM scm_mol = Text_interface::interpret_markup (me->get_layout ()->self_scm (),
-                                            properties,
-                                            scm_makfrom0str (r.to_str0 ()));
+                                                 properties,
+                                                 scm_makfrom0str (r.to_str0 ()));
   Stencil t = *unsmob_stencil (scm_mol);
   t.align_to (X_AXIS, CENTER);
   t.align_to (Y_AXIS, DOWN);
-  
+
   Stencil l = Lookup::filled_box (Box (Interval (-0.01, 0.01),
                                       Interval (-2, -1)));
 
   t.add_stencil (l);
-  return t.smobbed_copy ();                                            
+  return t.smobbed_copy ();
 }
 
 /*
@@ -146,8 +139,8 @@ Paper_column::print (SCM p)
   columns are kept "alive". Unfortunately, when spanners are suicided,
   this falls apart again. (sigh.)
 
-  THIS IS BROKEN KLUDGE. WE SHOULD INVENT SOMETHING BETTER. 
- */
+  THIS IS BROKEN KLUDGE. WE SHOULD INVENT SOMETHING BETTER.
+*/
 MAKE_SCHEME_CALLBACK (Paper_column, before_line_breaking, 1);
 SCM
 Paper_column::before_line_breaking (SCM grob)
@@ -159,7 +152,7 @@ Paper_column::before_line_breaking (SCM grob)
 
   while (scm_is_pair (*ptrptr))
     {
-      Grob * g = unsmob_grob (scm_car (*ptrptr));
+      Grob *g = unsmob_grob (scm_car (*ptrptr));
 
       if (!g || !g->is_live ())
        {