From: fred Date: Tue, 26 Mar 2002 23:23:19 +0000 (+0000) Subject: lilypond-1.3.62 X-Git-Tag: release/1.5.59~1562 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=482fd31fb2a814ed30029390ad1b8441c69bdd20;p=lilypond.git lilypond-1.3.62 --- diff --git a/lily/bar.cc b/lily/bar.cc index ea07643585..8b9ecadc60 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -33,7 +33,7 @@ Bar::get_bar_size () const SCM -Bar::scheme_molecule (SCM smob) +Bar::brew_molecule (SCM smob) { Score_element * self = unsmob_element (smob); Bar * fly = dynamic_cast (self); @@ -46,7 +46,7 @@ Bar::scheme_molecule (SCM smob) return SCM_EOL; } -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Bar); +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Bar,brew_molecule); Molecule Bar::compound_barline (String str, Real h) const @@ -132,8 +132,9 @@ Bar::simple_barline (Real w, Real h) const } -void -Bar::before_line_breaking () +GLUE_SCORE_ELEMENT(Bar,before_line_breaking ); +SCM +Bar::member_before_line_breaking () { SCM g = get_elt_property ("glyph"); SCM orig = g; @@ -162,6 +163,9 @@ Bar::before_line_breaking () } else if (! gh_equal_p (g, orig)) set_elt_property ("glyph", g); + + + return SCM_UNDEFINED; } diff --git a/lily/beam.cc b/lily/beam.cc index e131cbc17c..08173a742f 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -81,8 +81,9 @@ Beam::get_multiplicity () const [Alternatively, stems could set its own directions, according to their beam, during 'final-pre-processing'.] */ -void -Beam::before_line_breaking () +GLUE_SCORE_ELEMENT(Beam,before_line_breaking); +SCM +Beam::member_before_line_breaking () { // Why? if (visible_stem_count () < 2) @@ -96,7 +97,9 @@ Beam::before_line_breaking () auto_knees (); set_stem_directions (); - set_stem_shorten (); + set_stem_shorten (); + + return SCM_EOL; } /* @@ -267,8 +270,9 @@ Beam::set_stem_shorten () Set elt properties height and y-position if not set. Adjust stem lengths to reach beam. */ -void -Beam::after_line_breaking () +GLUE_SCORE_ELEMENT(Beam,after_line_breaking); +SCM +Beam::member_after_line_breaking () { /* first, calculate y, dy */ Real y, dy; @@ -333,7 +337,10 @@ Beam::after_line_breaking () // UGH. Y is not in staff position unit? // Ik dacht datwe daar juist van weg wilden? set_stem_length (y, dy); - set_elt_property ("y-position", gh_double2scm (y)); + set_elt_property ("y-position", gh_double2scm (y)); + + + return SCM_UNDEFINED; } /* @@ -719,14 +726,13 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const return leftbeams; } -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS (Beam); - -Molecule -Beam::do_brew_molecule () const +GLUE_SCORE_ELEMENT(Beam,brew_molecule); +SCM +Beam::member_brew_molecule () const { Molecule mol; if (!stem_count ()) - return mol; + return SCM_EOL; Real x0,dx; if (visible_stem_count ()) { @@ -757,7 +763,7 @@ Beam::do_brew_molecule () const mol.translate_axis (x0 - get_bound (LEFT)->relative_coordinate (0, X_AXIS), X_AXIS); - return mol; + return mol.create_scheme (); } int diff --git a/lily/breathing-sign.cc b/lily/breathing-sign.cc index a78e610645..6c337642d1 100644 --- a/lily/breathing-sign.cc +++ b/lily/breathing-sign.cc @@ -28,10 +28,10 @@ Breathing_sign::Breathing_sign (SCM s) -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Breathing_sign); +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Breathing_sign,brew_molecule); SCM -Breathing_sign::scheme_molecule (SCM smob) +Breathing_sign::brew_molecule (SCM smob) { Score_element * sc = unsmob_element (smob); Staff_symbol_referencer_interface si (sc); @@ -45,8 +45,9 @@ Breathing_sign::scheme_molecule (SCM smob) return sc->lookup_l()->filledbox(b).create_scheme (); } -void -Breathing_sign::after_line_breaking () +GLUE_SCORE_ELEMENT(Breathing_sign,after_line_breaking); +SCM +Breathing_sign::member_after_line_breaking () { Real space = staff_symbol_referencer (this).staff_space(); Direction d = directional_element (this). get (); @@ -57,5 +58,7 @@ Breathing_sign::after_line_breaking () } translate_axis(2.0 * space * d, Y_AXIS); + + return SCM_UNDEFINED; } diff --git a/lily/chord-name.cc b/lily/chord-name.cc index b2ed244267..0d4ff13849 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -128,10 +128,10 @@ Chord_name::ly_text2molecule (SCM text) const return mol; } -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Chord_name); +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Chord_name,brew_molecule); SCM -Chord_name::scheme_molecule (SCM smob) +Chord_name::brew_molecule (SCM smob) { Score_element *sc = unsmob_element (smob); SCM style = sc->get_elt_property ("style"); diff --git a/lily/crescendo.cc b/lily/crescendo.cc index d119ca9a04..7890d5cf00 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -24,9 +24,10 @@ Crescendo::Crescendo (SCM s) -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Crescendo) -Molecule -Crescendo::do_brew_molecule () const +GLUE_SCORE_ELEMENT(Crescendo,brew_molecule); + +SCM +Crescendo::member_brew_molecule () const { Real absdyn_dim = paper_l ()-> get_var ("crescendo_shorten"); Real extra_left = get_broken_left_end_align (); @@ -38,9 +39,7 @@ Crescendo::do_brew_molecule () const { Crescendo * me = (Crescendo*)this; me->suicide (); - Molecule m; - - return m; + return SCM_EOL; } Direction gd = to_dir (dir); @@ -133,7 +132,7 @@ Crescendo::do_brew_molecule () const m.add_at_edge (X_AXIS, RIGHT, span, pad); m.translate_axis (extra_left, X_AXIS); - return m; + return m.create_scheme (); } diff --git a/lily/dots.cc b/lily/dots.cc index c77175e0ad..9dc8c8b75b 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -18,8 +18,9 @@ Dots::Dots (SCM s) { } -void -Dots::after_line_breaking () +GLUE_SCORE_ELEMENT(Dots,after_line_breaking); +SCM +Dots::member_after_line_breaking () { SCM d= get_elt_property ("dot-count"); if (gh_number_p (d) && gh_scm2int (d)) @@ -32,12 +33,15 @@ Dots::after_line_breaking () if (!(p % 2)) si.set_position (p + directional_element (this).get ()); } + + return SCM_UNDEFINED; + } -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Dots); +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,brew_molecule); SCM -Dots::scheme_molecule (SCM d) +Dots::brew_molecule (SCM d) { Score_element *sc = unsmob_element (d); Molecule mol (sc->lookup_l ()->blank (Box (Interval (0,0), diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index 165c6c6b11..624f682be2 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -18,10 +18,10 @@ #include "spanner.hh" #include "item.hh" -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Hyphen_spanner) +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Hyphen_spanner,brew_molecule) SCM -Hyphen_spanner::scheme_molecule (SCM smob) +Hyphen_spanner::brew_molecule (SCM smob) { Spanner * sp =dynamic_cast (unsmob_element (smob)); Molecule mol; diff --git a/lily/include/bar.hh b/lily/include/bar.hh index 8d408c04b9..92c03f20d8 100644 --- a/lily/include/bar.hh +++ b/lily/include/bar.hh @@ -18,11 +18,12 @@ public: Molecule compound_barline (String, Real height) const; Molecule simple_barline (Real wid, Real height) const; - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); -protected: - virtual void before_line_breaking (); +public: + SCM member_before_line_breaking (); + static SCM before_line_breaking (SCM); virtual Real get_bar_size () const; }; diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 9021a08ab0..d14801e370 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -26,7 +26,7 @@ class Beam : public Spanner { public: - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); int stem_count () const; @@ -45,11 +45,13 @@ public: int get_multiplicity () const; -protected: +public: - virtual void before_line_breaking (); - virtual void after_line_breaking (); - Molecule do_brew_molecule () const; + SCM member_before_line_breaking (); + static SCM before_line_breaking (SCM); + SCM member_after_line_breaking (); + static SCM after_line_breaking (SCM); + SCM member_brew_molecule () const; Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; private: diff --git a/lily/include/breathing-sign.hh b/lily/include/breathing-sign.hh index 6ecf02e263..dd495b1db8 100644 --- a/lily/include/breathing-sign.hh +++ b/lily/include/breathing-sign.hh @@ -20,13 +20,14 @@ class Breathing_sign : public Item { public: - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); VIRTUAL_COPY_CONS(Score_element); Breathing_sign (SCM s); -protected: - virtual void after_line_breaking (); - Molecule do_brew_molecule () const; +public: + SCM member_after_line_breaking (); + static SCM after_line_breaking (SCM); + SCM member_brew_molecule () const; }; #endif // BREATHING_SIGN_HH diff --git a/lily/include/chord-name.hh b/lily/include/chord-name.hh index d89e81c2e3..fae9d217b0 100644 --- a/lily/include/chord-name.hh +++ b/lily/include/chord-name.hh @@ -22,14 +22,14 @@ class Chord_name : public Item { public: - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); -VIRTUAL_COPY_CONS (Score_element); + VIRTUAL_COPY_CONS (Score_element); Molecule ly_word2molecule (SCM scm, Real* x) const; Molecule ly_text2molecule (SCM scm) const; Chord_name(SCM s); -protected: - Molecule do_brew_molecule () const; +public: + SCM member_brew_molecule () const; }; diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index a9d4576320..e45ef61ffd 100644 --- a/lily/include/crescendo.hh +++ b/lily/include/crescendo.hh @@ -18,12 +18,12 @@ */ class Crescendo : public Spanner { public: - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); -Crescendo(SCM); -protected: + Crescendo(SCM); + VIRTUAL_COPY_CONS(Score_element); - Molecule do_brew_molecule() const; + SCM member_brew_molecule() const; private: Molecule get_symbol() const; diff --git a/lily/include/dots.hh b/lily/include/dots.hh index ace3555c6c..f816cc2a24 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -25,12 +25,11 @@ */ class Dots : public Item { -protected: - Molecule do_brew_molecule () const; - virtual void after_line_breaking (); public: - static SCM scheme_molecule (SCM); - + SCM member_brew_molecule () const; + SCM member_after_line_breaking (); + static SCM after_line_breaking (SCM); + static SCM brew_molecule (SCM); Dots (SCM); }; diff --git a/lily/include/extender-spanner.hh b/lily/include/extender-spanner.hh index 0fe3b35b66..5d7e4c4af9 100644 --- a/lily/include/extender-spanner.hh +++ b/lily/include/extender-spanner.hh @@ -33,7 +33,7 @@ public: Spanner*elt_l_; Lyric_extender (Spanner*); void set_textitem (Direction, Item*); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); }; #endif // EXTENDER_SPANNER_HH diff --git a/lily/key-item.cc b/lily/key-item.cc index 46ad565f50..77a9e10418 100644 --- a/lily/key-item.cc +++ b/lily/key-item.cc @@ -74,14 +74,13 @@ Key_item::calculate_position(SCM pair) const } } -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Key_item) - /* TODO - space the `natural' signs wider */ -Molecule -Key_item::do_brew_molecule () const +GLUE_SCORE_ELEMENT(Key_item,brew_molecule); +SCM +Key_item::member_brew_molecule () const { Molecule mol; @@ -134,12 +133,9 @@ Key_item::do_brew_molecule () const mol.add_at_edge (X_AXIS, LEFT, m,0); } } - - } - - return mol; + return mol.create_scheme(); } diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 4b77e00fd3..0c1ec92137 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -14,7 +14,6 @@ #include "note-head.hh" #include "misc.hh" - void Local_key_item::add_pitch (Musical_pitch p, bool cautionary, bool natural) { @@ -30,12 +29,13 @@ Local_key_item::add_pitch (Musical_pitch p, bool cautionary, bool natural) accidental_arr_.push (t); } +GLUE_SCORE_ELEMENT(Local_key_item,before_line_breaking); - -void -Local_key_item::before_line_breaking () +SCM +Local_key_item::member_before_line_breaking () { accidental_arr_.sort (Local_key_cautionary_tuple::compare); + return SCM_UNDEFINED; } Molecule @@ -61,9 +61,10 @@ Local_key_item::accidental (int j, bool cautionary, bool natural) const /* UGH. clean me up */ -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Local_key_item) -Molecule -Local_key_item::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Local_key_item,brew_molecule); +SCM +Local_key_item::member_brew_molecule () const { Molecule mol; Staff_symbol_referencer_interface si (this); @@ -134,7 +135,7 @@ Local_key_item::do_brew_molecule () const } while ( flip (&d)!= LEFT); } - return mol; + return mol.create_scheme(); } Local_key_item::Local_key_item (SCM s) diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index e20d7d1ea9..89f3eddf05 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -16,9 +16,9 @@ #include "extender-spanner.hh" -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Lyric_extender) +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Lyric_extender,brew_molecule) SCM -Lyric_extender::scheme_molecule (SCM smob) +Lyric_extender::brew_molecule (SCM smob) { Spanner *sp = dynamic_cast (unsmob_element (smob)); diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index eb12c9f9b2..bf8a009f45 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -31,9 +31,11 @@ Multi_measure_rest::Multi_measure_rest (SCM s) [TODO] 17 * variable-sized multi-measure rest symbol: |====| ?? */ -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Multi_measure_rest) -Molecule -Multi_measure_rest::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Multi_measure_rest,brew_molecule); + +SCM +Multi_measure_rest::member_brew_molecule () const { Real staff_space = staff_symbol_referencer (this).staff_space (); @@ -131,7 +133,7 @@ Multi_measure_rest::do_brew_molecule () const mol.add_molecule (s); } mol.translate_axis (x_off, X_AXIS); - return mol; + return mol.create_scheme(); } /* @@ -152,14 +154,16 @@ Multi_measure_rest::do_add_processing () // set columns to SCM_EOL? } -void -Multi_measure_rest::after_line_breaking () +GLUE_SCORE_ELEMENT(Multi_measure_rest,after_line_breaking); +SCM +Multi_measure_rest::member_after_line_breaking () { if (!gh_pair_p (get_elt_pointer ("columns"))) { suicide (); } - + + return SCM_UNDEFINED; } diff --git a/lily/note-head.cc b/lily/note-head.cc index 4f8934ab37..4452ce905a 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -52,8 +52,9 @@ Note_head::ledger_line (Interval xwid) const } -void -Note_head::before_line_breaking () +GLUE_SCORE_ELEMENT(Note_head,before_line_breaking); +SCM +Note_head::member_before_line_breaking () { // 8 ball looks the same as 4 ball: @@ -67,14 +68,16 @@ Note_head::before_line_breaking () si.set_position(int (me.position_f ())); } + + return SCM_UNDEFINED; } -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Note_head); +GLUE_SCORE_ELEMENT(Note_head,brew_molecule); -Molecule -Note_head::do_brew_molecule() const +SCM +Note_head::member_brew_molecule () const { Staff_symbol_referencer_interface si (this); @@ -117,7 +120,7 @@ Note_head::do_brew_molecule() const out.add_molecule (s); } } - return out; + return out.create_scheme(); } diff --git a/lily/rest.cc b/lily/rest.cc index 24bc4d0847..9d9385f567 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -15,8 +15,9 @@ #include "staff-symbol-referencer.hh" // -> offset callback -void -Rest::after_line_breaking () +GLUE_SCORE_ELEMENT(Rest,after_line_breaking); +SCM +Rest::member_after_line_breaking () { if (balltype_i () == 0) { @@ -33,13 +34,15 @@ Rest::after_line_breaking () staff_symbol_referencer (d) .set_position ((balltype_i () == 7) ? 4 : 3); } + + return SCM_UNDEFINED; } -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Rest) +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Rest,brew_molecule) SCM -Rest::scheme_molecule (SCM smob) +Rest::brew_molecule (SCM smob) { Score_element* sc = unsmob_element (smob); diff --git a/lily/score-element.cc b/lily/score-element.cc index a0a13eb5af..0761c5e51e 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -199,8 +199,7 @@ Score_element::add_processing() } void -Score_element::calculate_dependencies (int final, int busy, - Score_element_method_pointer funcptr) +Score_element::calculate_dependencies (int final, int busy, SCM funcname) { assert (status_i_ >=0); @@ -218,11 +217,17 @@ Score_element::calculate_dependencies (int final, int busy, for (SCM d= get_elt_pointer ("dependencies"); gh_pair_p (d); d = gh_cdr (d)) { unsmob_element (gh_car (d)) - ->calculate_dependencies (final, busy, funcptr); + ->calculate_dependencies (final, busy, funcname); } - (this->*funcptr)(); + // ughugh. + String s = ly_symbol2string (funcname); + SCM proc = get_elt_property (s.ch_C()); + if (gh_procedure_p (proc)) + gh_call1 (proc, this->self_scm_); + status_i_= final; + } Molecule @@ -246,17 +251,6 @@ Score_element::do_break_processing() { } -void -Score_element::after_line_breaking () -{ -} - - -void -Score_element::before_line_breaking () -{ -} - void Score_element::do_space_processing () { @@ -268,13 +262,13 @@ Score_element::do_add_processing() } -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Score_element) +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Score_element,brew_molecule) /* ugh. */ SCM -Score_element::scheme_molecule (SCM smob) +Score_element::brew_molecule (SCM smob) { Score_element * sc = unsmob_element (smob); SCM glyph = sc->get_elt_property ("glyph"); diff --git a/lily/script.cc b/lily/script.cc index 6c51f6ac5e..326667e7b4 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -42,34 +42,42 @@ Script::get_molecule(Direction d) const } -void -Script::before_line_breaking () +GLUE_SCORE_ELEMENT(Script,before_line_breaking); +SCM +Script::member_before_line_breaking () { /* center my self on the note head. */ Score_element * e = parent_l(X_AXIS); translate_axis (e->extent (X_AXIS).center (), X_AXIS); + + return SCM_UNDEFINED; } -void -Script::after_line_breaking () +GLUE_SCORE_ELEMENT(Script,after_line_breaking); +SCM +Script::member_after_line_breaking () { Side_position_interface i (this); Direction d = i.get_direction (); i.set_direction (d); + + return SCM_UNDEFINED; } -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Script) -Molecule -Script::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Script,brew_molecule); + +SCM +Script::member_brew_molecule () const { Direction dir = DOWN; SCM d = get_elt_property ("direction"); if (isdir_b (d)) dir = to_dir (d); - return get_molecule (dir); + return get_molecule (dir).create_scheme(); } diff --git a/lily/slur.cc b/lily/slur.cc index 118bae506c..fd59628e57 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -341,11 +341,14 @@ Slur::encompass_offset (Note_column const* col) const return o; } -void -Slur::after_line_breaking () +GLUE_SCORE_ELEMENT(Slur,after_line_breaking); + +SCM +Slur::member_after_line_breaking () { set_extremities (); set_control_points (); + return SCM_UNDEFINED; } /* @@ -602,14 +605,12 @@ Slur::get_rods () const } - -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Slur); - /* Ugh should have dash-length + dash-period */ -Molecule -Slur::do_brew_molecule () const +GLUE_SCORE_ELEMENT(Slur,brew_molecule); +SCM +Slur::member_brew_molecule () const { Real thick = paper_l ()->get_var ("slur_thickness"); Bezier one = get_curve (); @@ -621,7 +622,7 @@ Slur::do_brew_molecule () const else a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick); - return a; + return a.create_scheme(); } void diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index b791b707fd..ae2167d988 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -15,9 +15,11 @@ -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Staff_symbol) -Molecule -Staff_symbol::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Staff_symbol,brew_molecule); + +SCM +Staff_symbol::member_brew_molecule () const { Score_element * common = get_bound (LEFT)->common_refpoint (get_bound (RIGHT), X_AXIS); @@ -43,7 +45,7 @@ Staff_symbol::do_brew_molecule () const m.add_molecule (a); } - return m; + return m.create_scheme(); } int diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index ee39f337ad..a209a04a63 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -48,9 +48,10 @@ Stem_tremolo::dim_callback (Score_element * se, Axis ) } -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Stem_tremolo) -Molecule -Stem_tremolo::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Stem_tremolo,brew_molecule); +SCM +Stem_tremolo::member_brew_molecule () const { Stem * stem = stem_l (); Beam * beam = stem->beam_l (); @@ -128,7 +129,7 @@ Stem_tremolo::do_brew_molecule () const whole_note_correction, dy)); } - return mol; + return mol.create_scheme(); } diff --git a/lily/stem.cc b/lily/stem.cc index 1ca3d9b3eb..e1b53608c8 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -377,8 +377,9 @@ Stem::position_noteheads () } } -void -Stem::before_line_breaking () +GLUE_SCORE_ELEMENT(Stem,before_line_breaking); +SCM +Stem::member_before_line_breaking () { stem_end_position (); // ugh. Trigger direction calc. position_noteheads (); @@ -390,6 +391,7 @@ Stem::before_line_breaking () } set_spacing_hints (); + return SCM_UNDEFINED; } @@ -455,9 +457,11 @@ Stem::dim_callback (Score_element const *se, Axis ) const Real ANGLE = 20* (2.0*M_PI/360.0); // ugh! Should be settable. -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Stem) -Molecule -Stem::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Stem,brew_molecule); + +SCM +Stem::member_brew_molecule () const { Molecule mol; @@ -490,7 +494,7 @@ Stem::do_brew_molecule () const mol.add_molecule (fl); } - return mol; + return mol.create_scheme(); } Real diff --git a/lily/sustain-pedal.cc b/lily/sustain-pedal.cc index 1906eb29ac..77a3727ecf 100644 --- a/lily/sustain-pedal.cc +++ b/lily/sustain-pedal.cc @@ -22,21 +22,21 @@ Properties: - glyph -- text string (TODO: make one large glyph of the Ped symbol, removes need for do_brew_molecule ()) + glyph -- text string (TODO: make one large glyph of the Ped symbol, removes need for member_brew_molecule ()) */ struct Sustain_pedal { public: - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); }; -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Sustain_pedal); +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Sustain_pedal,brew_molecule); SCM -Sustain_pedal::scheme_molecule (SCM smob) +Sustain_pedal::brew_molecule (SCM smob) { Score_element * e = unsmob_element (smob); diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 884f44e313..5be06b334e 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -55,8 +55,9 @@ System_start_delimiter::simple_bar (Real h) const return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2))); } -void -System_start_delimiter::after_line_breaking () +GLUE_SCORE_ELEMENT(System_start_delimiter,after_line_breaking); +SCM +System_start_delimiter::member_after_line_breaking () { SCM gl = get_elt_property ("glyph"); @@ -64,12 +65,13 @@ System_start_delimiter::after_line_breaking () { suicide (); } + return SCM_UNDEFINED; } -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(System_start_delimiter); +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(System_start_delimiter,brew_molecule); SCM -System_start_delimiter::scheme_molecule (SCM smob) +System_start_delimiter::brew_molecule (SCM smob) { Score_element * sc = unsmob_element (smob); diff --git a/lily/text-item.cc b/lily/text-item.cc index ae3ea80b40..777706f0bf 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -15,14 +15,14 @@ struct Text_item { - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); }; -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Text_item) +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Text_item,brew_molecule) SCM -Text_item::scheme_molecule (SCM sm) +Text_item::brew_molecule (SCM sm) { Score_element * s = unsmob_element (sm); diff --git a/lily/tie.cc b/lily/tie.cc index 90debb3079..ed3d2be69b 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -92,14 +92,15 @@ Tie::do_add_processing() index_set_cell (get_elt_pointer ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm_ ); } -void -Tie::after_line_breaking () +GLUE_SCORE_ELEMENT(Tie,after_line_breaking); +SCM +Tie::member_after_line_breaking () { if (!head (LEFT) && !head (RIGHT)) { programming_error ("Tie without heads."); suicide (); - return; + return SCM_UNDEFINED; } if (!directional_element (this).get ()) @@ -169,6 +170,8 @@ Tie::after_line_breaking () } dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = y_f; + + return SCM_UNDEFINED; } @@ -187,12 +190,10 @@ Tie::get_rods () const return a; } +GLUE_SCORE_ELEMENT(Tie,brew_molecule); - - -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Tie) -Molecule -Tie::do_brew_molecule () const +SCM +Tie::member_brew_molecule () const { Real thick = paper_l ()->get_var ("tie_thickness"); Bezier one = get_curve (); @@ -204,7 +205,7 @@ Tie::do_brew_molecule () const else a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick); - return a; + return a.create_scheme(); } diff --git a/lily/time-signature.cc b/lily/time-signature.cc index bbefb9dcfa..50c45abd4c 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -20,9 +20,10 @@ Time_signature::Time_signature (SCM s) } // ugh.! -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Time_signature) -Molecule -Time_signature::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Time_signature,brew_molecule); +SCM +Time_signature::member_brew_molecule () const { SCM st = get_elt_property ("style"); @@ -41,15 +42,15 @@ Time_signature::do_brew_molecule () const String style (ly_scm2string (st)); if (style[0]=='1') { - return time_signature (n, 0); + return time_signature (n, 0).create_scheme(); } else { - return special_time_signature (style, n, d); + return special_time_signature (style, n, d).create_scheme(); } } else - return time_signature (n,d); + return time_signature (n,d).create_scheme(); } Molecule diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index eeabe86e5b..5779209b15 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -35,9 +35,10 @@ Tuplet_spanner::Tuplet_spanner (SCM s) /* TODO. */ -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Tuplet_spanner) -Molecule -Tuplet_spanner::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Tuplet_spanner,brew_molecule); +SCM +Tuplet_spanner::member_brew_molecule () const { Molecule mol; @@ -111,7 +112,7 @@ Tuplet_spanner::do_brew_molecule () const mol.add_molecule (Molecule (b, at)); } } - return mol; + return mol.create_scheme(); } void @@ -201,8 +202,9 @@ Tuplet_spanner::calc_dy (Real * dy) const - column_arr[0]->extent (Y_AXIS) [d]; } -void -Tuplet_spanner::after_line_breaking () +GLUE_SCORE_ELEMENT(Tuplet_spanner,after_line_breaking); +SCM +Tuplet_spanner::member_after_line_breaking () { Link_array column_arr= Pointer_group_interface__extract_elements (this, (Note_column*)0, "columns"); @@ -210,6 +212,7 @@ Tuplet_spanner::after_line_breaking () if (!column_arr.size ()) { suicide (); + return SCM_UNDEFINED; } Direction d = directional_element (this).get (); @@ -237,6 +240,7 @@ Tuplet_spanner::after_line_breaking () && get_bound (RIGHT)->column_l () == beam_l->get_bound (RIGHT)->column_l ()) set_elt_property ("parallel-beam", SCM_BOOL_T); } + return SCM_UNDEFINED; } diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 4f4880a716..cb9400bbca 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -41,9 +41,10 @@ Volta_spanner::Volta_spanner (SCM s) */ -MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Volta_spanner) -Molecule -Volta_spanner::do_brew_molecule () const + +GLUE_SCORE_ELEMENT(Volta_spanner,brew_molecule); +SCM +Volta_spanner::member_brew_molecule () const { Molecule mol; @@ -51,7 +52,7 @@ Volta_spanner::do_brew_molecule () const = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars"); if (!bar_arr.size ()) - return mol; + return mol.create_scheme(); bool no_vertical_start = false; bool no_vertical_end = to_boolean (get_elt_property ("last-volta")); @@ -94,13 +95,12 @@ Volta_spanner::do_brew_molecule () const mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length () - staff_space); - return mol; + return mol.create_scheme(); } void Volta_spanner::do_add_processing () { - Link_array bar_arr = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars"); @@ -111,10 +111,12 @@ Volta_spanner::do_add_processing () } } -void -Volta_spanner::after_line_breaking () +GLUE_SCORE_ELEMENT(Volta_spanner,after_line_breaking); +SCM +Volta_spanner::member_after_line_breaking () { Side_position_interface (this).add_staff_support (); + return SCM_UNDEFINED; } void