grob/item/spanner headers in interface headers.
#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"
#include "accidental-placement.hh"
+#include "item.hh"
#include "rhythmic-head.hh"
#include "accidental-interface.hh"
#include "music.hh"
}
ADD_INTERFACE (Accidental_placement,
- "accidental-placement-interface",
"Resolve accidental collisions.",
/* properties */
/*
TODO: should move avoid-slur into item?
*/
-ADD_INTERFACE (Accidental_interface, "accidental-interface",
+ADD_INTERFACE (Accidental_interface,
"a single accidental",
"accidentals "
"avoid-slur "
}
ADD_INTERFACE (Align_interface,
- "align-interface",
"Order grobs from top to bottom, left to right, right to left or bottom "
"to top. "
"stacking-dir "
"threshold "
);
-
-struct Foobar
-{
- bool has_interface (Grob *);
-};
-
#include "engraver.hh"
#include "axis-group-interface.hh"
+#include "item.hh"
#include "note-head.hh"
#include "pitch-interval.hh"
#include "pointer-group-interface.hh"
return SCM_EOL;
}
-ADD_INTERFACE (Ambitus, "ambitus-interface",
+ADD_INTERFACE (Ambitus ,
"The line between note heads for a pitch range.",
/* props */
#include "side-position-interface.hh"
#include "stream-event.hh"
#include "note-column.hh"
+#include "item.hh"
#include "translator.icc"
#include "arpeggio.hh"
+#include "grob.hh"
#include "output-def.hh"
#include "stem.hh"
#include "staff-symbol-referencer.hh"
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 */
}
}
-ADD_INTERFACE (Axis_group_interface, "axis-group-interface",
+ADD_INTERFACE (Axis_group_interface,
"An object that groups other layout objects.",
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE ();
};
MAKE_SCHEME_CALLBACK (Balloon_interface, print, 1);
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 */
ADD_INTERFACE (Bar_line,
- "bar-line-interface",
"Bar line.\n"
"\n"
#include <algorithm>
using namespace std;
+#include "grob.hh"
#include "align-interface.hh"
#include "international.hh"
#include "output-def.hh"
}
ADD_INTERFACE (Beam,
- "beam-interface",
"A beam. \n\n"
"The @code{thickness} property is the weight of beams, "
#include "axis-group-interface.hh"
#include "context.hh"
#include "translator-group.hh"
+#include "item.hh"
#include "translator.icc"
- 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 */
-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"
"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 */
return scm_from_double (inter * sz * d);
}
-ADD_INTERFACE (Breathing_sign, "breathing-sign-interface",
+ADD_INTERFACE (Breathing_sign,
"A breathing sign.",
"direction "
return SCM_UNSPECIFIED;
}
-ADD_INTERFACE (Chord_name, "chord-name-interface",
+ADD_INTERFACE (Chord_name,
"A chord name.",
#include <cctype>
using namespace std;
+#include "item.hh"
#include "context.hh"
#include "bar-line.hh"
#include "staff-symbol-referencer.hh"
return out.smobbed_copy ();
}
-ADD_INTERFACE (Clef, "clef-interface",
+ADD_INTERFACE (Clef,
"A clef sign",
/* properties */
#include "pointer-group-interface.hh"
#include "pitch.hh"
#include "stream-event.hh"
+#include "item.hh"
#include "translator.icc"
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 "
{
public:
DECLARE_SCHEME_CALLBACK (height, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1);
}
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.",
#include "note-column.hh"
#include "note-collision.hh"
#include "axis-group-interface.hh"
+#include "item.hh"
class Collision_engraver : public Engraver
{
return stencil.smobbed_copy ();
}
-ADD_INTERFACE (Custos, "custos-interface",
+ADD_INTERFACE (Custos,
"A custos object.",
"style "
"neutral-position "
#include "side-position-interface.hh"
#include "engraver.hh"
#include "translator.icc"
+#include "item.hh"
class Dot_column_engraver : public Engraver
{
}
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 ",
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.",
#include <cctype>
using namespace std;
+#include "item.hh"
#include "duration.hh"
#include "engraver.hh"
#include "note-column.hh"
#include "staff-symbol-referencer.hh"
#include "stream-event.hh"
#include "warn.hh"
+#include "item.hh"
+#include "spanner.hh"
#include "translator.icc"
{
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
/*
}
ADD_INTERFACE (Dynamic_text_spanner,
- "dynamic-text-spanner-interface",
"A text spanner for crescendo texts",
"bound-padding "
struct Enclosing_bracket
{
- static bool has_interface (Grob*);
+ DECLARE_GROB_INTERFACE();
public:
DECLARE_SCHEME_CALLBACK(print, (SCM));
ADD_INTERFACE(Enclosing_bracket,
- "enclosing-bracket-interface",
"Brackets alongside bass figures.",
#include "pointer-group-interface.hh"
#include "stream-event.hh"
#include "warn.hh"
+#include "spanner.hh"
#include "translator.icc"
struct Figured_bass_continuation
{
- static bool has_interface (Grob*);
+ DECLARE_GROB_INTERFACE();
public:
DECLARE_SCHEME_CALLBACK(print, (SCM));
}
ADD_INTERFACE(Figured_bass_continuation,
- "figured-bass-continuation-interface",
"Simple extender line between bounds.",
/* props */
#include "context.hh"
#include "spanner.hh"
+#include "item.hh"
#include "side-position-interface.hh"
#include "translator.icc"
#include "axis-group-interface.hh"
#include "side-position-interface.hh"
#include "stem.hh"
#include "stream-event.hh"
+#include "item.hh"
#include "translator.icc"
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)",
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 "
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. ",
"");
#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)
{
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
}
-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"
return mol.smobbed_copy ();
}
-ADD_INTERFACE (Hairpin, "hairpin-interface",
+ADD_INTERFACE (Hairpin,
"A hairpin crescendo/decrescendo.",
/* props */
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.",
#include "pointer-group-interface.hh"
#include "side-position-interface.hh"
#include "stream-event.hh"
+#include "spanner.hh"
+#include "item.hh"
#include "translator.icc"
#include "staff-symbol-referencer.hh"
#include "tuplet-bracket.hh"
#include "axis-group-interface.hh"
+#include "spanner.hh"
+#include "item.hh"
Stencil
}
ADD_INTERFACE (Horizontal_bracket,
-
- "horizontal-bracket-interface",
"A horizontal bracket encompassing notes.",
/* props */
#include "box.hh"
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
class Accidental_interface
{
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<Box> accurate_boxes (Grob *me,
Grob **common);
#ifndef ACCIDENTAL_PLACEMENT_HH
#define ACCIDENTAL_PLACEMENT_HH
+#include "grob-interface.hh"
#include "grob.hh"
class Accidental_placement
vector<Grob*> *real_acc);
DECLARE_SCHEME_CALLBACK(calc_positioning_done, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* ACCIDENTAL_PLACEMENT_HH */
#include "lily-proto.hh"
#include "lily-guile.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
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);
};
#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);
};
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
+
class Arpeggio
{
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 */
#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);
static void set_axes (Grob *, Axis, Axis);
static bool has_axis (Grob *, Axis);
static void get_children (Grob *, vector<Grob*> *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* AXIS_GROUP_INTERFACE_HH */
#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);
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
A vertical bar.
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);
#ifndef BEAM_HH
#define BEAM_HH
+#include "grob-interface.hh"
#include "std-vector.hh"
#include "lily-proto.hh"
#include "lily-guile.hh"
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 *);
#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<Grob*> 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));
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
#ifndef BREATHING_SIGN_HH
#define BREATHING_SIGN_HH
+#include "grob-interface.hh"
#include "lily-guile.hh"
class Grob;
DECLARE_SCHEME_CALLBACK (finalis, (SCM));
DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif // BREATHING_SIGN_HH
#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
#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 */
#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
#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_);
#define DOT_COLUMN_HH
#include "lily-guile.hh"
+#include "grob-interface.hh"
+
class Grob;
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));
};
#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
#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 */
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 *);
};
#include "lily-proto.hh"
#include "lily-guile.hh"
+#include "grob-interface.hh"
+
class Grid_line_interface
{
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 */
#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);
/* interfaces */
bool internal_has_interface (SCM intf);
- static bool has_interface (Grob *me);
+ DECLARE_GROB_INTERFACE();
/* offsets */
void translate_axis (Real, Axis);
#ifndef HAIRPIN_HH
#define HAIRPIN_HH
+#include "grob-interface.hh"
#include "lily-guile.hh"
#include "lily-proto.hh"
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
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
class Hara_kiri_group_spanner
{
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);
#include "lily-guile.hh"
#include "lily-proto.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
struct Horizontal_bracket
{
static Stencil make_enclosing_bracket (Grob *me, Grob *refpoint,
vector<Grob*> grobs,
Axis a, Direction dir);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* HORIZONTAL_BRACKET_HH */
#ifndef ITEM_HH
#define ITEM_HH
+#include "grob-interface.hh"
#include "box.hh"
#include "grob.hh"
virtual Paper_column *get_column () const;
virtual void handle_prebroken_dependencies ();
virtual Interval_t<int> spanned_rank_iv ();
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
protected:
virtual void discretionary_processing ();
void copy_breakable_items ();
#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,
#define LINE_SPANNER_HH
#include "lily-guile.hh"
+#include "grob-interface.hh"
class Grob;
class Stencil;
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);
#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.
class Lyric_extender
{
public:
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
};
#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));
};
#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 */
#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));
};
#include "lily-proto.hh"
#include "lily-guile.hh"
+#include "grob-interface.hh"
+
/*
* These are all possible mensural ligature primitives.
{
DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#endif /* MENSURAL_LIGATURE_HH */
#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 *);
#include "lily-proto.hh"
#include "lily-guile.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
+
/**
Resolve conflicts between various Note_columns (chords).
static Drul_array<vector<Grob*> > 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
#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.
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 *);
};
#define NOTEHEAD_HH
#include "stencil.hh"
+#include "grob-interface.hh"
/** ball at the end of the stem. Also takes care of ledger lines.
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 *);
#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,
#include "item.hh"
#include "rod.hh"
+#include "lily-proto.hh"
class Paper_column : public Item
{
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 *);
#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);
#ifndef REST_COLLISION_HH
#define REST_COLLISION_HH
+#include "grob-interface.hh"
#include "lily-proto.hh"
#include "lily-guile.hh"
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));
#define REST_HH
#include "lily-guile.hh"
+#include "grob-interface.hh"
class Grob;
{
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);
#ifndef RHYTHMIC_HEAD_HH
#define RHYTHMIC_HEAD_HH
+#include "grob-interface.hh"
#include "lily-guile.hh"
#include "lily-proto.hh"
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
#include "lily-guile.hh"
#include "lily-proto.hh"
-
+#include "grob-interface.hh"
#include "std-vector.hh"
class Script_column
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<Grob*> grobs);
};
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
Articulation marks (and the like) that are attached to notes/stems.
{
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));
};
#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);
struct Semi_tie_column
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK(calc_positioning_done, (SCM));
};
struct Semi_tie
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
#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
{
public:
static void add_spacing_unit (Grob *me, Item *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
};
#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 *);
#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.
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 *);
#include "lily-proto.hh"
#include "lily-guile.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
class Slur
{
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);
};
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
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 *);
(c) 2002--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+#include "grob-interface.hh"
+#include "lily-proto.hh"
struct Spacing_interface
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
#include "lily-guile.hh"
#include "rational.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
struct Spacing_options
{
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 */
#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
{
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 *);
#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
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:
#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 *);
#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
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));
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
TODO: add linethickness as parameter.
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
#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));
#include "lily-proto.hh"
#include "lily-guile.hh"
#include "stem-info.hh"
+#include "grob-interface.hh"
class Stem
{
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));
#include "lily-guile.hh"
#include "lily-proto.hh"
+#include "grob-interface.hh"
/*
Braces/brackets across staves.
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);
#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
int spanner_count () const;
void break_into_pieces (vector<Column_x_positions> const &);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
vector<Item*> broken_col_range (Item const *, Item const *) const;
vector<Grob*> columns () const;
#define TEXT_ITEM
#include "stencil.hh"
+#include "grob-interface.hh"
+
class Text_interface
{
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);
};
#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 */
#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));
#include "lily-guile.hh"
#include "lily-proto.hh"
#include "skyline.hh"
+#include "grob-interface.hh"
{
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 *);
#ifndef METER_HH
#define METER_HH
-#include "item.hh"
+#include "grob-interface.hh"
+#include "lily-proto.hh"
/**
Print a time_signature sign.
*/
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));
#include "lily-guile.hh"
#include "lily-proto.hh"
#include "std-vector.hh"
+#include "grob-interface.hh"
class Tuplet_bracket
{
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 **);
#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();
};
/*
#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);
}
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"
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
/*
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");
Interval x_extent,
Real left_shorten);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
Stencil
}
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"
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}.",
#include "tuplet-bracket.hh"
#include "spanner.hh"
#include "stream-event.hh"
+#include "spanner.hh"
+#include "item.hh"
+
#include "translator.icc"
/*
#include "staff-symbol-referencer.hh"
#include "lookup.hh"
#include "output-def.hh"
+#include "grob.hh"
Stencil
Line_interface::make_arrow (Offset begin, Offset end,
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 "
}
}
-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"
#include "lyric-extender.hh"
-
+#include "spanner.hh"
+#include "item.hh"
#include "warn.hh"
#include "lookup.hh"
#include "paper-column.hh"
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).",
#include "output-def.hh"
#include "paper-column.hh"
#include "moment.hh"
+#include "spanner.hh"
/*
TODO: should extract hyphen dimensions or hyphen glyph from the
ADD_INTERFACE (Lyric_hyphen,
- "lyric-hyphen-interface",
-
"A centered hyphen is a simple line between "
"lyrics used to divide syllables",
#include "side-position-interface.hh"
#include "global-context.hh"
#include "engraver.hh"
+#include "spanner.hh"
#include "translator.icc"
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");
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 "
return SCM_EOL;
}
-ADD_INTERFACE (Mensural_ligature, "mensural-ligature-interface",
+ADD_INTERFACE (Mensural_ligature,
"A mensural ligature",
"delta-position "
#include "staff-symbol-referencer.hh"
#include "stream-event.hh"
#include "moment.hh"
+#include "spanner.hh"
#include "translator.icc"
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 */
#include "side-position-interface.hh"
#include "stem.hh"
#include "stream-event.hh"
+#include "item.hh"
#include "warn.hh"
#include "translator.icc"
#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"
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 "
#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"
return unsmob_grob (me->get_object ("arpeggio"));
}
-ADD_INTERFACE (Note_column, "note-column-interface",
+ADD_INTERFACE (Note_column,
"Stem and noteheads combined",
/* properties */
#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.
}
-ADD_INTERFACE (Note_head, "note-head-interface",
+ADD_INTERFACE (Note_head,
"Note head",
/* properties */
*/
}
-ADD_INTERFACE (Note_spacing, "note-spacing-interface",
+ADD_INTERFACE (Note_spacing,
"This object calculates spacing wishes for individual voices.",
struct Ottava_bracket
{
DECLARE_SCHEME_CALLBACK (print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
/*
}
ADD_INTERFACE (Ottava_bracket,
- "ottava-bracket-interface",
-
"An ottava bracket",
/*
#include "note-column.hh"
#include "side-position-interface.hh"
#include "engraver.hh"
+#include "spanner.hh"
+#include "item.hh"
class Ottava_spanner_engraver : public Engraver
{
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. "
#include "stem.hh"
#include "stream-event.hh"
#include "text-interface.hh"
+#include "item.hh"
#include "translator.icc"
*/
#include "percent-repeat-item.hh"
-
-
+#include "item.hh"
#include "lookup.hh"
#include "font-interface.hh"
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 "
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);
}
ADD_INTERFACE (Piano_pedal_bracket,
- "piano-pedal-bracket-interface",
"The bracket of the piano pedal. "
"It can be tuned through the regular "
#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:
(c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+
+#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
{
#include "engraver.hh"
#include "rest-collision.hh"
#include "note-column.hh"
+#include "item.hh"
class Rest_collision_engraver : public Engraver
{
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.",
return ly_interval2scm (unsmob_stencil (m)->extent (a));
}
-ADD_INTERFACE (Rest, "rest-interface",
+ADD_INTERFACE (Rest,
"A rest symbol.",
/* properties */
#include "rhythmic-head.hh"
#include "stem.hh"
#include "note-column.hh"
+#include "item.hh"
#include "dot-column.hh"
#include "pointer-group-interface.hh"
ADD_INTERFACE (Rhythmic_head,
- "rhythmic-head-interface",
-
"Note head or rest",
"dot "
#include "engraver.hh"
#include "script-column.hh"
#include "side-position-interface.hh"
+#include "item.hh"
#include "translator.icc"
class Script_column_engraver : public Engraver
{
Grob *script_column_;
- vector<Item*> scripts_;
+ vector<Grob*> scripts_;
public:
TRANSLATOR_DECLARATIONS (Script_column_engraver);
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}",
#include "script-interface.hh"
#include "directional-element-interface.hh"
+#include "item.hh"
#include "warn.hh"
#include "font-interface.hh"
#include "side-position-interface.hh"
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 */
/*
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 "
#include "engraver.hh"
#include "accidental-placement.hh"
+#include "item.hh"
#include "script-column.hh"
#include "side-position-interface.hh"
#include "self-alignment-interface.hh"
#include "warn.hh"
+#include "grob.hh"
MAKE_SCHEME_CALLBACK (Self_alignment_interface, y_aligned_on_self, 1);
SCM
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"
ADD_INTERFACE(Semi_tie_column,
- "semi-tie-column-interface",
"The interface for a column of l.v. ties.",
/* properties */
ADD_INTERFACE(Semi_tie,
- "semi-tie-interface",
-
"A tie which is only on one side connected to note heads. ",
/* properties */
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}.",
#include "note-spacing.hh"
#include "accidental-placement.hh"
#include "context.hh"
+#include "spanner.hh"
#include "grob-array.hh"
#include "pointer-group-interface.hh"
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");
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 "
Slur::add_column (Grob *me, Grob *n)
{
Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-columns"), n);
- add_bound_item (dynamic_cast<Spanner *> (me), dynamic_cast<Item *> (n));
+ add_bound_item (dynamic_cast<Spanner *> (me), n);
}
void
}
-ADD_INTERFACE (Slur, "slur-interface",
+ADD_INTERFACE (Slur,
"A slur",
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. ",
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"
);
-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.",
#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
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.",
}
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"
*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.",
#include "staff-symbol-referencer.hh"
-
#include "staff-symbol.hh"
+#include "grob.hh"
#include "output-def.hh"
#include "libc-extension.hh"
< 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} "
-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 "
#include "engraver.hh"
#include "side-position-interface.hh"
#include "text-interface.hh"
+#include "item.hh"
class Stanza_number_engraver : public Engraver
{
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 "
*/
#include "stem.hh"
+#include "spanner.hh"
#include <cmath> // rint
using namespace std;
}
/* 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. "
}
ADD_INTERFACE (System_start_delimiter,
- "system-start-delimiter-interface",
"The brace, bracket or bar in front of the system. "
,
{
public:
static Stencil get_stencil (Grob *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
};
ADD_INTERFACE (System_start_text,
- "system-start-text-interface",
"Text in front of the system.",
/* properties */
}
-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. ",
#include "stem.hh"
#include "stream-event.hh"
#include "text-interface.hh"
+#include "item.hh"
#include "translator.icc"
class Text_engraver : public Engraver
{
vector<Stream_event *> evs_;
- vector<Item*> texts_;
+ vector<Grob*> texts_;
public:
TRANSLATOR_DECLARATIONS (Text_engraver);
protected:
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 "
#include "international.hh"
#include "note-column.hh"
#include "side-position-interface.hh"
+#include "spanner.hh"
#include "stream-event.hh"
#include "translator.icc"
if (spans[i])
{
Side_position_interface::add_support (spans[i], info.grob ());
- add_bound_item (spans[i], dynamic_cast<Item *> (info.grob ()));
+ add_bound_item (spans[i], info.grob ());
}
}
}
}
ADD_INTERFACE (Text_spanner,
- "text-spanner-interface",
"generic text spanner",
-ADD_INTERFACE (Tie_column, "tie-column-interface",
+ADD_INTERFACE (Tie_column,
"Object that sets directions of multiple ties in a tied chord",
/* properties */
}
ADD_INTERFACE (Tie,
- "tie-interface",
-
"A horizontal curve connecting two noteheads. \n\n"
,
#include "engraver-group.hh"
+#include "item.hh"
#include "international.hh"
#include "misc.hh"
#include "time-signature.hh"
#include "time-signature.hh"
+#include "grob.hh"
#include "font-interface.hh"
#include "international.hh"
#include "output-def.hh"
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"
#include "note-column.hh"
#include "side-position-interface.hh"
#include "stream-event.hh"
+#include "spanner.hh"
#include "translator.icc"
if (spans[i])
{
Side_position_interface::add_support (spans[i], info.grob ());
- add_bound_item (spans[i], dynamic_cast<Item *> (info.grob ()));
+ add_bound_item (spans[i], info.grob ());
}
}
}
}
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 "
#include "stream-event.hh"
#include "tuplet-bracket.hh"
#include "warn.hh"
+#include "item.hh"
#include "translator.icc"
struct Tuplet_number
{
DECLARE_SCHEME_CALLBACK(print, (SCM));
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
};
ADD_INTERFACE (Tuplet_number,
- "tuplet-number-interface",
"The number for a bracket. "
,
return SCM_EOL;
}
-ADD_INTERFACE (Vaticana_ligature, "vaticana-ligature-interface",
+ADD_INTERFACE (Vaticana_ligature,
"A vaticana style gregorian ligature",
/* properties */
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 */
#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"