summaryrefslogtreecommitdiff
path: root/lily/grob.cc
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2007-01-04 21:39:34 +0100
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2007-01-04 21:39:34 +0100
commit635bff94c5a920d5866be4ff16751d771a35b7da (patch)
treeab986f2b6897e28232b866d9297b5d5fbe35be75 /lily/grob.cc
parentc17db6fef557649f47c69ed11811231557a6179e (diff)
allow callbacks on object values too. Init via meta field.
Diffstat (limited to 'lily/grob.cc')
-rw-r--r--lily/grob.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/lily/grob.cc b/lily/grob.cc
index 139a387989..0591ab115f 100644
--- a/lily/grob.cc
+++ b/lily/grob.cc
@@ -59,7 +59,16 @@ Grob::Grob (SCM basicprops,
SCM meta = get_property ("meta");
if (scm_is_pair (meta))
- interfaces_ = scm_cdr (scm_assq (ly_symbol2scm ("interfaces"), meta));
+ {
+ interfaces_ = scm_cdr (scm_assq (ly_symbol2scm ("interfaces"), meta));
+
+ SCM object_cbs = scm_assq (ly_symbol2scm ("object-callbacks"), meta);
+ if (scm_is_pair (object_cbs))
+ {
+ for (SCM s = scm_cdr (object_cbs); scm_is_pair (s); s = scm_cdr (s))
+ set_object (scm_caar (s), scm_cdar (s));
+ }
+ }
if (get_property_data ("X-extent") == SCM_EOL)
set_property ("X-extent", Grob::stencil_width_proc);
@@ -633,15 +642,10 @@ ADD_INTERFACE (Grob,
"transparent "
);
-
-
-
-
/****************************************************************
CALLBACKS
****************************************************************/
-
static SCM
grob_stencil_extent (Grob *me, Axis a)
{