]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
*** empty log message ***
[lilypond.git] / lily / grob.cc
index 5ca831a51ae9c0d55788e77bc1b67956c6733631..477577066388d5d2059d8e62044fe4eebc6ac877 100644 (file)
@@ -138,9 +138,6 @@ Grob::Grob (Grob const&s)
 
 Grob::~Grob ()
 {
-  /*
-    do nothing scm-ish and no unprotecting here.
-   */
 }
 
 
@@ -164,13 +161,22 @@ Grob::get_paper ()  const
  return pscore_ ? pscore_->paper_ : 0;
 }
 
+
+/*
+  Recursively track all dependencies of this Grob.  The
+  status_ field is used as a mark-field.  It is marked with
+  BUSY during execution of this function, and marked with FINAL
+  when finished.
+
+  FUNCPTR is the function to call to update this element.
+*/
 void
 Grob::calculate_dependencies (int final, int busy, SCM funcname)
 {
   if (status_ >= final)
     return;
 
-  if (status_== busy)
+  if (status_ == busy)
     {
       programming_error ("Element is busy, come back later");
       return;
@@ -190,13 +196,13 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   if (ly_c_procedure_p (proc))
     scm_call_1 (proc, this->self_scm ());
  
-  status_= final;
+  status_ = final;
 }
 
 Stencil *
 Grob::get_stencil ()  const
 {
-  if (!live ())
+  if (!is_live ())
     {
       return 0;
     }
@@ -207,7 +213,7 @@ Grob::get_stencil ()  const
 
   mol = get_uncached_stencil ();
   
-  if (live ())
+  if (is_live ())
     {
       Grob *me = (Grob*)this;
       me->set_property ("stencil", mol);
@@ -281,7 +287,6 @@ Grob::add_dependency (Grob*e)
     programming_error ("Null dependency added");
 }
 
-
 void
 Grob::handle_broken_dependencies ()
 {
@@ -306,7 +311,7 @@ Grob::handle_broken_dependencies ()
 
   System *system = get_system ();
 
-  if (live ()
+  if (is_live ()
       && system && common_refpoint (system, X_AXIS) && common_refpoint (system, Y_AXIS))
     {
       substitute_mutable_properties (system ? system->self_scm () : SCM_UNDEFINED,
@@ -339,7 +344,7 @@ Grob::handle_broken_dependencies ()
 void
 Grob::suicide ()
 {
-  if (!live ())
+  if (!is_live ())
     return; 
 
   
@@ -592,7 +597,7 @@ Grob::has_offset_callback (SCM cb, Axis a)const
 void
 Grob::set_extent (SCM dc, Axis a)
 {
-  dim_cache_[a].dimension_ =dc;
+  dim_cache_[a].dimension_ = dc;
 }
 
 void