(c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "grob.hh"
-#include <string.h>
+#include <cstring>
#include <math.h>
#include "main.hh"
#include "misc.hh"
#include "paper-score.hh"
#include "stencil.hh"
-#include "grob.hh"
#include "warn.hh"
-#include "spanner.hh"
#include "system.hh"
#include "item.hh"
#include "stencil.hh"
key_ = key;
/* FIXME: default should be no callback. */
self_scm_ = SCM_EOL;
- pscore_= 0;
+ pscore_ = 0;
status_ = 0;
original_ = 0;
immutable_property_alist_ = basicprops;
GC. After smobify_self (), they are. */
smobify_self ();
+ /*
+ We always get a new key object for a new grob.
+ */
+ scm_gc_unprotect_object (key_->self_scm ());
SCM meta = get_property ("meta");
if (scm_is_pair (meta))
{
{
SCM l = get_property (onames[a]);
- if (scm_ilength (l) >=0)
+ if (scm_ilength (l) >= 0)
{
dim_cache_[a].offset_callbacks_ = l;
dim_cache_[a].offsets_left_ = scm_ilength (l);
;
else if (ly_c_procedure_p (d->dimension_))
/* FIXME: add doco on types, and should typecheck maybe? */
- d->dimension_= scm_call_2 (d->dimension_, self_scm (), scm_int2num (a));
+ d->dimension_ = scm_call_2 (d->dimension_, self_scm (), scm_int2num (a));
else
return ext;
return scm_c_memq (k, ifs) != SCM_BOOL_F;
}
+Grob*
+Grob::get_parent (Axis a) const
+{
+ return dim_cache_[a].parent_;
+}
+
+
/** Return Array of Grobs in SCM list LST */
Link_array<Grob>
ly_scm2grobs (SCM lst)
"Y-extent-callback print-function extra-offset spacing-procedure "
"context staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent "
"meta layer before-line-breaking-callback "
+ "axis-group-parent-X "
+ "axis-group-parent-Y "
"after-line-breaking-callback extra-Y-extent minimum-X-extent "
"minimum-Y-extent transparent tweak-count tweak-rank"
);
+