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
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
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_;
/**
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;
/*
*/
Paper_score *pscore_l_;
- Score_element ();
+ Score_element (SCM basic_props);
Score_element (Score_element const&);
/*
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 ?
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.
{
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++)
{
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