]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/grob.hh
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / include / grob.hh
index 46f1ff473ae972942bc72a779f3110c1b11f22e2..6c3ef612bd7a81c3526592c0a50baf31bd246a91 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c) 1996--2005 Han-Wen Nienhuys
+  (c) 1996--2006 Han-Wen Nienhuys
 */
 
 #ifndef GROB_HH
 #include "grob-interface.hh"
 #include "object-key.hh"
 
-typedef void (Grob:: *Grob_method_pointer) (void);
-
 class Grob
 {
 private:
   DECLARE_SMOBS (Grob, foo);
+  DECLARE_CLASSNAME(Grob);
+  
   void init ();
 
 protected:
+  /* data */
+  Dimension_cache dim_cache_[NO_AXES];
+  Output_def *layout_;
+  Grob *original_;
   Object_key const *key_;
+
+  /* SCM data */
   SCM immutable_property_alist_;
   SCM mutable_property_alist_;
   SCM object_alist_;
@@ -33,22 +39,19 @@ protected:
     lookups.
   */
   SCM interfaces_;
-
-  /* BARF */
-  friend class Spanner;
-  friend SCM ly_grob_properties (SCM);
-  friend SCM ly_grob_basic_properties (SCM);
+  
   void substitute_object_links (SCM, SCM);
-
-  DECLARE_CLASSNAME(Grob);
   Real get_offset (Axis a) const;
-
-  Output_def *layout_;
-  Dimension_cache dim_cache_[NO_AXES];
-  Grob *original_;
-
   SCM try_callback (SCM, SCM);
 public:
+  
+  /* friends */
+  friend class Spanner;
+  friend class System;
+  friend SCM ly_grob_properties (SCM);
+  friend SCM ly_grob_basic_properties (SCM);
+
+  /* standard callbacks */
   DECLARE_SCHEME_CALLBACK(x_parent_positioning, (SCM));
   DECLARE_SCHEME_CALLBACK(y_parent_positioning, (SCM));
   DECLARE_SCHEME_CALLBACK (stencil_height, (SCM smob));
@@ -70,7 +73,7 @@ public:
   bool is_live () const;
 
   /* naming. */
-  String name () const;
+  string name () const;
 
   /* Properties */
   SCM get_property_alist_chain (SCM) const;
@@ -82,8 +85,8 @@ public:
   void internal_set_object (SCM sym, SCM val);
 
   /* messages */  
-  void warning (String) const;
-  void programming_error (String) const;
+  void warning (string) const;
+  void programming_error (string) const;
 
 
   /* class hierarchy */
@@ -118,13 +121,14 @@ public:
   void fixup_refpoint ();
 };
 
+/* smob utilities */
 DECLARE_UNSMOB (Grob, grob);
 Spanner *unsmob_spanner (SCM);
 Item *unsmob_item (SCM);
 
 /* refpoints */
 Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a);
-Grob *common_refpoint_of_array (Link_array<Grob> const &, Grob *, Axis a);
+Grob *common_refpoint_of_array (vector<Grob*> const &, Grob *, Axis a);
 System *get_root_system (Grob *me);
 
 /* extents */