]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.62
authorfred <fred>
Tue, 26 Mar 2002 23:23:20 +0000 (23:23 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:23:20 +0000 (23:23 +0000)
13 files changed:
lily/include/hyphen-spanner.hh
lily/include/key-item.hh
lily/include/local-key-item.hh
lily/include/molecule.hh
lily/include/multi-measure-rest.hh
lily/include/note-head.hh
lily/include/rest.hh
lily/include/score-element.hh
lily/include/script.hh
lily/include/slur.hh
lily/include/staff-symbol.hh
lily/include/stem-tremolo.hh
lily/include/stem.hh

index f1ef2ea45d4a04a6454fbc9c498154e8e234a5aa..c185c64e962f76d21fd1d8e5109486943b3d8846 100644 (file)
@@ -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
index 8743259021623add22abd8b23e5bfb9427932728..756a2b013988a96ebfd95a408ead2dce78511e54 100644 (file)
@@ -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
index ccedf0f9b7e7fa222d1bf8248678b6a41d2827a9..0006c857bc16c47e2b0b82bcd59e1b71781ae9ba 100644 (file)
@@ -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
index b8153c72a09e96d65ea15338814706af3df5fd41..548085bcff912bfc8228d17e1b1b8a9c183c7506 100644 (file)
@@ -80,7 +80,7 @@ public:
 
 SCM fontify_atom (Font_metric*, SCM atom);
 
-Molecule create_molecule (SCM scheme_molecule);
+Molecule create_molecule (SCM brew_molecule);
 
 
 
index 4349b8d3cf48a6012db42c883382a2dac7ff26fd..50ab957bb359c47bcca821949b48cc7c246fdc01 100644 (file)
@@ -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<Rod> get_rods () const;
 };
 
index eb86e467704e599f415578b4d287edeeef5c1962..272ed3da9521488112f45ba36e758a74ea0ac40f 100644 (file)
@@ -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
 
index 1977bd67388559ed925fc8c9116004d32b163f55..db36065f0ce919bbaca019f445d17540b321f2de 100644 (file)
  */
 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);
 };
index 2ded67f8cc51fa228fd41fe17b408b9bff2c9ae9..32398bb089d909ab9fb9d321f03ce60b109698d5 100644 (file)
@@ -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<TYPE*> (unsmob_element (smob));      \
-  return b ?  b->do_brew_molecule ().create_scheme () : SCM_EOL; \
-}                                                              \
-                                                               \
-
+  return b ?   b->member_ ## FUNC () : SCM_UNDEFINED; \
+}  \
 
 
 #endif // STAFFELEM_HH
index 0204e811120f6318855f94d5e8eec0c385ba7476..4d7bc39cfd0e30b9d85a7fa08631ebe4b80fb715 100644 (file)
@@ -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 */
index cefb249d732cc3b2284752af228e3a886881d96b..654bc45685dec606e24036afc8f73c3d4db4ca50 100644 (file)
@@ -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<Offset> get_encompass_offset_arr () const;
   Bezier get_curve () const;
 
@@ -36,7 +33,8 @@ protected:
   Drul_array<Real> 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<Rod> get_rods () const;
 
index 98478d5c36c904eef091539fe8558363ea2cdc10..79af611f13c2630efc8c41e58d7f831c44a85540 100644 (file)
@@ -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
index 97cbd2c690c1fe5c504cd9a4a47a3b298f8e11cd..2cd904a6320dfd04866d74ba279c8d6224a8d794 100644 (file)
 
 
 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 *);
 };
 
index ea208ff7921dedb6965b5de86beba621efca11dd..24e0630c76d748a7937a238c3284d6da07e273c9 100644 (file)
@@ -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 () ;
 };