From 13b45213d9de5eda6b8ee897e709dd5517cc661c Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:22:20 +0000 Subject: [PATCH] lilypond-1.3.55 --- lily/include/score-element.hh | 31 +++++++++++++++++++------------ lily/music-output-def.cc | 2 +- lily/paper-def.cc | 33 +++++++-------------------------- 3 files changed, 27 insertions(+), 39 deletions(-) diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index e803d487fe..16a0d8b39a 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -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. diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index a673d9fcb9..0805e3c242 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -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++) { diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 9234da4d1c..08adf11220 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -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 -- 2.39.5