+2004-11-11 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * lily/context-property.cc (make_item_from_properties):
+ * lily/context.cc (add_context)[TWEAK]: Tweak registration behind
+ #ifdef.
+
+ * scm/define-context-properties.scm
+ (all-internal-translation-properties): Add tweakRank and tweakCount.
+
+ * lily/grob.cc:
+ * scm/define-grob-properties.scm (all-internal-grob-properties):
+ Add tweak-rank and tweak-count.
+
2004-11-10 Jan Nieuwenhuizen <janneke@gnu.org>
* scm/output-gnome.scm (string->utf8-string, char->utf8-string):
SCM props = updated_grob_properties (context, x);
Item *it = new Item (props);
+#ifdef TWEAK
Grob_selector::register_grob (context, it);
-
+#endif
dynamic_cast<Engraver*>(tr)->announce_grob (it, cause);
return it;
int count = 0;
if (Context *first = retrieve_context (identify_context (context, 0)))
{
- count = robust_scm2int (first->get_property ("max"), 0);
+ count = robust_scm2int (first->get_property ("tweakCount"), 0);
count++;
SCM s = scm_int2num (count);
- first->set_property ("max", s);
- context->set_property ("count", s);
+ first->set_property ("tweakCount", s);
+ context->set_property ("tweakRank", s);
}
- /* FIXME: must alway set count, for get_property () not to segfault. */
- context->set_property ("count", scm_int2num (count));
+ /* FIXME: must alway set rank, for get_property () not to segfault. */
+ context->set_property ("tweakRank", scm_int2num (count));
store_context (identify_context (context, count), context);
}
{
return
identify_context (context,
- robust_scm2int (context->get_property ("count"), 0));
+ robust_scm2int (context->get_property ("tweakRank"), 0));
}
void
if (!t->init_)
{
t->init_ = true;
+#ifdef TWEAK
Context_selector::register_context (t);
-
+#endif
scm_gc_unprotect_object (ts);
Context_def *td = unsmob_context_def (t->definition_);
Moment m = context->now_mom ();
if (Grob *first = retrieve_grob (identify_grob (context, m, grob, 0)))
{
- count = robust_scm2int (first->get_property ("max"), 0);
+ count = robust_scm2int (first->get_property ("tweak-count"), 0);
count++;
SCM s = scm_int2num (count);
- first->set_property ("max", s);
- grob->set_property ("count", s);
+ first->set_property ("tweak-count", s);
+ grob->set_property ("tweak-rank", s);
}
grob->set_property ("context", context->self_scm ());
SCM grob_id = identify_grob (context, m, grob, count);
store_grob (grob_id, grob);
-#ifdef TWEAK
SCM tweak = ly_assoc_get (grob_id, tweaks_, SCM_BOOL_F);
if (tweak != SCM_BOOL_F)
grob->set_property (ly_symbol2string (scm_car (tweak)).to_str0 (),
scm_cadr (tweak));
-#endif
}
SCM
return identify_grob (unsmob_context (grob->get_property ("context")),
Paper_column::when_mom (((Item*) grob)->get_column ()),
grob,
- robust_scm2int (grob->get_property ("count"), 0));
+ robust_scm2int (grob->get_property ("tweak-rank"), 0));
}
void
"context staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent "
"meta layer before-line-breaking-callback "
"after-line-breaking-callback extra-Y-extent minimum-X-extent "
- "minimum-Y-extent transparent "
+ "minimum-Y-extent transparent tweak-count tweak-rank"
);
(instrumentSupport ,grob-list? "list of grobs to attach instrument name
to.")
(tieMelismaBusy ,boolean? "Signal whether a tie is present.")
+ (tweakCount ,number? "Number of otherwise unique Contexts.")
+ (tweakRank ,number? "Identify otherwise unique Contexts.")
)
))
(center-element ,ly:grob? "grob which will be at the center of
the group after aligning (when using
Align_interface::center_on_element).")
+ (tweak-count ,number? "Number of otherwise unique Grobs.")
+ (tweak-rank ,number? "Identify otherwise unique Grobs.")
(direction-source ,ly:grob? "in case side-relative-direction is
set, which grob to get the direction from .")
(dot ,ly:grob? "reference to Dots object.")