From d18a0976b37f9c4e1ac954917b5d9f1764613215 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:23:20 +0000 Subject: [PATCH] lilypond-1.3.62 --- lily/include/hyphen-spanner.hh | 2 +- lily/include/key-item.hh | 6 ++--- lily/include/local-key-item.hh | 9 ++++--- lily/include/molecule.hh | 2 +- lily/include/multi-measure-rest.hh | 9 ++++--- lily/include/note-head.hh | 9 ++++--- lily/include/rest.hh | 9 ++++--- lily/include/score-element.hh | 39 ++++++++++++------------------ lily/include/script.hh | 12 +++++---- lily/include/slur.hh | 10 +++----- lily/include/staff-symbol.hh | 7 ++---- lily/include/stem-tremolo.hh | 10 +++----- lily/include/stem.hh | 9 ++++--- 13 files changed, 63 insertions(+), 70 deletions(-) diff --git a/lily/include/hyphen-spanner.hh b/lily/include/hyphen-spanner.hh index f1ef2ea45d..c185c64e96 100644 --- a/lily/include/hyphen-spanner.hh +++ b/lily/include/hyphen-spanner.hh @@ -24,7 +24,7 @@ public: Spanner* elt_l_; Hyphen_spanner (Spanner*); void set_textitem (Direction, Item*); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); }; #endif // HYPHEN_SPANNER_HH diff --git a/lily/include/key-item.hh b/lily/include/key-item.hh index 8743259021..756a2b0139 100644 --- a/lily/include/key-item.hh +++ b/lily/include/key-item.hh @@ -29,11 +29,11 @@ class Key_item :public Item public: VIRTUAL_COPY_CONS(Score_element); Key_item (SCM); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); -protected: - Molecule do_brew_molecule() const; + + SCM member_brew_molecule() const; }; #endif // KEYITEM_HH diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index ccedf0f9b7..0006c857bc 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -41,12 +41,13 @@ class Local_key_item : public Item Molecule accidental (int,bool,bool) const; public: Local_key_item (SCM ); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); void add_pitch (Musical_pitch, bool cautionary, bool natural); -protected: - virtual void before_line_breaking (); - Molecule do_brew_molecule() const; + + SCM member_before_line_breaking (); + static SCM before_line_breaking (SCM); + SCM member_brew_molecule() const; }; #endif // LOCALKEYITEM_HH diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index b8153c72a0..548085bcff 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -80,7 +80,7 @@ public: SCM fontify_atom (Font_metric*, SCM atom); -Molecule create_molecule (SCM scheme_molecule); +Molecule create_molecule (SCM brew_molecule); diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index 4349b8d3cf..50ab957bb3 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -17,17 +17,18 @@ class Multi_measure_rest : public Spanner { public: Multi_measure_rest (SCM); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); void add_column (Item*); Molecule compound_rest (int)const; -protected: - Molecule do_brew_molecule () const; + + SCM member_brew_molecule () const; VIRTUAL_COPY_CONS (Score_element); virtual void do_add_processing (); - virtual void after_line_breaking (); + SCM member_after_line_breaking (); + static SCM after_line_breaking (SCM); virtual Array get_rods () const; }; diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index eb86e46770..272ed3da95 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -23,14 +23,15 @@ class Note_head : public Rhythmic_head { public: static int compare (Note_head * const &a, Note_head *const &b) ; - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); Molecule ledger_line (Interval) const; Note_head (SCM); -protected: - virtual void before_line_breaking (); - Molecule do_brew_molecule() const; + + SCM member_before_line_breaking (); + static SCM before_line_breaking (SCM); + SCM member_brew_molecule() const; }; #endif // NOTEHEAD_HH diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 1977bd6738..db36065f0c 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -21,11 +21,12 @@ */ class Rest : public Rhythmic_head { -protected: - virtual void after_line_breaking (); - Molecule do_brew_molecule () const; public: - static SCM scheme_molecule (SCM); + SCM member_after_line_breaking (); + static SCM after_line_breaking (SCM); + SCM member_brew_molecule () const; + + static SCM brew_molecule (SCM); Rest (SCM s); }; diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index 2ded67f8cc..32398bb089 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -152,7 +152,7 @@ public: #funcptr# is the function to call to update this element. */ - void calculate_dependencies (int final, int busy, Score_element_method_pointer funcptr); + void calculate_dependencies (int final, int busy, SCM funcname); static SCM handle_broken_smobs (SCM, SCM criterion); @@ -163,10 +163,6 @@ public: virtual void do_space_processing (); virtual void discretionary_processing (); virtual void do_derived_mark (); - /// do calculations before determining horizontal spacing - virtual void before_line_breaking (); - /// do calculations after determining horizontal spacing - virtual void after_line_breaking (); Molecule get_molecule () const; void suicide (); @@ -176,7 +172,6 @@ public: static Interval molecule_extent (Score_element const*,Axis); protected: - /** Junk score element. This is protected because this is supposed to be handled by GUILE gc. */ @@ -184,14 +179,14 @@ protected: ///executed directly after the item is added to the Paper_score virtual void do_add_processing (); - Molecule do_brew_molecule ()const; - static Interval dim_cache_callback (Dimension_cache const*); public: + SCM member_brew_molecule ()const; + static SCM ly_set_elt_property (SCM, SCM,SCM); static SCM ly_get_elt_property (SCM, SCM); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); virtual void handle_broken_dependencies (); virtual void handle_prebroken_dependencies (); @@ -245,26 +240,24 @@ public: Score_element * unsmob_element (SCM); -#define MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(TYPE) \ +#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(TYPE, FUNC) \ void \ -TYPE ## __init_functions () \ +TYPE ## _ ## FUNC ## _init_functions () \ { \ - scm_make_gsubr (#TYPE "::scheme_molecule", 1, 0, 0, \ - (SCM(*)(...))TYPE::scheme_molecule); \ + scm_make_gsubr (#TYPE "::" #FUNC, 1, 0, 0, \ + (SCM(*)(...))TYPE :: FUNC); \ } \ \ -ADD_SCM_INIT_FUNC(TYPE ## _molecule, TYPE ## __init_functions); \ +ADD_SCM_INIT_FUNC(TYPE ## _ ## FUNC ## _scelt, TYPE ## _ ## FUNC ## _init_functions); \ -#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(TYPE) \ -MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(TYPE);\ -SCM \ -TYPE::scheme_molecule (SCM smob) \ -{ \ +#define GLUE_SCORE_ELEMENT(TYPE, FUNC) \ +MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(TYPE,FUNC);\ +SCM \ +TYPE::FUNC (SCM smob) \ +{ \ TYPE * b = dynamic_cast (unsmob_element (smob)); \ - return b ? b->do_brew_molecule ().create_scheme () : SCM_EOL; \ -} \ - \ - + return b ? b->member_ ## FUNC () : SCM_UNDEFINED; \ +} \ #endif // STAFFELEM_HH diff --git a/lily/include/script.hh b/lily/include/script.hh index 0204e81112..4d7bc39cfd 100644 --- a/lily/include/script.hh +++ b/lily/include/script.hh @@ -23,13 +23,15 @@ class Script : public Item Molecule get_molecule (Direction d) const; public: Script (SCM); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); -protected: - 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; }; #endif /* Stem_SCRIPT_HH */ diff --git a/lily/include/slur.hh b/lily/include/slur.hh index cefb249d73..654bc45685 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -20,12 +20,9 @@ public: VIRTUAL_COPY_CONS(Score_element); void add_column (Note_column*); - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); - - -protected: - Molecule do_brew_molecule () const; + SCM member_brew_molecule () const; virtual Array get_encompass_offset_arr () const; Bezier get_curve () const; @@ -36,7 +33,8 @@ protected: Drul_array dx_f_drul_; virtual Direction get_default_dir () const; - virtual void after_line_breaking (); + SCM member_after_line_breaking (); + static SCM after_line_breaking (SCM); virtual void do_add_processing (); Array get_rods () const; diff --git a/lily/include/staff-symbol.hh b/lily/include/staff-symbol.hh index 98478d5c36..79af611f13 100644 --- a/lily/include/staff-symbol.hh +++ b/lily/include/staff-symbol.hh @@ -22,12 +22,9 @@ public: int steps_i() const; int line_count () const; Staff_symbol (SCM s); - static SCM scheme_molecule (SCM); - - -protected: + static SCM brew_molecule (SCM); VIRTUAL_COPY_CONS(Score_element); - Molecule do_brew_molecule() const; + SCM member_brew_molecule() const; }; #endif // STAFFSYM_HH diff --git a/lily/include/stem-tremolo.hh b/lily/include/stem-tremolo.hh index 97cbd2c690..2cd904a632 100644 --- a/lily/include/stem-tremolo.hh +++ b/lily/include/stem-tremolo.hh @@ -14,15 +14,13 @@ class Stem_tremolo : public Item { -protected: +public: Stem * stem_l () const; - Molecule do_brew_molecule () const; + SCM member_brew_molecule () const; static Interval dim_callback (Score_element*, Axis); -public: - static SCM scheme_molecule (SCM); - -Stem_tremolo (SCM); + static SCM brew_molecule (SCM); + Stem_tremolo (SCM); void set_stem (Stem *); }; diff --git a/lily/include/stem.hh b/lily/include/stem.hh index ea208ff792..24e0630c76 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -43,7 +43,7 @@ class Stem : public Item { public: - static SCM scheme_molecule (SCM); + static SCM brew_molecule (SCM); @@ -82,7 +82,7 @@ public: /// heads that the stem encompasses (positions) Interval head_positions() const; -protected: +public: friend class Stem_tremolo; // ugh. Real get_default_stem_end_position () const; void position_noteheads(); @@ -91,9 +91,10 @@ protected: static Real off_callback (Score_element const*, Axis); Molecule flag () const; - virtual void before_line_breaking(); + SCM member_before_line_breaking (); + static SCM before_line_breaking (SCM); static Interval dim_callback (Score_element const*,Axis); - Molecule do_brew_molecule() const; + SCM member_brew_molecule() const; void set_spacing_hints () ; }; -- 2.39.5