* lily/grob-property.cc: remove add_to_list_property().
* lily/grob.cc: remove X-extent-callback / Y-extent-callback.
* lily/include/grob.hh (class Grob): remove property_callbacks_
member. Properties of procedure type are assumed to be callbacks.
* lily/grob.cc: remove set_extent_callback(), set_extent() and
has_extent_callback()
* lily/grob.cc (flush_extent_cache): rewrite.
* lily/grob.cc (Grob): don't set extent from ctor.
(extent): use property callbacks.
* lily/grob-property.cc (del_property): new function.
return interfaces_;
}
-/*
- This special add_thing routine is slightly more efficient than
-
- set_prop (name, cons (thing, get_prop (name)))
-
- since it can reuse the handle returned by scm_assq ().
-*/
-// JUNKME.
-void
-Grob::add_to_list_property (SCM sym, SCM thing)
-{
- SCM handle
- = scm_sloppy_assq (sym, mutable_property_alist_);
-
- if (handle != SCM_BOOL_F)
- scm_set_cdr_x (handle, scm_cons (thing, scm_cdr (handle)));
- else
- {
- /*
- There is no mutable prop yet, so create an entry, and put it in front of the
- mutable prop list.
- */
- handle = scm_sloppy_assq (sym, immutable_property_alist_);
- SCM tail = (handle != SCM_BOOL_F) ? scm_cdr (handle) : SCM_EOL;
- SCM val = scm_cons (thing, tail);
-
- mutable_property_alist_ = scm_cons (scm_cons (sym, val),
- mutable_property_alist_);
- }
-}
extern void check_interfaces_for_property (Grob const *me, SCM sym);
/* We catch PARENT_L_ == nil case with this, but we crash if we did
not ask for the absolute coordinate (ie. REFP == nil.) */
+ Real off = get_offset (a);
if (refp == dim_cache_[a].parent_)
- return get_offset (a);
+ return off;
+
+ off += dim_cache_[a].parent_->relative_coordinate (refp, a);
- return get_offset (a) + dim_cache_[a].parent_->relative_coordinate (refp, a);
+ return off;
}
/* Invoke callbacks to get offset relative to parent. */
return dim_cache_[a].offset_;
}
-#if 0
-bool
-Grob::is_empty (Axis a) const
-{
- return !(scm_is_pair (dim_cache_[a].dimension_)
- || ly_is_procedure (dim_cache_[a].dimension_callback_));
-}
-#endif
void
Grob::flush_extent_cache (Axis axis)
void substitute_object_links (SCM, SCM);
DECLARE_CLASSNAME(Grob);
+ Real get_offset (Axis a) const;
public:
DECLARE_SCHEME_CALLBACK(same_axis_parent_positioning, (SCM, SCM));
DECLARE_SCHEME_CALLBACK(other_axis_parent_positioning, (SCM, SCM));
void internal_set_object (SCM sym, SCM val);
SCM try_callback (SCM, SCM);
- /*
- JUNKME.
- */
- void add_to_list_property (SCM, SCM);
- void add_to_object_list (SCM sym, SCM thing);
SCM get_property_alist_chain (SCM) const;
static SCM ly_grob_set_property (SCM, SCM, SCM);
void programming_error (String) const;
Output_def *get_layout () const;
- void add_dependency (Grob *);
virtual System *get_system () const;
-
- void calculate_dependencies (int final, int busy, SCM funcname);
-
virtual void do_break_processing ();
virtual Grob *find_broken_piece (System *) const;
virtual void discretionary_processing ();
bool has_offset_callback (SCM callback, Axis) const;
void add_offset_callback (SCM callback, Axis);
void flush_extent_cache (Axis);
- Real get_offset (Axis a) const;
void set_parent (Grob *e, Axis);