2 vertically-spaced-contexts-engraver.cc -- implement Vertically_spaced_contexts_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
11 #include "axis-group-interface.hh"
13 #include "pointer-group-interface.hh"
15 class Vertically_spaced_contexts_engraver
: public Engraver
17 TRANSLATOR_DECLARATIONS (Vertically_spaced_contexts_engraver
);
19 virtual void initialize ();
20 DECLARE_ACKNOWLEDGER (vertically_spaceable
);
26 Vertically_spaced_contexts_engraver::Vertically_spaced_contexts_engraver ()
32 Vertically_spaced_contexts_engraver::initialize ()
34 system_
= unsmob_grob (get_property ("rootSystem"));
38 Vertically_spaced_contexts_engraver::acknowledge_vertically_spaceable (Grob_info gi
)
40 if (Axis_group_interface::has_interface (gi
.grob ()))
42 SCM spaceable
= get_property ("verticallySpacedContexts");
43 Context
*orig
= gi
.origin_contexts (this)[0];
45 if (scm_memq (ly_symbol2scm (orig
->context_name ().c_str ()),
46 spaceable
) != SCM_BOOL_F
)
48 Pointer_group_interface::add_unordered_grob (system_
,
49 ly_symbol2scm ("spaceable-staves"),
55 #include "translator.icc"
57 ADD_ACKNOWLEDGER (Vertically_spaced_contexts_engraver
, vertically_spaceable
);
58 ADD_TRANSLATOR (Vertically_spaced_contexts_engraver
,
66 "verticallySpacedContexts ",
69 "verticallySpacedContexts "