From: Han-Wen Nienhuys Date: Wed, 29 Nov 2006 15:20:12 +0000 (+0100) Subject: use classnames for interface naming; remove inclusion of X-Git-Tag: release/2.11.1-1~42 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=44ad1d66c072e4d6545e75c769c86a460cb1df13;p=lilypond.git use classnames for interface naming; remove inclusion of grob/item/spanner headers in interface headers. --- diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index fc462faffa..9d671c11e6 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -9,7 +9,9 @@ #include "accidental-placement.hh" #include "arpeggio.hh" +#include "spanner.hh" #include "context.hh" +#include "item.hh" #include "engraver.hh" #include "international.hh" #include "pitch.hh" diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index c943c9cca4..a96f0e2542 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -9,6 +9,7 @@ #include "accidental-placement.hh" +#include "item.hh" #include "rhythmic-head.hh" #include "accidental-interface.hh" #include "music.hh" @@ -415,7 +416,6 @@ Accidental_placement::calc_positioning_done (SCM smob) } ADD_INTERFACE (Accidental_placement, - "accidental-placement-interface", "Resolve accidental collisions.", /* properties */ diff --git a/lily/accidental.cc b/lily/accidental.cc index 0557883267..060c97849d 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -254,7 +254,7 @@ Accidental_interface::print (SCM smob) /* TODO: should move avoid-slur into item? */ -ADD_INTERFACE (Accidental_interface, "accidental-interface", +ADD_INTERFACE (Accidental_interface, "a single accidental", "accidentals " "avoid-slur " diff --git a/lily/align-interface.cc b/lily/align-interface.cc index 736ecb9096..f2eacf7608 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -367,7 +367,6 @@ find_fixed_alignment_parent (Grob *g) } ADD_INTERFACE (Align_interface, - "align-interface", "Order grobs from top to bottom, left to right, right to left or bottom " "to top. " @@ -389,9 +388,3 @@ ADD_INTERFACE (Align_interface, "stacking-dir " "threshold " ); - -struct Foobar -{ - bool has_interface (Grob *); -}; - diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index 2c606e878a..5946b91c6d 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -11,6 +11,7 @@ #include "engraver.hh" #include "axis-group-interface.hh" +#include "item.hh" #include "note-head.hh" #include "pitch-interval.hh" #include "pointer-group-interface.hh" diff --git a/lily/ambitus.cc b/lily/ambitus.cc index 2d88f61eae..1e6da083bc 100644 --- a/lily/ambitus.cc +++ b/lily/ambitus.cc @@ -68,7 +68,7 @@ Ambitus::print (SCM smob) return SCM_EOL; } -ADD_INTERFACE (Ambitus, "ambitus-interface", +ADD_INTERFACE (Ambitus , "The line between note heads for a pitch range.", /* props */ diff --git a/lily/arpeggio-engraver.cc b/lily/arpeggio-engraver.cc index a09810d90a..0086d121e7 100644 --- a/lily/arpeggio-engraver.cc +++ b/lily/arpeggio-engraver.cc @@ -15,6 +15,7 @@ #include "side-position-interface.hh" #include "stream-event.hh" #include "note-column.hh" +#include "item.hh" #include "translator.icc" diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index c3ed8a3939..76fd30ad8f 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -8,6 +8,7 @@ #include "arpeggio.hh" +#include "grob.hh" #include "output-def.hh" #include "stem.hh" #include "staff-symbol-referencer.hh" @@ -143,7 +144,7 @@ Arpeggio::width (SCM smob) return ly_interval2scm (arpeggio.extent (X_AXIS)); } -ADD_INTERFACE (Arpeggio, "arpeggio-interface", +ADD_INTERFACE (Arpeggio, "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads.", /* properties */ diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index c7a5b8eff9..1ed274ec76 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -315,7 +315,7 @@ Axis_group_interface::skyline_spacing (Grob *me, vector elements) } } -ADD_INTERFACE (Axis_group_interface, "axis-group-interface", +ADD_INTERFACE (Axis_group_interface, "An object that groups other layout objects.", diff --git a/lily/balloon.cc b/lily/balloon.cc index c450189fc0..065d61c159 100644 --- a/lily/balloon.cc +++ b/lily/balloon.cc @@ -19,7 +19,7 @@ class Balloon_interface { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE (); }; MAKE_SCHEME_CALLBACK (Balloon_interface, print, 1); @@ -69,7 +69,7 @@ Balloon_interface::print (SCM smob) return fr.smobbed_copy (); } -ADD_INTERFACE (Balloon_interface, "balloon-interface", +ADD_INTERFACE (Balloon_interface, "A collection of routines to put text balloons around an object.", /* properties */ diff --git a/lily/bar-line.cc b/lily/bar-line.cc index 0a1c0d9fea..840a1de15d 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -239,7 +239,6 @@ Bar_line::dashed_bar_line (Grob *me, Real h, Real thick) ADD_INTERFACE (Bar_line, - "bar-line-interface", "Bar line.\n" "\n" diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index e4cec84364..a0a1528597 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -12,6 +12,7 @@ #include using namespace std; +#include "grob.hh" #include "align-interface.hh" #include "international.hh" #include "output-def.hh" diff --git a/lily/beam.cc b/lily/beam.cc index 0778c58388..d020483352 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -1440,7 +1440,6 @@ Beam::get_direction_beam_count (Grob *me, Direction d) } ADD_INTERFACE (Beam, - "beam-interface", "A beam. \n\n" "The @code{thickness} property is the weight of beams, " diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index 450286b848..dcce285bdf 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -12,6 +12,7 @@ #include "axis-group-interface.hh" #include "context.hh" #include "translator-group.hh" +#include "item.hh" #include "translator.icc" diff --git a/lily/break-alignment-interface.cc b/lily/break-alignment-interface.cc index 3ccd2aa125..37eae38297 100644 --- a/lily/break-alignment-interface.cc +++ b/lily/break-alignment-interface.cc @@ -315,7 +315,7 @@ Break_alignable_interface::self_align_callback (SCM grob) - me->relative_coordinate (common, X_AXIS)); } -ADD_INTERFACE (Break_alignable_interface, "break-alignable-interface", +ADD_INTERFACE (Break_alignable_interface, "Object that is aligned on a break aligment. ", /* properties */ @@ -324,7 +324,7 @@ ADD_INTERFACE (Break_alignable_interface, "break-alignable-interface", -ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface", +ADD_INTERFACE (Break_aligned_interface, "Items that are aligned in prefatory matter.\n" "\n" "The spacing of these items is controlled by the @code{space-alist}\n" @@ -353,7 +353,7 @@ ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface", "space-alist " ); -ADD_INTERFACE (Break_alignment_interface, "break-alignment-interface", +ADD_INTERFACE (Break_alignment_interface, "The object that performs break aligment. See @ref{break-aligned-interface}.", /* properties */ diff --git a/lily/breathing-sign.cc b/lily/breathing-sign.cc index f8d02996f4..36b6502fc1 100644 --- a/lily/breathing-sign.cc +++ b/lily/breathing-sign.cc @@ -178,7 +178,7 @@ Breathing_sign::offset_callback (SCM smob) return scm_from_double (inter * sz * d); } -ADD_INTERFACE (Breathing_sign, "breathing-sign-interface", +ADD_INTERFACE (Breathing_sign, "A breathing sign.", "direction " diff --git a/lily/chord-name.cc b/lily/chord-name.cc index e929046db4..959898e3a7 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -32,7 +32,7 @@ Chord_name::after_line_breaking (SCM smob) return SCM_UNSPECIFIED; } -ADD_INTERFACE (Chord_name, "chord-name-interface", +ADD_INTERFACE (Chord_name, "A chord name.", diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 78472dc99e..258b047397 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -11,6 +11,7 @@ #include using namespace std; +#include "item.hh" #include "context.hh" #include "bar-line.hh" #include "staff-symbol-referencer.hh" diff --git a/lily/clef.cc b/lily/clef.cc index 0718f8bd53..769c90195b 100644 --- a/lily/clef.cc +++ b/lily/clef.cc @@ -56,7 +56,7 @@ Clef::print (SCM smob) return out.smobbed_copy (); } -ADD_INTERFACE (Clef, "clef-interface", +ADD_INTERFACE (Clef, "A clef sign", /* properties */ diff --git a/lily/cluster-engraver.cc b/lily/cluster-engraver.cc index cd0c59b817..c1cb5a4025 100644 --- a/lily/cluster-engraver.cc +++ b/lily/cluster-engraver.cc @@ -13,6 +13,7 @@ #include "pointer-group-interface.hh" #include "pitch.hh" #include "stream-event.hh" +#include "item.hh" #include "translator.icc" diff --git a/lily/cluster.cc b/lily/cluster.cc index 27ef9dd08a..90c2adcf50 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -195,7 +195,7 @@ Cluster::print (SCM smob) return out.smobbed_copy (); } -ADD_INTERFACE (Cluster, "cluster-interface", +ADD_INTERFACE (Cluster, "A graphically drawn musical cluster. " "\n\n" "@code{padding} adds to the vertical extent of the shape (top and " @@ -211,7 +211,7 @@ struct Cluster_beacon { public: DECLARE_SCHEME_CALLBACK (height, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1); @@ -225,7 +225,6 @@ Cluster_beacon::height (SCM g) } ADD_INTERFACE (Cluster_beacon, - "cluster-beacon-interface", "A place holder for the cluster spanner to determine the vertical " "extents of a cluster spanner at this X position.", diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index 7f56435e81..32dddc1d7a 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -10,6 +10,7 @@ #include "note-column.hh" #include "note-collision.hh" #include "axis-group-interface.hh" +#include "item.hh" class Collision_engraver : public Engraver { diff --git a/lily/custos.cc b/lily/custos.cc index 4e0010dcf6..7a3c09bbfa 100644 --- a/lily/custos.cc +++ b/lily/custos.cc @@ -81,7 +81,7 @@ Custos::print (SCM smob) return stencil.smobbed_copy (); } -ADD_INTERFACE (Custos, "custos-interface", +ADD_INTERFACE (Custos, "A custos object.", "style " "neutral-position " diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index 04a75241c6..ede002049f 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -11,6 +11,7 @@ #include "side-position-interface.hh" #include "engraver.hh" #include "translator.icc" +#include "item.hh" class Dot_column_engraver : public Engraver { diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 4683c51cb5..33af9f381b 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -292,7 +292,6 @@ Dot_column::add_head (Grob *me, Grob *rh) } ADD_INTERFACE (Dot_column, - "dot-column-interface", "Groups dot objects so they form a column, and position dots so they do not " "clash with staff lines ", diff --git a/lily/dots.cc b/lily/dots.cc index f697752e35..afa82868a8 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -59,7 +59,7 @@ Dots::print (SCM d) return mol.smobbed_copy (); } -ADD_INTERFACE (Dots, "dots-interface", +ADD_INTERFACE (Dots, "The dots to go with a notehead or rest." "@code{direction} sets the preferred direction to move in case of staff " "line collisions.", diff --git a/lily/drum-note-engraver.cc b/lily/drum-note-engraver.cc index 5cdbbe8a4c..fc1b77a034 100644 --- a/lily/drum-note-engraver.cc +++ b/lily/drum-note-engraver.cc @@ -7,6 +7,7 @@ #include using namespace std; +#include "item.hh" #include "duration.hh" #include "engraver.hh" #include "note-column.hh" diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 50cde13ea3..fc87783bba 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -23,6 +23,8 @@ #include "staff-symbol-referencer.hh" #include "stream-event.hh" #include "warn.hh" +#include "item.hh" +#include "spanner.hh" #include "translator.icc" diff --git a/lily/dynamic-text-spanner.cc b/lily/dynamic-text-spanner.cc index 59eb1c3a58..ff6eac541e 100644 --- a/lily/dynamic-text-spanner.cc +++ b/lily/dynamic-text-spanner.cc @@ -22,7 +22,7 @@ class Dynamic_text_spanner { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; /* @@ -154,7 +154,6 @@ Dynamic_text_spanner::print (SCM smob) } ADD_INTERFACE (Dynamic_text_spanner, - "dynamic-text-spanner-interface", "A text spanner for crescendo texts", "bound-padding " diff --git a/lily/enclosing-bracket.cc b/lily/enclosing-bracket.cc index 81a292a2ec..60e98f0944 100644 --- a/lily/enclosing-bracket.cc +++ b/lily/enclosing-bracket.cc @@ -15,7 +15,7 @@ struct Enclosing_bracket { - static bool has_interface (Grob*); + DECLARE_GROB_INTERFACE(); public: DECLARE_SCHEME_CALLBACK(print, (SCM)); @@ -24,7 +24,6 @@ public: ADD_INTERFACE(Enclosing_bracket, - "enclosing-bracket-interface", "Brackets alongside bass figures.", diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 3fb0d43033..efea867822 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -17,6 +17,7 @@ #include "pointer-group-interface.hh" #include "stream-event.hh" #include "warn.hh" +#include "spanner.hh" #include "translator.icc" diff --git a/lily/figured-bass-continuation.cc b/lily/figured-bass-continuation.cc index d6b6f2002b..2830b10295 100644 --- a/lily/figured-bass-continuation.cc +++ b/lily/figured-bass-continuation.cc @@ -21,7 +21,7 @@ struct Figured_bass_continuation { - static bool has_interface (Grob*); + DECLARE_GROB_INTERFACE(); public: DECLARE_SCHEME_CALLBACK(print, (SCM)); @@ -82,7 +82,6 @@ Figured_bass_continuation::print (SCM grob) } ADD_INTERFACE(Figured_bass_continuation, - "figured-bass-continuation-interface", "Simple extender line between bounds.", /* props */ diff --git a/lily/figured-bass-position-engraver.cc b/lily/figured-bass-position-engraver.cc index a1b97c99cb..caab84bf4a 100644 --- a/lily/figured-bass-position-engraver.cc +++ b/lily/figured-bass-position-engraver.cc @@ -11,6 +11,7 @@ #include "context.hh" #include "spanner.hh" +#include "item.hh" #include "side-position-interface.hh" #include "translator.icc" #include "axis-group-interface.hh" diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index 896913bbc2..b5f36ef79b 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -13,6 +13,7 @@ #include "side-position-interface.hh" #include "stem.hh" #include "stream-event.hh" +#include "item.hh" #include "translator.icc" diff --git a/lily/font-interface.cc b/lily/font-interface.cc index d620b31d21..482f91af7a 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -49,7 +49,7 @@ Font_interface::text_font_alist_chain (Grob *g) return g->get_property_alist_chain (defaults); } -ADD_INTERFACE (Font_interface, "font-interface", +ADD_INTERFACE (Font_interface, "Any symbol that is typeset through fixed sets of glyphs, " " (ie. fonts)", diff --git a/lily/gregorian-ligature.cc b/lily/gregorian-ligature.cc index 5047fa928b..fa790b368e 100644 --- a/lily/gregorian-ligature.cc +++ b/lily/gregorian-ligature.cc @@ -48,7 +48,7 @@ Gregorian_ligature::prefixes_to_str (Grob *primitive) subclass like VaticanaLigatureEngraver. The property is lateron read by the associated item class, such as VaticanaLigature.--jr */ -ADD_INTERFACE (Gregorian_ligature, "gregorian-ligature-interface", +ADD_INTERFACE (Gregorian_ligature, "A gregorian ligature", "virga stropha inclinatum auctum descendens ascendens " "oriscus quilisma deminutum cavum linea pes-or-flexa " diff --git a/lily/grid-line-interface.cc b/lily/grid-line-interface.cc index 49befddff8..f5e98ffabe 100644 --- a/lily/grid-line-interface.cc +++ b/lily/grid-line-interface.cc @@ -68,10 +68,10 @@ Grid_line_interface::add_grid_point (Grob *me, Grob *b) Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), b); } -ADD_INTERFACE (Grid_line_interface, "grid-line-interface", +ADD_INTERFACE (Grid_line_interface, "A line that spanned between grid-points. ", "elements thickness"); -ADD_INTERFACE (Grid_point_interface, "grid-point-interface", +ADD_INTERFACE (Grid_point_interface, "A spanning point for grid lines. ", ""); diff --git a/lily/grob-interface.cc b/lily/grob-interface.cc index bd753f80c6..afae13dbec 100644 --- a/lily/grob-interface.cc +++ b/lily/grob-interface.cc @@ -16,8 +16,7 @@ #include "warn.hh" #include "misc.hh" -void add_interface (char const *cxx_name, - char const *symbol, +SCM add_interface (char const *cxx_name, char const *descr, char const *vars) { @@ -27,15 +26,13 @@ void add_interface (char const *cxx_name, if (lispy_name.substr (end) != suffix) lispy_name += suffix; - if (lispy_name != string (symbol)) - programming_error (String_convert::form_string ("%s != %s", lispy_name.c_str (), - symbol)); - - SCM s = ly_symbol2scm (symbol); + SCM s = ly_symbol2scm (lispy_name.c_str ()); SCM d = scm_makfrom0str (descr); SCM l = parse_symbol_list (vars); ly_add_interface (s, d, l); + + return s; } void diff --git a/lily/grob.cc b/lily/grob.cc index 1456a264ef..4e7a3e196e 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -566,7 +566,7 @@ Grob::programming_error (string s) const } -ADD_INTERFACE (Grob, "grob-interface", +ADD_INTERFACE (Grob, "A grob represents a piece of music notation\n" "\n" "All grobs have an X and Y-position on the page. These X and Y positions\n" diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 891baf0e0c..e0916cd99d 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -251,7 +251,7 @@ Hairpin::print (SCM smob) return mol.smobbed_copy (); } -ADD_INTERFACE (Hairpin, "hairpin-interface", +ADD_INTERFACE (Hairpin, "A hairpin crescendo/decrescendo.", /* props */ diff --git a/lily/hara-kiri-group-spanner.cc b/lily/hara-kiri-group-spanner.cc index 9e23d2b820..0dec921395 100644 --- a/lily/hara-kiri-group-spanner.cc +++ b/lily/hara-kiri-group-spanner.cc @@ -153,7 +153,7 @@ Hara_kiri_group_spanner::add_interesting_item (Grob *me, Grob *n) Pointer_group_interface::add_unordered_grob (me, ly_symbol2scm ("items-worth-living"), n); } -ADD_INTERFACE (Hara_kiri_group_spanner, "hara-kiri-group-spanner-interface", +ADD_INTERFACE (Hara_kiri_group_spanner, "A group spanner that keeps track of interesting items. If it " "doesn't contain any after linebreaking, then it " "will remove itself and all its children.", diff --git a/lily/horizontal-bracket-engraver.cc b/lily/horizontal-bracket-engraver.cc index b0909c2689..57c368154a 100644 --- a/lily/horizontal-bracket-engraver.cc +++ b/lily/horizontal-bracket-engraver.cc @@ -13,6 +13,8 @@ #include "pointer-group-interface.hh" #include "side-position-interface.hh" #include "stream-event.hh" +#include "spanner.hh" +#include "item.hh" #include "translator.icc" diff --git a/lily/horizontal-bracket.cc b/lily/horizontal-bracket.cc index 00dd0b653f..d2b016b496 100644 --- a/lily/horizontal-bracket.cc +++ b/lily/horizontal-bracket.cc @@ -16,6 +16,8 @@ #include "staff-symbol-referencer.hh" #include "tuplet-bracket.hh" #include "axis-group-interface.hh" +#include "spanner.hh" +#include "item.hh" Stencil @@ -111,8 +113,6 @@ Horizontal_bracket::print (SCM smob) } ADD_INTERFACE (Horizontal_bracket, - - "horizontal-bracket-interface", "A horizontal bracket encompassing notes.", /* props */ diff --git a/lily/include/accidental-interface.hh b/lily/include/accidental-interface.hh index b9f4e7c83d..62eeb1b5ad 100644 --- a/lily/include/accidental-interface.hh +++ b/lily/include/accidental-interface.hh @@ -14,6 +14,7 @@ #include "box.hh" #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" class Accidental_interface { @@ -21,7 +22,7 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static string get_fontcharname (string style, int alteration); static vector accurate_boxes (Grob *me, Grob **common); diff --git a/lily/include/accidental-placement.hh b/lily/include/accidental-placement.hh index 43c33b8a9f..ed2703af87 100644 --- a/lily/include/accidental-placement.hh +++ b/lily/include/accidental-placement.hh @@ -9,6 +9,7 @@ #ifndef ACCIDENTAL_PLACEMENT_HH #define ACCIDENTAL_PLACEMENT_HH +#include "grob-interface.hh" #include "grob.hh" class Accidental_placement @@ -25,7 +26,7 @@ public: vector *real_acc); DECLARE_SCHEME_CALLBACK(calc_positioning_done, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* ACCIDENTAL_PLACEMENT_HH */ diff --git a/lily/include/align-interface.hh b/lily/include/align-interface.hh index 273dbc660c..5363ead48d 100644 --- a/lily/include/align-interface.hh +++ b/lily/include/align-interface.hh @@ -12,6 +12,7 @@ #include "lily-proto.hh" #include "lily-guile.hh" #include "std-vector.hh" +#include "grob-interface.hh" struct Align_interface { @@ -27,7 +28,7 @@ struct Align_interface static void add_element (Grob *, Grob *); static int get_count (Grob *, Grob *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Real get_pure_child_y_translation (Grob *, Grob *child, int start, int end); }; diff --git a/lily/include/ambitus.hh b/lily/include/ambitus.hh index 7f0a2d40cf..7bd37ecc29 100644 --- a/lily/include/ambitus.hh +++ b/lily/include/ambitus.hh @@ -10,13 +10,13 @@ #define AMBITUS_HH #include "lily-guile.hh" - -class Grob; +#include "lily-proto.hh" +#include "grob-interface.hh" struct Ambitus { DECLARE_SCHEME_CALLBACK (print, (SCM smob)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Slice get_positions (Grob *); static Interval head_width (Grob *me, Grob *common); }; diff --git a/lily/include/arpeggio.hh b/lily/include/arpeggio.hh index 27f2d14dae..ce69cddc17 100644 --- a/lily/include/arpeggio.hh +++ b/lily/include/arpeggio.hh @@ -11,6 +11,8 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" + class Arpeggio { @@ -18,7 +20,7 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (brew_chord_bracket, (SCM)); DECLARE_SCHEME_CALLBACK (width, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* ARPEGGIO_HH */ diff --git a/lily/include/axis-group-interface.hh b/lily/include/axis-group-interface.hh index b1bd975454..e03d7326ad 100644 --- a/lily/include/axis-group-interface.hh +++ b/lily/include/axis-group-interface.hh @@ -12,9 +12,8 @@ #include "std-vector.hh" #include "lily-proto.hh" #include "lily-guile.hh" +#include "grob-interface.hh" -/** - */ struct Axis_group_interface { static SCM generic_group_extent (Grob *me, Axis a); @@ -35,7 +34,7 @@ struct Axis_group_interface static void set_axes (Grob *, Axis, Axis); static bool has_axis (Grob *, Axis); static void get_children (Grob *, vector *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* AXIS_GROUP_INTERFACE_HH */ diff --git a/lily/include/bar-line.hh b/lily/include/bar-line.hh index 39253a7b8d..d06c8314ea 100644 --- a/lily/include/bar-line.hh +++ b/lily/include/bar-line.hh @@ -9,14 +9,12 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" -/** - A vertical bar. -*/ class Bar_line { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Stencil dashed_bar_line (Grob *me, Real h, Real thick); static Stencil compound_barline (Grob *, string, Real height, bool rounded); diff --git a/lily/include/bar.hh b/lily/include/bar.hh index b7ebca69a5..eb74b7ac6d 100644 --- a/lily/include/bar.hh +++ b/lily/include/bar.hh @@ -9,6 +9,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" /** A vertical bar. @@ -16,7 +17,7 @@ class Bar { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Stencil compound_barline (Grob *, string, Real height); static Stencil simple_barline (Grob *, Real wid, Real height); diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 71821f6629..ae138911ee 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -10,6 +10,7 @@ #ifndef BEAM_HH #define BEAM_HH +#include "grob-interface.hh" #include "std-vector.hh" #include "lily-proto.hh" #include "lily-guile.hh" @@ -71,7 +72,7 @@ public: static int visible_stem_count (Grob *); static Grob *first_visible_stem (Grob *); static Grob *last_visible_stem (Grob *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void add_stem (Grob *, Grob *); static bool is_knee (Grob *); static void set_beaming (Grob *, Beaming_pattern const *); diff --git a/lily/include/break-align-interface.hh b/lily/include/break-align-interface.hh index 5319c75b43..421043b24c 100644 --- a/lily/include/break-align-interface.hh +++ b/lily/include/break-align-interface.hh @@ -9,13 +9,14 @@ #ifndef BREAK_ALIGN_INTERFACE_HH #define BREAK_ALIGN_INTERFACE_HH -#include "item.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" class Break_alignment_interface { public: static vector ordered_elements (Grob *me); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void add_element (Grob *me, Grob *add); static SCM break_align_order (Item *me); DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element)); @@ -24,13 +25,13 @@ public: struct Break_aligned_interface { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; struct Break_alignable_interface { DECLARE_SCHEME_CALLBACK (self_align_callback, (SCM element)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // BREAK_ALIGN_INTERFACE_HH diff --git a/lily/include/breathing-sign.hh b/lily/include/breathing-sign.hh index 9093230a58..237fd158be 100644 --- a/lily/include/breathing-sign.hh +++ b/lily/include/breathing-sign.hh @@ -9,6 +9,7 @@ #ifndef BREATHING_SIGN_HH #define BREATHING_SIGN_HH +#include "grob-interface.hh" #include "lily-guile.hh" class Grob; @@ -28,7 +29,7 @@ public: DECLARE_SCHEME_CALLBACK (finalis, (SCM)); DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // BREATHING_SIGN_HH diff --git a/lily/include/chord-name.hh b/lily/include/chord-name.hh index dc79a77a0b..f5c805684f 100644 --- a/lily/include/chord-name.hh +++ b/lily/include/chord-name.hh @@ -10,12 +10,13 @@ #define CHORD_NAME_HH #include "stencil.hh" +#include "grob-interface.hh" class Chord_name { public: DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // CHORD_NAME_HH diff --git a/lily/include/clef.hh b/lily/include/clef.hh index 2f78edb822..aaa7435685 100644 --- a/lily/include/clef.hh +++ b/lily/include/clef.hh @@ -11,12 +11,13 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" struct Clef { DECLARE_SCHEME_CALLBACK (calc_glyph_name, (SCM)); DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* CLEF_HH */ diff --git a/lily/include/cluster.hh b/lily/include/cluster.hh index 6b6ad1dda0..75090102e6 100644 --- a/lily/include/cluster.hh +++ b/lily/include/cluster.hh @@ -10,14 +10,13 @@ #define CLUSTER_HH #include "stencil.hh" +#include "grob-interface.hh" class Cluster { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - // DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); - static bool has_interface (Grob *); - // DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM )); + DECLARE_GROB_INTERFACE(); }; #endif // CLUSTER_HH diff --git a/lily/include/custos.hh b/lily/include/custos.hh index c6a693404b..45914f77ab 100644 --- a/lily/include/custos.hh +++ b/lily/include/custos.hh @@ -10,14 +10,13 @@ #define CUSTOS_HH #include "lily-guile.hh" - -class Grob; -class Stencil; +#include "lily-proto.hh" +#include "grob-interface.hh" struct Custos { DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); private: static void add_streepjes (Grob *me, int pos, int interspaces, Stencil *custos_); diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index 63ad0d3f93..8362e84613 100644 --- a/lily/include/dot-column.hh +++ b/lily/include/dot-column.hh @@ -10,6 +10,8 @@ #define DOT_COLUMN_HH #include "lily-guile.hh" +#include "grob-interface.hh" + class Grob; @@ -22,7 +24,7 @@ public: static int compare (Grob *const &, Grob *const &); static void add_head (Grob *dotcol, Grob *rh); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (side_position, (SCM)); DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM)); }; diff --git a/lily/include/dots.hh b/lily/include/dots.hh index e62e7f13a5..8f83f3a057 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -11,12 +11,13 @@ #include "lily-proto.hh" #include "lily-guile.hh" +#include "grob-interface.hh" class Dots { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // DOTS_HH diff --git a/lily/include/font-interface.hh b/lily/include/font-interface.hh index c92692026d..cc68af60d7 100644 --- a/lily/include/font-interface.hh +++ b/lily/include/font-interface.hh @@ -10,13 +10,14 @@ #define FONT_INTERFACE_HH #include "font-metric.hh" +#include "grob-interface.hh" struct Font_interface { static SCM text_font_alist_chain (Grob *); static SCM music_font_alist_chain (Grob *); static Font_metric *get_default_font (Grob *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* FONT_INTERFACE_HH */ diff --git a/lily/include/gregorian-ligature.hh b/lily/include/gregorian-ligature.hh index a6d8adc950..07b0ba11ef 100644 --- a/lily/include/gregorian-ligature.hh +++ b/lily/include/gregorian-ligature.hh @@ -11,11 +11,13 @@ class Grob; #include "std-string.hh" +#include "grob-interface.hh" + class Gregorian_ligature { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static string prefixes_to_str (Grob *); }; diff --git a/lily/include/grid-line-interface.hh b/lily/include/grid-line-interface.hh index fc789eea2e..1ff2de217f 100644 --- a/lily/include/grid-line-interface.hh +++ b/lily/include/grid-line-interface.hh @@ -11,6 +11,8 @@ #include "lily-proto.hh" #include "lily-guile.hh" +#include "grob-interface.hh" + class Grid_line_interface { @@ -18,13 +20,13 @@ public: static void add_grid_point (Grob *me, Grob *b); DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (width, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; class Grid_point_interface { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* GRID_LINE_INTERFACE_HH */ diff --git a/lily/include/grob-interface.hh b/lily/include/grob-interface.hh index 29cf625874..f6a92c0afe 100644 --- a/lily/include/grob-interface.hh +++ b/lily/include/grob-interface.hh @@ -11,19 +11,23 @@ #include "lily-guile.hh" -#define ADD_INTERFACE(cl, a, b, c) \ +#define DECLARE_GROB_INTERFACE() \ + static SCM interface_symbol_; \ + static bool has_interface (Grob*) + +#define ADD_INTERFACE(cl, b, c) \ + SCM cl::interface_symbol_; \ bool cl::has_interface (Grob *me) \ { \ - return me->internal_has_interface (ly_symbol2scm (a)); \ + return me->internal_has_interface (interface_symbol_); \ } \ void cl ## _init_ifaces () \ { \ - add_interface (#cl, a, b, c); \ + cl::interface_symbol_ = add_interface (#cl, b, c); \ } \ ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces); -void add_interface (char const *cxx_name, - char const *symbol, +SCM add_interface (char const *cxx_name, char const *descr, char const *vars); diff --git a/lily/include/grob.hh b/lily/include/grob.hh index 64fb7322a6..3a06afda20 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -110,7 +110,7 @@ public: /* interfaces */ bool internal_has_interface (SCM intf); - static bool has_interface (Grob *me); + DECLARE_GROB_INTERFACE(); /* offsets */ void translate_axis (Real, Axis); diff --git a/lily/include/hairpin.hh b/lily/include/hairpin.hh index 521fad1e4c..b76b4373a3 100644 --- a/lily/include/hairpin.hh +++ b/lily/include/hairpin.hh @@ -8,6 +8,7 @@ #ifndef HAIRPIN_HH #define HAIRPIN_HH +#include "grob-interface.hh" #include "lily-guile.hh" #include "lily-proto.hh" @@ -20,7 +21,7 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); static void consider_suicide (Spanner*); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // HAIRPIN_HH diff --git a/lily/include/hara-kiri-group-spanner.hh b/lily/include/hara-kiri-group-spanner.hh index 0112b0864f..93986178b6 100644 --- a/lily/include/hara-kiri-group-spanner.hh +++ b/lily/include/hara-kiri-group-spanner.hh @@ -11,6 +11,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" class Hara_kiri_group_spanner { @@ -20,7 +21,7 @@ public: DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end)); DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_y_parent_callback, (SCM)); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static bool request_suicide (Grob *me, int start, int end); static void consider_suicide (Grob *me); static void add_interesting_item (Grob *me, Grob *n); diff --git a/lily/include/horizontal-bracket.hh b/lily/include/horizontal-bracket.hh index cb54b95a26..dea58a3ccc 100644 --- a/lily/include/horizontal-bracket.hh +++ b/lily/include/horizontal-bracket.hh @@ -12,6 +12,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" #include "std-vector.hh" +#include "grob-interface.hh" struct Horizontal_bracket { @@ -20,7 +21,7 @@ struct Horizontal_bracket static Stencil make_enclosing_bracket (Grob *me, Grob *refpoint, vector grobs, Axis a, Direction dir); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* HORIZONTAL_BRACKET_HH */ diff --git a/lily/include/item.hh b/lily/include/item.hh index 7c28a35240..d1d7a2f7d9 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -8,6 +8,7 @@ #ifndef ITEM_HH #define ITEM_HH +#include "grob-interface.hh" #include "box.hh" #include "grob.hh" @@ -40,7 +41,7 @@ public: virtual Paper_column *get_column () const; virtual void handle_prebroken_dependencies (); virtual Interval_t spanned_rank_iv (); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); protected: virtual void discretionary_processing (); void copy_breakable_items (); diff --git a/lily/include/line-interface.hh b/lily/include/line-interface.hh index 8b8bd6df90..ec33ce93c6 100644 --- a/lily/include/line-interface.hh +++ b/lily/include/line-interface.hh @@ -10,11 +10,12 @@ #define LINE_INTERFACE_HH #include "lily-proto.hh" +#include "grob-interface.hh" struct Line_interface { static Stencil line (Grob *me, Offset from, Offset to); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Stencil make_dashed_line (Real th, Offset from, Offset to, Real, Real); static Stencil make_line (Real th, Offset from, Offset to); static Stencil make_arrow (Offset beg, Offset end, Real thick, diff --git a/lily/include/line-spanner.hh b/lily/include/line-spanner.hh index be124f74e4..4c7e4471d6 100644 --- a/lily/include/line-spanner.hh +++ b/lily/include/line-spanner.hh @@ -10,6 +10,7 @@ #define LINE_SPANNER_HH #include "lily-guile.hh" +#include "grob-interface.hh" class Grob; class Stencil; @@ -20,7 +21,7 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); static Stencil line_stencil (Grob *me, Offset f, Offset t); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); private: static Offset get_broken_offset (Grob *me, Direction dir); diff --git a/lily/include/lyric-extender.hh b/lily/include/lyric-extender.hh index c4e4cf3479..4d891f8c14 100644 --- a/lily/include/lyric-extender.hh +++ b/lily/include/lyric-extender.hh @@ -8,7 +8,8 @@ #ifndef EXTENDER_SPANNER_HH #define EXTENDER_SPANNER_HH -#include "spanner.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" /* Extenders must be entered manually for now. @@ -26,7 +27,7 @@ class Lyric_extender { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (print, (SCM)); }; diff --git a/lily/include/lyric-hyphen.hh b/lily/include/lyric-hyphen.hh index d842a389e9..b5377ae82a 100644 --- a/lily/include/lyric-hyphen.hh +++ b/lily/include/lyric-hyphen.hh @@ -7,13 +7,14 @@ #ifndef HYPHEN_SPANNER_HH #define HYPHEN_SPANNER_HH -#include "spanner.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" struct Lyric_hyphen { public: DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM)); - bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (print, (SCM)); }; diff --git a/lily/include/measure-grouping-spanner.hh b/lily/include/measure-grouping-spanner.hh index 96612d1286..ef481714ee 100644 --- a/lily/include/measure-grouping-spanner.hh +++ b/lily/include/measure-grouping-spanner.hh @@ -9,14 +9,16 @@ #ifndef MEASURE_GROUPING_SPANNER_HH #define MEASURE_GROUPING_SPANNER_HH -#include "grob.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" + class Measure_grouping { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* MEASURE_GROUPING_SPANNER_HH */ diff --git a/lily/include/melody-spanner.hh b/lily/include/melody-spanner.hh index 42762c0a6f..a02fc1f576 100644 --- a/lily/include/melody-spanner.hh +++ b/lily/include/melody-spanner.hh @@ -12,11 +12,12 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" class Melody_spanner { public: - static bool has_interface (Grob*); + DECLARE_GROB_INTERFACE(); static void add_stem (Grob*, Grob*); DECLARE_SCHEME_CALLBACK(calc_neutral_stem_direction, (SCM)); }; diff --git a/lily/include/mensural-ligature.hh b/lily/include/mensural-ligature.hh index bb51eaca88..e887e07a9a 100644 --- a/lily/include/mensural-ligature.hh +++ b/lily/include/mensural-ligature.hh @@ -12,6 +12,8 @@ #include "lily-proto.hh" #include "lily-guile.hh" +#include "grob-interface.hh" + /* * These are all possible mensural ligature primitives. @@ -32,7 +34,7 @@ struct Mensural_ligature { DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM)); DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* MENSURAL_LIGATURE_HH */ diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index b5ea6f5895..2b29582869 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -9,13 +9,14 @@ #ifndef MULTI_MEASURE_REST_HH #define MULTI_MEASURE_REST_HH +#include "grob-interface.hh" #include "lily-guile.hh" #include "rod.hh" class Multi_measure_rest { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (percent, (SCM)); static void add_column (Grob *, Item *); diff --git a/lily/include/note-collision.hh b/lily/include/note-collision.hh index 11f578ce81..20de1ca362 100644 --- a/lily/include/note-collision.hh +++ b/lily/include/note-collision.hh @@ -12,6 +12,8 @@ #include "lily-proto.hh" #include "lily-guile.hh" #include "std-vector.hh" +#include "grob-interface.hh" + /** Resolve conflicts between various Note_columns (chords). @@ -32,6 +34,6 @@ public: static Drul_array > get_clash_groups (Grob *me); DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM smob)); static void add_column (Grob *me, Grob *ncol); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // COLLISION_HH diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index ec12414539..73030a46d9 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -9,7 +9,9 @@ #ifndef NOTE_COLUMN_HH #define NOTE_COLUMN_HH -#include "item.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" + /** a struct for treating a group of noteheads (noteheads, stem (chord) and scripts) as a single entity. @@ -32,7 +34,7 @@ public: static void set_dotcol (Grob *me, Grob *); static void add_head (Grob *me, Grob *); static bool has_rests (Grob *me); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Item *get_stem (Grob *); }; diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index 55b1107f9f..ff4e9a848a 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -8,6 +8,7 @@ #define NOTEHEAD_HH #include "stencil.hh" +#include "grob-interface.hh" /** ball at the end of the stem. Also takes care of ledger lines. @@ -23,7 +24,7 @@ public: DECLARE_SCHEME_CALLBACK (brew_ez_stencil, (SCM)); DECLARE_SCHEME_CALLBACK (stem_x_shift, (SCM)); DECLARE_SCHEME_CALLBACK (calc_stem_attachment, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Real stem_attachment_coordinate (Grob *, Axis a); static int get_balltype (Grob *); diff --git a/lily/include/note-spacing.hh b/lily/include/note-spacing.hh index cd786f8de1..dc8cbe4e02 100644 --- a/lily/include/note-spacing.hh +++ b/lily/include/note-spacing.hh @@ -9,12 +9,13 @@ #ifndef NOTE_SPACING_HH #define NOTE_SPACING_HH +#include "grob-interface.hh" #include "lily-proto.hh" class Note_spacing { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void get_spacing (Grob *me, Item *, Real, Real, Real *, Real *); static void stem_dir_correction (Grob *me, Item *next_col, Real incr, diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh index 6adbdbe179..c182d6aa6c 100644 --- a/lily/include/paper-column.hh +++ b/lily/include/paper-column.hh @@ -11,6 +11,7 @@ #include "item.hh" #include "rod.hh" +#include "lily-proto.hh" class Paper_column : public Item { @@ -42,7 +43,7 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static int get_rank (Grob *); static bool is_musical (Grob *); static Moment when_mom (Grob *); diff --git a/lily/include/percent-repeat-item.hh b/lily/include/percent-repeat-item.hh index 58d8d0ee64..83662b5d3d 100644 --- a/lily/include/percent-repeat-item.hh +++ b/lily/include/percent-repeat-item.hh @@ -9,12 +9,13 @@ #ifndef PERCENT_REPEAT_ITEM_HH #define PERCENT_REPEAT_ITEM_HH -#include "grob.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" class Percent_repeat_item_interface { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (beat_slash, (SCM)); DECLARE_SCHEME_CALLBACK (double_percent, (SCM)); static Stencil x_percent (Grob *, int, Real, Real); diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index fe76e1b15c..c90883c2e2 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -9,6 +9,7 @@ #ifndef REST_COLLISION_HH #define REST_COLLISION_HH +#include "grob-interface.hh" #include "lily-proto.hh" #include "lily-guile.hh" @@ -17,7 +18,7 @@ class Rest_collision public: static void add_column (Grob *me, Grob *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element)); DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM element)); DECLARE_SCHEME_CALLBACK (force_shift_callback_rest, (SCM element, SCM off)); diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 357b76bcb2..4d8be0e01c 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -10,6 +10,7 @@ #define REST_HH #include "lily-guile.hh" +#include "grob-interface.hh" class Grob; @@ -17,7 +18,7 @@ class Rest { public: DECLARE_SCHEME_CALLBACK (y_offset_callback, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static string glyph_name (Grob *, int, string, bool); static SCM brew_internal_stencil (Grob*, bool); static SCM generic_extent_callback (Grob*, Axis); diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index cd1620fb8c..f59e758a4b 100644 --- a/lily/include/rhythmic-head.hh +++ b/lily/include/rhythmic-head.hh @@ -9,6 +9,7 @@ #ifndef RHYTHMIC_HEAD_HH #define RHYTHMIC_HEAD_HH +#include "grob-interface.hh" #include "lily-guile.hh" #include "lily-proto.hh" @@ -21,7 +22,7 @@ public: static Item *get_dots (Grob *); static int dot_count (Grob *); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // RHYTHMIC_HEAD_HH diff --git a/lily/include/script-column.hh b/lily/include/script-column.hh index d4b1210726..d3ac2e49ff 100644 --- a/lily/include/script-column.hh +++ b/lily/include/script-column.hh @@ -11,7 +11,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" - +#include "grob-interface.hh" #include "std-vector.hh" class Script_column @@ -20,7 +20,7 @@ public: static void add_side_positioned (Grob *, Grob *); DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM)); DECLARE_SCHEME_CALLBACK (row_before_line_breaking, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void order_grobs (vector grobs); }; diff --git a/lily/include/script-interface.hh b/lily/include/script-interface.hh index 8d0e0355c0..3b8d714eeb 100644 --- a/lily/include/script-interface.hh +++ b/lily/include/script-interface.hh @@ -11,6 +11,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" /** Articulation marks (and the like) that are attached to notes/stems. @@ -21,7 +22,7 @@ class Script_interface { public: static Stencil get_stencil (Grob *, Direction d); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (calc_direction, (SCM)); }; diff --git a/lily/include/self-alignment-interface.hh b/lily/include/self-alignment-interface.hh index 63ea1c0f59..4fe353fb97 100644 --- a/lily/include/self-alignment-interface.hh +++ b/lily/include/self-alignment-interface.hh @@ -9,11 +9,12 @@ #ifndef SELF_ALIGNMENT_INTERFACE_HH #define SELF_ALIGNMENT_INTERFACE_HH -#include "spanner.hh" +#include "lily-proto.hh" +#include "grob-interface.hh" struct Self_alignment_interface { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static SCM aligned_on_self (Grob *me, Axis a); static SCM centered_on_object (Grob *me, Axis a); diff --git a/lily/include/semi-tie-column.hh b/lily/include/semi-tie-column.hh index cfeb7fc779..d27ad3c5a4 100644 --- a/lily/include/semi-tie-column.hh +++ b/lily/include/semi-tie-column.hh @@ -16,7 +16,7 @@ struct Semi_tie_column { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK(calc_positioning_done, (SCM)); }; diff --git a/lily/include/semi-tie.hh b/lily/include/semi-tie.hh index ec63c627ef..0d5bb85f75 100644 --- a/lily/include/semi-tie.hh +++ b/lily/include/semi-tie.hh @@ -16,7 +16,7 @@ struct Semi_tie { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (calc_direction, (SCM)); DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM)); diff --git a/lily/include/separating-group-spanner.hh b/lily/include/separating-group-spanner.hh index 15b6aecbe8..1419d53971 100644 --- a/lily/include/separating-group-spanner.hh +++ b/lily/include/separating-group-spanner.hh @@ -9,7 +9,8 @@ #ifndef SEPARATING_GROUP_SPANNER_HH #define SEPARATING_GROUP_SPANNER_HH -#include "spanner.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" class Separating_group_spanner { @@ -20,7 +21,7 @@ class Separating_group_spanner public: static void add_spacing_unit (Grob *me, Item *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM)); }; diff --git a/lily/include/separation-item.hh b/lily/include/separation-item.hh index 012935761b..c5d7c7106a 100644 --- a/lily/include/separation-item.hh +++ b/lily/include/separation-item.hh @@ -11,10 +11,11 @@ #include "lily-proto.hh" #include "direction.hh" +#include "grob-interface.hh" struct Separation_item { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Interval conditional_width (Grob *, Grob *); static Interval width (Grob *); static Interval relative_width (Grob *, Grob *); diff --git a/lily/include/side-position-interface.hh b/lily/include/side-position-interface.hh index fd58027a88..dc105cea4a 100644 --- a/lily/include/side-position-interface.hh +++ b/lily/include/side-position-interface.hh @@ -9,8 +9,8 @@ #ifndef SIDE_POSITION_INTERFACE_HH #define SIDE_POSITION_INTERFACE_HH -#include "spanner.hh" -#include "item.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" /* TODO: move out unrelated callbacks. @@ -33,7 +33,7 @@ public: bool pure, int start, int end, Real *current_off); static Axis get_axis (Grob *); static void set_axis (Grob *, Axis); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void add_support (Grob *, Grob *); static void add_staff_support (Grob *); static Direction get_direction (Grob *); diff --git a/lily/include/slur.hh b/lily/include/slur.hh index d8603485d5..f31aba7bb2 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -13,6 +13,7 @@ #include "lily-proto.hh" #include "lily-guile.hh" #include "std-vector.hh" +#include "grob-interface.hh" class Slur { @@ -28,7 +29,7 @@ public: DECLARE_SCHEME_CALLBACK (height, (SCM)); DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM, SCM)); DECLARE_SCHEME_CALLBACK (pure_outside_slur_callback, (SCM, SCM, SCM, SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Bezier get_curve (Grob *me); }; diff --git a/lily/include/spaceable-grob.hh b/lily/include/spaceable-grob.hh index 3167a5e351..573be0337f 100644 --- a/lily/include/spaceable-grob.hh +++ b/lily/include/spaceable-grob.hh @@ -11,6 +11,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" struct Spaceable_grob { @@ -19,7 +20,7 @@ struct Spaceable_grob static void add_spring (Grob *me, Grob *to, Real dist, Real strength); static void get_spring (Grob *me, Grob *other, Real *dist, Real *inv_strength); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void remove_interface (Grob *); static SCM get_minimum_distances (Grob *); static SCM get_ideal_distances (Grob *); diff --git a/lily/include/spacing-interface.hh b/lily/include/spacing-interface.hh index c33eea09d4..1d7665bbb5 100644 --- a/lily/include/spacing-interface.hh +++ b/lily/include/spacing-interface.hh @@ -5,9 +5,11 @@ (c) 2002--2006 Han-Wen Nienhuys */ +#include "grob-interface.hh" +#include "lily-proto.hh" struct Spacing_interface { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; diff --git a/lily/include/spacing-spanner.hh b/lily/include/spacing-spanner.hh index f39ea98bc3..719d8d1fb3 100644 --- a/lily/include/spacing-spanner.hh +++ b/lily/include/spacing-spanner.hh @@ -13,6 +13,7 @@ #include "lily-guile.hh" #include "rational.hh" #include "std-vector.hh" +#include "grob-interface.hh" struct Spacing_options { @@ -56,7 +57,7 @@ public: DECLARE_SCHEME_CALLBACK (set_springs, (SCM)); DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* SPACING_SPANNER_HH */ diff --git a/lily/include/span-bar.hh b/lily/include/span-bar.hh index ed9802eb46..a328101ade 100644 --- a/lily/include/span-bar.hh +++ b/lily/include/span-bar.hh @@ -11,6 +11,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" /** This is a barline that is spanned across other bar lines. This is @@ -21,7 +22,7 @@ class Span_bar { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Interval get_spanned_interval (Grob *); static void add_bar (Grob *, Grob *); static void evaluate_glyph (Grob *); diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 8267bf1af4..abc6d23adc 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -9,6 +9,8 @@ #include "grob.hh" #include "rod.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" /** A symbol which is attached between two columns. A spanner is a symbol which spans across several columns, so its final appearance @@ -60,7 +62,7 @@ public: static bool less (Spanner *const &, Spanner *const &); virtual Grob *find_broken_piece (System *) const; virtual void derived_mark () const; - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); virtual System *get_system () const; protected: diff --git a/lily/include/staff-spacing.hh b/lily/include/staff-spacing.hh index 9b3010facd..af6d394ead 100644 --- a/lily/include/staff-spacing.hh +++ b/lily/include/staff-spacing.hh @@ -10,13 +10,14 @@ #define STAFF_SPACING_HH #include "lily-proto.hh" +#include "grob-interface.hh" class Staff_spacing { public: static void next_notes_correction (Grob *, Grob *, Real *, Real *); static void next_note_correction (Grob *, Grob *, Interval, Real*, Real *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void get_spacing_params (Grob *, Real *, Real *); static Interval bar_y_positions (Grob *); diff --git a/lily/include/staff-symbol-referencer.hh b/lily/include/staff-symbol-referencer.hh index 1b4c096b8e..e6d4ceeec5 100644 --- a/lily/include/staff-symbol-referencer.hh +++ b/lily/include/staff-symbol-referencer.hh @@ -9,7 +9,8 @@ #ifndef STAFF_SYMBOL_REFERENCER_HH #define STAFF_SYMBOL_REFERENCER_HH -#include "grob.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" /** A notation object that needs access to variables of the staff (no @@ -18,7 +19,7 @@ class Staff_symbol_referencer { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static bool ugly_hack (Grob *); static void set_position (Grob *, Real); DECLARE_SCHEME_CALLBACK (callback, (SCM element)); diff --git a/lily/include/staff-symbol.hh b/lily/include/staff-symbol.hh index edf3a0f532..599c1cbf60 100644 --- a/lily/include/staff-symbol.hh +++ b/lily/include/staff-symbol.hh @@ -11,6 +11,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" /** TODO: add linethickness as parameter. @@ -26,6 +27,6 @@ public: static int line_count (Grob *); DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (height, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif // STAFF_SYMBOL_HH diff --git a/lily/include/stem-tremolo.hh b/lily/include/stem-tremolo.hh index 49b5fd4c5c..d05e5fc410 100644 --- a/lily/include/stem-tremolo.hh +++ b/lily/include/stem-tremolo.hh @@ -11,12 +11,13 @@ #include "lily-proto.hh" #include "lily-guile.hh" +#include "grob-interface.hh" class Stem_tremolo { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (calc_slope, (SCM)); DECLARE_SCHEME_CALLBACK (calc_width, (SCM)); DECLARE_SCHEME_CALLBACK (print, (SCM)); diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 3d06bca6f6..402ab5a14b 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -11,6 +11,7 @@ #include "lily-proto.hh" #include "lily-guile.hh" #include "stem-info.hh" +#include "grob-interface.hh" class Stem { @@ -37,7 +38,7 @@ public: static Real stem_end_position (Grob *); static Stencil flag (Grob *); static Stencil get_translated_flag (Grob*); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void set_spacing_hints (Grob *); DECLARE_SCHEME_CALLBACK (print, (SCM)); diff --git a/lily/include/system-start-delimiter.hh b/lily/include/system-start-delimiter.hh index 115c8cd37a..4304837649 100644 --- a/lily/include/system-start-delimiter.hh +++ b/lily/include/system-start-delimiter.hh @@ -11,6 +11,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" +#include "grob-interface.hh" /* Braces/brackets across staves. @@ -20,7 +21,7 @@ class System_start_delimiter public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void try_collapse (Grob *); static Stencil staff_bracket (Grob *, Real); static Stencil old_staff_bracket (Grob *, Real); diff --git a/lily/include/system.hh b/lily/include/system.hh index f10b9b750f..9866a19667 100644 --- a/lily/include/system.hh +++ b/lily/include/system.hh @@ -12,6 +12,7 @@ #include "spanner.hh" #include "grob-array.hh" #include "skyline.hh" +#include "grob-interface.hh" /* If you keep following offset reference points, you will always end @@ -42,7 +43,7 @@ public: int spanner_count () const; void break_into_pieces (vector const &); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); vector broken_col_range (Item const *, Item const *) const; vector columns () const; diff --git a/lily/include/text-interface.hh b/lily/include/text-interface.hh index 97094c8aec..187e73715e 100644 --- a/lily/include/text-interface.hh +++ b/lily/include/text-interface.hh @@ -11,6 +11,8 @@ #define TEXT_ITEM #include "stencil.hh" +#include "grob-interface.hh" + class Text_interface { @@ -18,7 +20,7 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM)); DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static bool is_markup (SCM); }; diff --git a/lily/include/text-spanner.hh b/lily/include/text-spanner.hh index 86f87e264b..28fc7c680a 100644 --- a/lily/include/text-spanner.hh +++ b/lily/include/text-spanner.hh @@ -10,14 +10,14 @@ #define TEXT_SPANNER_HH #include "lily-guile.hh" - -class Grob; +#include "grob-interface.hh" +#include "lily-proto.hh" class Text_spanner { public: DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; #endif /* TEXT_SPANNER_HH */ diff --git a/lily/include/tie-column.hh b/lily/include/tie-column.hh index ff101a8839..3826b207ce 100644 --- a/lily/include/tie-column.hh +++ b/lily/include/tie-column.hh @@ -11,11 +11,12 @@ #include "lily-proto.hh" #include "lily-guile.hh" +#include "grob-interface.hh" class Tie_column { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static void add_tie (Grob *me, Grob *); DECLARE_SCHEME_CALLBACK (calc_positioning_done, (SCM)); DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM)); diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 7f96b826cf..9764908fe8 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -12,6 +12,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" #include "skyline.hh" +#include "grob-interface.hh" @@ -20,7 +21,7 @@ class Tie { public: static void set_head (Grob *, Direction, Grob *head); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Grob *head (Grob *, Direction); static int get_column_rank (Grob *, Direction); static int get_position (Grob *); diff --git a/lily/include/time-signature.hh b/lily/include/time-signature.hh index 72cdc97a06..d25843252e 100644 --- a/lily/include/time-signature.hh +++ b/lily/include/time-signature.hh @@ -7,7 +7,8 @@ #ifndef METER_HH #define METER_HH -#include "item.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" /** Print a time_signature sign. @@ -18,7 +19,7 @@ */ struct Time_signature { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Stencil special_time_signature (Grob *, SCM, int, int); static Stencil numbered_time_signature (Grob *, int, int); DECLARE_SCHEME_CALLBACK (print, (SCM)); diff --git a/lily/include/tuplet-bracket.hh b/lily/include/tuplet-bracket.hh index 1b9d9c03c0..221be2b6d3 100644 --- a/lily/include/tuplet-bracket.hh +++ b/lily/include/tuplet-bracket.hh @@ -10,6 +10,7 @@ #include "lily-guile.hh" #include "lily-proto.hh" #include "std-vector.hh" +#include "grob-interface.hh" class Tuplet_bracket { @@ -20,7 +21,7 @@ public: DECLARE_SCHEME_CALLBACK (print, (SCM)); DECLARE_SCHEME_CALLBACK (calc_connect_to_neighbors, (SCM smob)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); static Grob* get_common_x (Spanner *); static void add_tuplet_bracket (Grob *me, Grob *smaller_bracket); static void get_bounds (Grob *, Grob **, Grob **); diff --git a/lily/include/vaticana-ligature.hh b/lily/include/vaticana-ligature.hh index f84280cc40..c9e53803e4 100644 --- a/lily/include/vaticana-ligature.hh +++ b/lily/include/vaticana-ligature.hh @@ -10,12 +10,14 @@ #define VATICANA_LIGATURE_HH #include "stencil.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" struct Vaticana_ligature { DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM)); DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; /* diff --git a/lily/include/volta-bracket.hh b/lily/include/volta-bracket.hh index f9999b92f6..955876f6f6 100644 --- a/lily/include/volta-bracket.hh +++ b/lily/include/volta-bracket.hh @@ -8,11 +8,13 @@ #define VOLTA_SPANNER_HH #include "spanner.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" class Volta_bracket_interface { public: - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (print, (SCM)); static void modify_edge_height (Spanner *); static void add_column (Grob *, Grob *col); diff --git a/lily/item.cc b/lily/item.cc index ff00630b5f..173df20ed8 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -197,9 +197,7 @@ unsmob_item (SCM s) } ADD_INTERFACE (Item, - "item-interface", - "\n" - "\n" + "Grobs can be distinguished in their role in the horizontal spacing.\n" "Many grobs define constraints on the spacing by their sizes. For\n" "example, note heads, clefs, stems, and all other symbols with a fixed\n" diff --git a/lily/key-signature-interface.cc b/lily/key-signature-interface.cc index 5705b46ccf..60a11db86a 100644 --- a/lily/key-signature-interface.cc +++ b/lily/key-signature-interface.cc @@ -20,7 +20,7 @@ struct Key_signature_interface { DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; /* @@ -149,6 +149,6 @@ Key_signature_interface::print (SCM smob) return mol.smobbed_copy (); } -ADD_INTERFACE (Key_signature_interface, "key-signature-interface", +ADD_INTERFACE (Key_signature_interface, "A group of accidentals, to be printed as signature sign.", "style c0-position alteration-alist"); diff --git a/lily/ledger-line-spanner.cc b/lily/ledger-line-spanner.cc index 1817b49be9..4a62aa7e4d 100644 --- a/lily/ledger-line-spanner.cc +++ b/lily/ledger-line-spanner.cc @@ -29,7 +29,7 @@ struct Ledger_line_spanner Interval x_extent, Real left_shorten); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; Stencil @@ -352,7 +352,6 @@ Ledger_line_spanner::print (SCM smob) } ADD_INTERFACE (Ledger_line_spanner, - "ledger-line-spanner-interface", "This spanner draws the ledger lines of a staff.\n" "This is a separate grob because it has to process\n" @@ -368,11 +367,10 @@ ADD_INTERFACE (Ledger_line_spanner, struct Ledgered_interface { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; ADD_INTERFACE (Ledgered_interface, - "ledgered-interface", "Objects that need ledger lines, typically " "note heads. See also @ref{ledger-line-spanner-interface}.", diff --git a/lily/ligature-bracket-engraver.cc b/lily/ligature-bracket-engraver.cc index 18efd8177a..6e8dd9a22a 100644 --- a/lily/ligature-bracket-engraver.cc +++ b/lily/ligature-bracket-engraver.cc @@ -11,6 +11,9 @@ #include "tuplet-bracket.hh" #include "spanner.hh" #include "stream-event.hh" +#include "spanner.hh" +#include "item.hh" + #include "translator.icc" /* diff --git a/lily/line-interface.cc b/lily/line-interface.cc index ff7fae5783..74b8c034bc 100644 --- a/lily/line-interface.cc +++ b/lily/line-interface.cc @@ -11,6 +11,7 @@ #include "staff-symbol-referencer.hh" #include "lookup.hh" #include "output-def.hh" +#include "grob.hh" Stencil Line_interface::make_arrow (Offset begin, Offset end, @@ -139,7 +140,7 @@ Line_interface::line (Grob *me, Offset from, Offset to) return stil; } -ADD_INTERFACE (Line_interface, "line-interface", +ADD_INTERFACE (Line_interface, "Generic line objects. Any object using lines supports this. Normally, " "you get a straight line. If @code{dash-period} is defined, a dashed line is " "produced; the length of the dashes is tuned with " diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index 0b6a9fae7f..48d4b3aa9b 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -299,7 +299,7 @@ Line_spanner::print (SCM smob) } } -ADD_INTERFACE (Line_spanner, "line-spanner-interface", +ADD_INTERFACE (Line_spanner, "Generic line drawn between two objects, e.g. for use with glissandi.\n" "The property @code{style} can be @code{line}, " "@code{dashed-line}, @code{trill}, \n" diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index 867a6d83d3..b7d9bb6e10 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -8,7 +8,8 @@ #include "lyric-extender.hh" - +#include "spanner.hh" +#include "item.hh" #include "warn.hh" #include "lookup.hh" #include "paper-column.hh" @@ -84,7 +85,7 @@ Lyric_extender::print (SCM smob) return mol.smobbed_copy (); } -ADD_INTERFACE (Lyric_extender, "lyric-extender-interface", +ADD_INTERFACE (Lyric_extender, "The extender is a simple line at the baseline of the lyric " "that helps show the length of a melissima (tied/slurred note).", diff --git a/lily/lyric-hyphen.cc b/lily/lyric-hyphen.cc index b6636477c5..d38460be74 100644 --- a/lily/lyric-hyphen.cc +++ b/lily/lyric-hyphen.cc @@ -13,6 +13,7 @@ #include "output-def.hh" #include "paper-column.hh" #include "moment.hh" +#include "spanner.hh" /* TODO: should extract hyphen dimensions or hyphen glyph from the @@ -130,8 +131,6 @@ Lyric_hyphen::set_spacing_rods (SCM smob) ADD_INTERFACE (Lyric_hyphen, - "lyric-hyphen-interface", - "A centered hyphen is a simple line between " "lyrics used to divide syllables", diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc index 49b5195594..fe7abf1ea4 100644 --- a/lily/measure-grouping-engraver.cc +++ b/lily/measure-grouping-engraver.cc @@ -10,6 +10,7 @@ #include "side-position-interface.hh" #include "global-context.hh" #include "engraver.hh" +#include "spanner.hh" #include "translator.icc" diff --git a/lily/measure-grouping-spanner.cc b/lily/measure-grouping-spanner.cc index 9306badd21..a256d0468d 100644 --- a/lily/measure-grouping-spanner.cc +++ b/lily/measure-grouping-spanner.cc @@ -47,7 +47,7 @@ Measure_grouping::print (SCM grob) return m.smobbed_copy (); } -ADD_INTERFACE (Measure_grouping, "measure-grouping-interface", +ADD_INTERFACE (Measure_grouping, "This object indicates groups of beats. " "Valid choices for @code{style} are @code{bracket} and @code{triangle}.", "thickness style height"); diff --git a/lily/melody-spanner.cc b/lily/melody-spanner.cc index d0544ab2d2..d4901f2c9b 100644 --- a/lily/melody-spanner.cc +++ b/lily/melody-spanner.cc @@ -88,7 +88,7 @@ Melody_spanner::add_stem (Grob *me, Grob *stem) stem->set_property ("neutral-direction", Melody_spanner::calc_neutral_stem_direction_proc); } -ADD_INTERFACE (Melody_spanner, "melody-spanner-interface", +ADD_INTERFACE (Melody_spanner, "Context dependent typesetting decisions.", "stems " diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc index a351494325..88a1181058 100644 --- a/lily/mensural-ligature.cc +++ b/lily/mensural-ligature.cc @@ -219,7 +219,7 @@ Mensural_ligature::print (SCM) return SCM_EOL; } -ADD_INTERFACE (Mensural_ligature, "mensural-ligature-interface", +ADD_INTERFACE (Mensural_ligature, "A mensural ligature", "delta-position " diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 9a7816bf0d..5d0d7d9713 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -12,6 +12,7 @@ #include "staff-symbol-referencer.hh" #include "stream-event.hh" #include "moment.hh" +#include "spanner.hh" #include "translator.icc" diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 0a87a137ed..44d699b7ce 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -351,7 +351,7 @@ Multi_measure_rest::set_text_rods (SCM smob) return SCM_UNSPECIFIED; } -ADD_INTERFACE (Multi_measure_rest, "multi-measure-rest-interface", +ADD_INTERFACE (Multi_measure_rest, "A rest that spans a whole number of measures.", /* properties */ diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index d944c6327f..594f24f337 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -15,6 +15,7 @@ #include "side-position-interface.hh" #include "stem.hh" #include "stream-event.hh" +#include "item.hh" #include "warn.hh" #include "translator.icc" diff --git a/lily/note-collision.cc b/lily/note-collision.cc index ddfbf19983..e880c6cc29 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -15,6 +15,7 @@ #include "note-head.hh" #include "output-def.hh" #include "pointer-group-interface.hh" +#include "item.hh" #include "rhythmic-head.hh" #include "staff-symbol-referencer.hh" #include "side-position-interface.hh" @@ -529,7 +530,7 @@ Note_collision_interface::add_column (Grob *me, Grob *ncol) Axis_group_interface::add_element (me, ncol); } -ADD_INTERFACE (Note_collision_interface, "note-collision-interface", +ADD_INTERFACE (Note_collision_interface, "An object that handles collisions between notes with different stem " "directions and horizontal shifts. Most of the interesting properties " "are to be set in @ref{note-column-interface}: these are " diff --git a/lily/note-column.cc b/lily/note-column.cc index 146b3b0654..a53c060069 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -15,6 +15,7 @@ using namespace std; #include "axis-group-interface.hh" #include "directional-element-interface.hh" #include "international.hh" +#include "item.hh" #include "note-head.hh" #include "output-def.hh" #include "pointer-group-interface.hh" @@ -186,7 +187,7 @@ Note_column::arpeggio (Grob *me) return unsmob_grob (me->get_object ("arpeggio")); } -ADD_INTERFACE (Note_column, "note-column-interface", +ADD_INTERFACE (Note_column, "Stem and noteheads combined", /* properties */ diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index 4493ffb7b1..2d48f05c70 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -13,6 +13,9 @@ #include "side-position-interface.hh" #include "staff-symbol-referencer.hh" #include "context.hh" +#include "spanner.hh" +#include "item.hh" + /** Create line-spanner grobs for lines that connect note heads. diff --git a/lily/note-head.cc b/lily/note-head.cc index ecf59808f3..7628a8fc57 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -141,7 +141,7 @@ Note_head::calc_stem_attachment (SCM smob) } -ADD_INTERFACE (Note_head, "note-head-interface", +ADD_INTERFACE (Note_head, "Note head", /* properties */ diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 2700c12835..f601a1054b 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -455,7 +455,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn, */ } -ADD_INTERFACE (Note_spacing, "note-spacing-interface", +ADD_INTERFACE (Note_spacing, "This object calculates spacing wishes for individual voices.", diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index f3b90b124c..f1894a25a8 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -24,7 +24,7 @@ struct Ottava_bracket { DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; /* @@ -176,8 +176,6 @@ Ottava_bracket::print (SCM smob) } ADD_INTERFACE (Ottava_bracket, - "ottava-bracket-interface", - "An ottava bracket", /* diff --git a/lily/ottava-engraver.cc b/lily/ottava-engraver.cc index 243a5aff2d..6afa928387 100644 --- a/lily/ottava-engraver.cc +++ b/lily/ottava-engraver.cc @@ -10,6 +10,8 @@ #include "note-column.hh" #include "side-position-interface.hh" #include "engraver.hh" +#include "spanner.hh" +#include "item.hh" class Ottava_spanner_engraver : public Engraver { diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 0f01da091e..78b09c3875 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -203,8 +203,6 @@ Paper_column::before_line_breaking (SCM grob) ADD_INTERFACE (Paper_column, - - "paper-column-interface", "@code{Paper_column} objects form the top-most X-parents for items." " The are two types of columns: musical columns, where are attached to, and " " non-musical columns, where bar-lines, clefs etc. are attached to. " diff --git a/lily/part-combine-engraver.cc b/lily/part-combine-engraver.cc index b862a4f73d..121ad3fbd2 100644 --- a/lily/part-combine-engraver.cc +++ b/lily/part-combine-engraver.cc @@ -15,6 +15,7 @@ #include "stem.hh" #include "stream-event.hh" #include "text-interface.hh" +#include "item.hh" #include "translator.icc" diff --git a/lily/percent-repeat-item.cc b/lily/percent-repeat-item.cc index a80015d396..705d9394b2 100644 --- a/lily/percent-repeat-item.cc +++ b/lily/percent-repeat-item.cc @@ -7,8 +7,7 @@ */ #include "percent-repeat-item.hh" - - +#include "item.hh" #include "lookup.hh" #include "font-interface.hh" @@ -71,7 +70,7 @@ Percent_repeat_item_interface::beat_slash (SCM grob) return m.smobbed_copy (); } -ADD_INTERFACE (Percent_repeat_item_interface, "percent-repeat-item-interface", +ADD_INTERFACE (Percent_repeat_item_interface, "Repeats that look like percent signs", "slope " diff --git a/lily/piano-pedal-bracket.cc b/lily/piano-pedal-bracket.cc index baffc8fe98..8c76a60d13 100644 --- a/lily/piano-pedal-bracket.cc +++ b/lily/piano-pedal-bracket.cc @@ -14,7 +14,7 @@ struct Piano_pedal_bracket { DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; MAKE_SCHEME_CALLBACK (Piano_pedal_bracket, print, 1); @@ -90,7 +90,6 @@ Piano_pedal_bracket::print (SCM smob) } ADD_INTERFACE (Piano_pedal_bracket, - "piano-pedal-bracket-interface", "The bracket of the piano pedal. " "It can be tuned through the regular " diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 25c486f9e6..8c919cb36f 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -23,9 +23,12 @@ #include "stream-event.hh" #include "string-convert.hh" #include "warn.hh" -#include "protected-scm.hh" +#include "spanner.hh" +#include "item.hh" + #include "translator.icc" + /* TODO: diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index 50d2d862ac..f072c3c84e 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -5,10 +5,13 @@ (c) 1997--2006 Han-Wen Nienhuys */ + +#include "engraver.hh" + #include "staff-symbol-referencer.hh" #include "note-head.hh" #include "rhythmic-head.hh" -#include "engraver.hh" +#include "grob.hh" class Pitch_squash_engraver : public Engraver { diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc index 6158a8b4f4..fb1c763b9e 100644 --- a/lily/rest-collision-engraver.cc +++ b/lily/rest-collision-engraver.cc @@ -10,6 +10,7 @@ #include "engraver.hh" #include "rest-collision.hh" #include "note-column.hh" +#include "item.hh" class Rest_collision_engraver : public Engraver { diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 959bf2156b..899d22a5c7 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -260,7 +260,7 @@ Rest_collision::calc_positioning_done (SCM smob) return SCM_UNSPECIFIED; } -ADD_INTERFACE (Rest_collision, "rest-collision-interface", +ADD_INTERFACE (Rest_collision, "Move around ordinary rests (not multi-measure-rests) to avoid " "conflicts.", diff --git a/lily/rest.cc b/lily/rest.cc index d7351d648a..139386416d 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -186,7 +186,7 @@ Rest::generic_extent_callback (Grob *me, Axis a) return ly_interval2scm (unsmob_stencil (m)->extent (a)); } -ADD_INTERFACE (Rest, "rest-interface", +ADD_INTERFACE (Rest, "A rest symbol.", /* properties */ diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 9543fcc92f..ec8b754873 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -10,6 +10,7 @@ #include "rhythmic-head.hh" #include "stem.hh" #include "note-column.hh" +#include "item.hh" #include "dot-column.hh" #include "pointer-group-interface.hh" diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index f771c75edc..00ef3ae020 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -50,8 +50,6 @@ Rhythmic_head::duration_log (Grob *me) ADD_INTERFACE (Rhythmic_head, - "rhythmic-head-interface", - "Note head or rest", "dot " diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index ce69a3929c..ada6f0aac4 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -9,6 +9,7 @@ #include "engraver.hh" #include "script-column.hh" #include "side-position-interface.hh" +#include "item.hh" #include "translator.icc" @@ -18,7 +19,7 @@ class Script_column_engraver : public Engraver { Grob *script_column_; - vector scripts_; + vector scripts_; public: TRANSLATOR_DECLARATIONS (Script_column_engraver); diff --git a/lily/script-column.cc b/lily/script-column.cc index 36ebc6971c..511efa7dce 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -140,7 +140,7 @@ Script_column::order_grobs (vector grobs) while (flip (&d) != DOWN); } -ADD_INTERFACE (Script_column, "script-column-interface", +ADD_INTERFACE (Script_column, "An interface that sorts scripts " "according to their @code{script-priority}", diff --git a/lily/script-interface.cc b/lily/script-interface.cc index de8198533b..94bebe9e60 100644 --- a/lily/script-interface.cc +++ b/lily/script-interface.cc @@ -9,6 +9,7 @@ #include "script-interface.hh" #include "directional-element-interface.hh" +#include "item.hh" #include "warn.hh" #include "font-interface.hh" #include "side-position-interface.hh" @@ -78,10 +79,10 @@ Script_interface::print (SCM smob) struct Text_script { - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; -ADD_INTERFACE (Text_script, "text-script-interface", +ADD_INTERFACE (Text_script, "An object that is put above or below a note", /* properties */ @@ -94,7 +95,7 @@ ADD_INTERFACE (Text_script, "text-script-interface", /* Hmm. Where should we put add-stem-support ? */ -ADD_INTERFACE (Script_interface, "script-interface", +ADD_INTERFACE (Script_interface, "An object that is put above or below a note", "add-stem-support " "avoid-slur " diff --git a/lily/script-row-engraver.cc b/lily/script-row-engraver.cc index da06274270..b84c5f22a2 100644 --- a/lily/script-row-engraver.cc +++ b/lily/script-row-engraver.cc @@ -10,6 +10,7 @@ #include "engraver.hh" #include "accidental-placement.hh" +#include "item.hh" #include "script-column.hh" #include "side-position-interface.hh" diff --git a/lily/self-aligment-interface.cc b/lily/self-aligment-interface.cc index 47e9fcc8f0..4c63ce73d2 100644 --- a/lily/self-aligment-interface.cc +++ b/lily/self-aligment-interface.cc @@ -8,6 +8,7 @@ #include "self-alignment-interface.hh" #include "warn.hh" +#include "grob.hh" MAKE_SCHEME_CALLBACK (Self_alignment_interface, y_aligned_on_self, 1); SCM @@ -131,7 +132,7 @@ Self_alignment_interface::set_align_self (Grob *me, Axis a) a); } -ADD_INTERFACE (Self_alignment_interface, "self-alignment-interface", +ADD_INTERFACE (Self_alignment_interface, "Position this object on itself and/or on its parent. To this end, the following functions " " are provided: \n" "@table @code \n" diff --git a/lily/semi-tie-column.cc b/lily/semi-tie-column.cc index 055b377c72..57b81e5d44 100644 --- a/lily/semi-tie-column.cc +++ b/lily/semi-tie-column.cc @@ -22,7 +22,6 @@ ADD_INTERFACE(Semi_tie_column, - "semi-tie-column-interface", "The interface for a column of l.v. ties.", /* properties */ diff --git a/lily/semi-tie.cc b/lily/semi-tie.cc index c5a514b535..77b266e6c4 100644 --- a/lily/semi-tie.cc +++ b/lily/semi-tie.cc @@ -17,8 +17,6 @@ ADD_INTERFACE(Semi_tie, - "semi-tie-interface", - "A tie which is only on one side connected to note heads. ", /* properties */ diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index c905b430e7..d2bc23a6d3 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -109,7 +109,7 @@ Separating_group_spanner::add_spacing_unit (Grob *me, Item *i) Pointer_group_interface::add_unordered_grob (me, ly_symbol2scm ("elements"), i); } -ADD_INTERFACE (Separating_group_spanner, "separating-group-spanner-interface", +ADD_INTERFACE (Separating_group_spanner, "A spanner that calculates spacing constraints (\"rods\") " "using the @code{separation-item-interface} grobs in @code{elements}.", diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index aa6f05a18f..36807989b2 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -16,6 +16,7 @@ #include "note-spacing.hh" #include "accidental-placement.hh" #include "context.hh" +#include "spanner.hh" #include "grob-array.hh" #include "pointer-group-interface.hh" diff --git a/lily/separation-item.cc b/lily/separation-item.cc index 6406a3e0fc..057229c3c9 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -148,7 +148,7 @@ Separation_item::extremal_break_aligned_grob (Grob *me, return last_grob; } -ADD_INTERFACE (Separation_item, "separation-item-interface", +ADD_INTERFACE (Separation_item, "Item that computes widths to generate spacing rods. " "This is done in concert with @ref{separation-spanner-interface}.", "padding X-extent conditional-elements elements"); diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 73854bdc40..825d88e908 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -276,7 +276,7 @@ Side_position_interface::get_axis (Grob *me) return NO_AXES; } -ADD_INTERFACE (Side_position_interface, "side-position-interface", +ADD_INTERFACE (Side_position_interface, "Position a victim object (this one) next to other objects (the " "support). The property @code{direction} signifies where to put the " "victim object relative to the support (left or right, up or down?)\n\n " diff --git a/lily/slur.cc b/lily/slur.cc index a87feb6850..093807b78f 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -212,7 +212,7 @@ void Slur::add_column (Grob *me, Grob *n) { Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-columns"), n); - add_bound_item (dynamic_cast (me), dynamic_cast (n)); + add_bound_item (dynamic_cast (me), n); } void @@ -357,7 +357,7 @@ Slur::auxiliary_acknowledge_extra_object (Grob_info info, } -ADD_INTERFACE (Slur, "slur-interface", +ADD_INTERFACE (Slur, "A slur", diff --git a/lily/spaceable-grob.cc b/lily/spaceable-grob.cc index 0f3dc9849b..679c2bcb19 100644 --- a/lily/spaceable-grob.cc +++ b/lily/spaceable-grob.cc @@ -120,7 +120,7 @@ Spaceable_grob::remove_interface (Grob *me) me->set_object ("ideal-distances", SCM_EOL); } -ADD_INTERFACE (Spaceable_grob, "spaceable-grob-interface", +ADD_INTERFACE (Spaceable_grob, "A layout object that takes part in the spacing problem. ", diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 2f6e90326c..2e174b65c2 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -493,7 +493,7 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r, Spaceable_grob::add_spring (l, r, distance, inverse_strength); } -ADD_INTERFACE (Spacing_spanner, "spacing-spanner-interface", +ADD_INTERFACE (Spacing_spanner, "The space taken by a note is dependent on its duration. Doubling a\n" "duration adds spacing-increment to the space. The most common shortest\n" "note gets @code{shortest-duration-space}. Notes that are even shorter are\n" @@ -518,7 +518,7 @@ ADD_INTERFACE (Spacing_spanner, "spacing-spanner-interface", ); -ADD_INTERFACE (Spacing_interface, "spacing-interface", +ADD_INTERFACE (Spacing_interface, "Something to do with line breaking and spacing. " "Kill this one after determining line breaks.", diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index 55babfbfee..1e236324ac 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -13,6 +13,7 @@ #include "pointer-group-interface.hh" #include "side-position-interface.hh" #include "staff-symbol-referencer.hh" +#include "item.hh" /** Make arpeggios that span multiple staves. Catch arpeggios, and span a diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 5c1c76e855..4566d73f77 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -209,7 +209,7 @@ Span_bar::calc_bar_size (SCM smob) return scm_from_double (iv.length ()); } -ADD_INTERFACE (Span_bar, "span-bar-interface", +ADD_INTERFACE (Span_bar, "A bar line that spanned between other barlines. This interface is " " used for bar lines that connect different staves.", diff --git a/lily/spanner.cc b/lily/spanner.cc index 955ba76ef3..1e49d0b0c9 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -371,7 +371,6 @@ unsmob_spanner (SCM s) } ADD_INTERFACE (Spanner, - "spanner-interface", "Some objects are horizontally spanned between objects. For\n" "example, slur, beam, tie, etc. These grobs form a subtype called\n" "@code{Spanner}. All spanners have two span-points (these must be\n" diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index 1d9182c16c..f89113187e 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -261,7 +261,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real *space, Real *fixed) *fixed += correction_fixed; } -ADD_INTERFACE (Staff_spacing, "staff-spacing-interface", +ADD_INTERFACE (Staff_spacing, "This object calculates spacing details from a " " breakable symbol (left) to another object. For example, it takes care " " of optical spacing from a bar lines to a note.", diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index aa45e55e7a..7fe0bf3131 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -8,8 +8,8 @@ #include "staff-symbol-referencer.hh" - #include "staff-symbol.hh" +#include "grob.hh" #include "output-def.hh" #include "libc-extension.hh" @@ -163,7 +163,7 @@ position_less (Grob *const &a, Grob *const &b) < Staff_symbol_referencer::get_position (b); } -ADD_INTERFACE (Staff_symbol_referencer, "staff-symbol-referencer-interface", +ADD_INTERFACE (Staff_symbol_referencer, "An object whose Y position is meant relative to a staff " "symbol. " "These usually have @code{Staff_symbol_referencer::callback} " diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 6edb1f910e..f999346753 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -170,7 +170,7 @@ Staff_symbol::height (SCM smob) -ADD_INTERFACE (Staff_symbol, "staff-symbol-interface", +ADD_INTERFACE (Staff_symbol, "This spanner draws the lines of a staff. " "A staff symbol definines a vertical unit, the staff space. " "Quantities that go by a half staff space are called positions " diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index 43a044552f..bdf4ae5db2 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -9,6 +9,7 @@ #include "engraver.hh" #include "side-position-interface.hh" #include "text-interface.hh" +#include "item.hh" class Stanza_number_engraver : public Engraver { diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 6729aa934c..e607fda1b0 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -215,7 +215,7 @@ Stem_tremolo::print (SCM grob) return s.smobbed_copy (); } -ADD_INTERFACE (Stem_tremolo, "stem-tremolo-interface", +ADD_INTERFACE (Stem_tremolo, "A beam slashing a stem to indicate a tremolo.", "beam-thickness " diff --git a/lily/stem.cc b/lily/stem.cc index 69e7a15ce6..fc21f2d6b9 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -14,6 +14,7 @@ */ #include "stem.hh" +#include "spanner.hh" #include // rint using namespace std; @@ -988,7 +989,7 @@ Stem::beam_multiplicity (Grob *stem) } /* FIXME: Too many properties */ -ADD_INTERFACE (Stem, "stem-interface", +ADD_INTERFACE (Stem, "The stem represent the graphical stem. " "In addition, it internally connects note heads, beams and" "tremolos. " diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 7099ca7e7a..c3fe50250a 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -175,7 +175,6 @@ System_start_delimiter::staff_brace (Grob *me, Real y) } ADD_INTERFACE (System_start_delimiter, - "system-start-delimiter-interface", "The brace, bracket or bar in front of the system. " , diff --git a/lily/system-start-text.cc b/lily/system-start-text.cc index 5a90191081..a0a90b06c3 100644 --- a/lily/system-start-text.cc +++ b/lily/system-start-text.cc @@ -19,7 +19,7 @@ class System_start_text { public: static Stencil get_stencil (Grob *); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); DECLARE_SCHEME_CALLBACK (print, (SCM)); }; @@ -95,7 +95,6 @@ System_start_text::print (SCM smob) ADD_INTERFACE (System_start_text, - "system-start-text-interface", "Text in front of the system.", /* properties */ diff --git a/lily/system.cc b/lily/system.cc index 7c1828cabd..c4fec86cb9 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -535,7 +535,7 @@ System::build_skylines () } -ADD_INTERFACE (System, "system-interface", +ADD_INTERFACE (System, "This is the toplevel object: each object in a score " "ultimately has a System object as its X and Y parent. ", diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index bf1dfbd811..a3447ccce7 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -13,6 +13,7 @@ #include "stem.hh" #include "stream-event.hh" #include "text-interface.hh" +#include "item.hh" #include "translator.icc" @@ -22,7 +23,7 @@ class Text_engraver : public Engraver { vector evs_; - vector texts_; + vector texts_; public: TRANSLATOR_DECLARATIONS (Text_engraver); protected: diff --git a/lily/text-interface.cc b/lily/text-interface.cc index c249052da5..ebfae5ae5b 100644 --- a/lily/text-interface.cc +++ b/lily/text-interface.cc @@ -91,7 +91,7 @@ Text_interface::is_markup (SCM x) ly_symbol2scm ("markup-signature")))); } -ADD_INTERFACE (Text_interface, "text-interface", +ADD_INTERFACE (Text_interface, "A scheme markup text, see @usermanref{Text markup}.", "baseline-skip " "text " diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 289c44e33f..28f88fd76f 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -11,6 +11,7 @@ #include "international.hh" #include "note-column.hh" #include "side-position-interface.hh" +#include "spanner.hh" #include "stream-event.hh" #include "translator.icc" @@ -90,7 +91,7 @@ Text_spanner_engraver::acknowledge_note_column (Grob_info info) if (spans[i]) { Side_position_interface::add_support (spans[i], info.grob ()); - add_bound_item (spans[i], dynamic_cast (info.grob ())); + add_bound_item (spans[i], info.grob ()); } } } diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 4d8b3a092f..ea4c25074a 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -161,7 +161,6 @@ Text_spanner::print (SCM smob) } ADD_INTERFACE (Text_spanner, - "text-spanner-interface", "generic text spanner", diff --git a/lily/tie-column.cc b/lily/tie-column.cc index 13d5fb0177..85529ef1d5 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -126,7 +126,7 @@ Tie_column::calc_positioning_done (SCM smob) -ADD_INTERFACE (Tie_column, "tie-column-interface", +ADD_INTERFACE (Tie_column, "Object that sets directions of multiple ties in a tied chord", /* properties */ diff --git a/lily/tie.cc b/lily/tie.cc index 1263237688..2aab6ac2b1 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -289,8 +289,6 @@ Tie::print (SCM smob) } ADD_INTERFACE (Tie, - "tie-interface", - "A horizontal curve connecting two noteheads. \n\n" , diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 78f795eaed..68a7e178b0 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -8,6 +8,7 @@ #include "engraver-group.hh" +#include "item.hh" #include "international.hh" #include "misc.hh" #include "time-signature.hh" diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 26860c688f..ced6468e8d 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -8,6 +8,7 @@ #include "time-signature.hh" +#include "grob.hh" #include "font-interface.hh" #include "international.hh" #include "output-def.hh" @@ -119,7 +120,7 @@ Time_signature::numbered_time_signature (Grob *me, int num, int den) return m; } -ADD_INTERFACE (Time_signature, "time-signature-interface", +ADD_INTERFACE (Time_signature, "A time signature, in different styles.\n" " The following values for 'style are are recognized:\n" "\n" diff --git a/lily/trill-spanner-engraver.cc b/lily/trill-spanner-engraver.cc index 19576e6f16..3f07d5b5ac 100644 --- a/lily/trill-spanner-engraver.cc +++ b/lily/trill-spanner-engraver.cc @@ -19,6 +19,7 @@ #include "note-column.hh" #include "side-position-interface.hh" #include "stream-event.hh" +#include "spanner.hh" #include "translator.icc" @@ -96,7 +97,7 @@ Trill_spanner_engraver::acknowledge_note_column (Grob_info info) if (spans[i]) { Side_position_interface::add_support (spans[i], info.grob ()); - add_bound_item (spans[i], dynamic_cast (info.grob ())); + add_bound_item (spans[i], info.grob ()); } } } diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 261b086c3f..8af6073f83 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -731,7 +731,6 @@ Tuplet_bracket::add_tuplet_bracket (Grob *me, Grob *bracket) } ADD_INTERFACE (Tuplet_bracket, - "tuplet-bracket-interface", "A bracket with a number in the middle, used for tuplets. " "When the bracket spans a line break, the value of " "@code{break-overshoot} determines how far it extends " diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 7a3cf534fd..946fd1d802 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -14,6 +14,7 @@ #include "stream-event.hh" #include "tuplet-bracket.hh" #include "warn.hh" +#include "item.hh" #include "translator.icc" diff --git a/lily/tuplet-number.cc b/lily/tuplet-number.cc index a68b99b0a5..31bcbbfa57 100644 --- a/lily/tuplet-number.cc +++ b/lily/tuplet-number.cc @@ -17,7 +17,7 @@ struct Tuplet_number { DECLARE_SCHEME_CALLBACK(print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE(); }; @@ -62,7 +62,6 @@ Tuplet_number::print (SCM smob) ADD_INTERFACE (Tuplet_number, - "tuplet-number-interface", "The number for a bracket. " , diff --git a/lily/vaticana-ligature.cc b/lily/vaticana-ligature.cc index 411953ea87..9e97482d02 100644 --- a/lily/vaticana-ligature.cc +++ b/lily/vaticana-ligature.cc @@ -292,7 +292,7 @@ Vaticana_ligature::print (SCM) return SCM_EOL; } -ADD_INTERFACE (Vaticana_ligature, "vaticana-ligature-interface", +ADD_INTERFACE (Vaticana_ligature, "A vaticana style gregorian ligature", /* properties */ diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc index ba33a4015d..9c2e4ea669 100644 --- a/lily/volta-bracket.cc +++ b/lily/volta-bracket.cc @@ -166,7 +166,7 @@ Volta_bracket_interface::add_column (Grob *me, Grob *c) Side_position_interface::add_support (me, c); } -ADD_INTERFACE (Volta_bracket_interface, "volta-bracket-interface", +ADD_INTERFACE (Volta_bracket_interface, "Volta bracket with number", /* properties */ diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index db4d5e60cf..41b0c7cc78 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -12,6 +12,7 @@ #include "context.hh" #include "international.hh" #include "note-column.hh" +#include "item.hh" #include "side-position-interface.hh" #include "staff-symbol.hh" #include "text-interface.hh"