]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/grob.hh
(Paper_column): copy rank_. This fixes
[lilypond.git] / lily / include / grob.hh
index e3506c4071c9b867663757a71e16799d92877ab3..17b6cfa4756f7e72becfb96085d9adb36c11691c 100644 (file)
@@ -9,19 +9,16 @@
 #ifndef GROB_HH
 #define GROB_HH
 
-#include "parray.hh"
 #include "virtual-methods.hh"
-#include "lily-guile.hh"
-#include "lily-proto.hh"
-#include "smobs.hh"
 #include "dimension-cache.hh"
 #include "grob-interface.hh"
+#include "object-key.hh"
 
 /**
-    for administration of what was done already
-    */
+   for administration of what was done already
+*/
 enum Grob_status {
-  ORPHAN=0,                    // not yet added to Paper_score
+  ORPHAN= 0,                   // not yet added to Paper_score
   PRECALCING,
   PRECALCED,           // calcs before spacing done
   POSTCALCING,         // busy calculating. This is used to trap cyclic deps.
@@ -43,8 +40,8 @@ class Grob
 private:  
   DECLARE_SMOBS (Grob, foo);
   void init ();
-
 protected:
+  Object_key const * key_;
   SCM immutable_property_alist_;
   SCM mutable_property_alist_;
   
@@ -57,6 +54,8 @@ protected:
   char status_;
   
 public:
+  Object_key const *get_key () const;
+  
   Grob *original_;
 
   /* TODO: junk this member. */
@@ -64,14 +63,13 @@ public:
 
   Dimension_cache dim_cache_[NO_AXES];
 
-  Grob (SCM basic_props);
-  Grob (Grob const&);
-  VIRTUAL_COPY_CONSTRUCTOR (Grob, Grob);
+  Grob (SCM basic_props, Object_key const *);
+  Grob (Grob const&, int copy_count);
+
+  virtual Grob *clone (int count) const;
   DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
  
   String name () const;
-
-
   /*
     Properties
    */
@@ -86,7 +84,7 @@ public:
   void warning (String) const;
   void programming_error (String) const;
   
-  Output_def *get_paper () const;
+  Output_def *get_layout () const;
   void add_dependency (Grob*);    
   virtual System *get_system () const;
 
@@ -127,11 +125,7 @@ public:
   void set_parent (Grob* e, Axis);
 
   // URG
-  Grob *get_parent (Axis a) const
-  {
-    return  dim_cache_[a].parent_;
-  }
-
+  Grob *get_parent (Axis a) const;
   DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM));
 };
 
@@ -148,5 +142,6 @@ SCM substitute_mutable_property_alist (SCM alist);
 Link_array<Grob> ly_scm2grobs (SCM ell);
 SCM ly_grobs2scm (Link_array<Grob> a);
 
-#endif /* GROB_HH */
+Interval robust_relative_extent (Grob*, Grob*, Axis); 
 
+#endif /* GROB_HH */