]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.55
authorfred <fred>
Tue, 26 Mar 2002 23:22:20 +0000 (23:22 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:22:20 +0000 (23:22 +0000)
lily/include/score-element.hh
lily/music-output-def.cc
lily/paper-def.cc

index e803d487fe66a838239921c7b9c2000b6c5c05e2..16a0d8b39adedb1bb6332e5d64c3b1fc7a3d271e 100644 (file)
@@ -17,6 +17,8 @@
 typedef Interval (*Extent_callback)(Score_element const *,Axis);
 typedef Real (*Offset_callback)(Score_element const *,Axis);
 
+#define READONLY_PROPS         // FIXME.
+
 
 /**
     for administration of what was done already
@@ -58,7 +60,7 @@ class Score_element  {
      The lookup, determined by the font size. Cache this value.
    */
   Lookup * lookup_l_;
-public:
+
   /**
      properties specific for this element. Destructor will not call
      scm_unprotect, so as to allow more flexible GC arrangements.  The
@@ -66,8 +68,13 @@ public:
      need for more scm_protect calls.
 
   */
-  SCM element_property_alist_;
-  
+public:                                // ugh.
+  SCM property_alist_;
+  SCM pointer_alist_;
+#ifndef READONLY_PROPS
+  SCM basic_property_list_;
+#endif
+public:
   Score_element *original_l_;
 
   /**
@@ -77,13 +84,6 @@ public:
     0 means ORPHAN,
    */
   char status_i_;
-  /**
-     Set this if anyone points to me, or if I point to anyone.
-
-     JUNKME.
-   */
-  bool used_b_;
-  
   char const * name () const;
 
   /*
@@ -93,7 +93,7 @@ public:
    */
   Paper_score *pscore_l_;
 
-  Score_element ();
+  Score_element (SCM basic_props);
   Score_element (Score_element const&);
 
   /*
@@ -102,6 +102,13 @@ public:
   SCM get_elt_property (String nm) const;
   void set_elt_property (String, SCM val);
 
+  /**
+     Pointers are like properties, but they are subject to    a substitution
+     after line breaking.
+   */
+  SCM get_elt_pointer (const char*) const;
+  void set_elt_pointer (const char*, SCM val);
+  friend class Property_engraver; //  UGHUGHUGH.
   /**
      UGH! JUNKME ?
 
@@ -117,7 +124,7 @@ public:
      twice may do weird things if Bar::foo has a default set.
      
    */
-  SCM remove_elt_property (String nm);
+  SCM remove_elt_property (const char* nm);
 
   /*
     related classes.
index a673d9fcb9f2d47104b0c9cc842e480250921bd5..0805e3c2426d782af210e2cd932ca285ff485788 100644 (file)
@@ -39,7 +39,7 @@ Music_output_def::Music_output_def (Music_output_def const &s)
 {
   scope_p_ = new Scope (*s.scope_p_);
   translator_p_dict_p_ = new Scope (*s.translator_p_dict_p_);
-  default_properties_ = s.default_properties_;
+  //  default_properties_ = s.default_properties_;
   
   for (Scope_iter i (*translator_p_dict_p_);  i.ok (); i++)
     {
index 9234da4d1c89b793c002e1932b9f34d50a487b54..08adf11220692ddf50464357e0f0f74244354ffb 100644 (file)
@@ -78,36 +78,17 @@ Paper_def::get_realvar (SCM s) const
   return *p;
 }
 
-
+/*
+  FIXME. This is broken until we have a generic way of
+  putting lists inside the \paper block.
+ */
 Interval
 Paper_def::line_dimensions_int (int n) const
 {
-  SCM s = default_properties_.get (ly_symbol2scm ("margin-shape"));
-  if (!gh_pair_p (s))
-    {
-      Real lw =  get_var ("linewidth");
-      Real ind = n? 0.0:get_var ("indent");
+  Real lw =  get_var ("linewidth");
+  Real ind = n? 0.0:get_var ("indent");
 
-      return Interval (ind, lw);
-    }
-
-  SCM last = SCM_EOL;
-  while (gh_pair_p (s) && n --)
-    {
-      last = s;
-      s = gh_cdr (s);
-    }
-
-  if (s == SCM_EOL)
-    {
-      s = last;
-    }
-
-  SCM pair = gh_car (s);
-  
-  return Interval (gh_scm2double (gh_car (pair)),
-                  gh_scm2double (gh_cdr (pair)));
+  return Interval (ind, lw);
 }
 
 void