]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.21
authorfred <fred>
Fri, 3 Jan 1997 14:21:06 +0000 (14:21 +0000)
committerfred <fred>
Fri, 3 Jan 1997 14:21:06 +0000 (14:21 +0000)
hdr/bar.hh
hdr/item.hh
hdr/script.hh [new file with mode: 0644]
hdr/simplewalker.hh
src/bar.cc
src/meter.cc
src/simpleprint.cc

index 187fadfe789ddac9a87b3949f6e64779442b0430..634940121e82e853c18568b5b07cf218d00a465f 100644 (file)
@@ -12,7 +12,8 @@ struct Bar: Item {
     String type;
     
     Bar(String type);
-    void preprocess();
+
+    Molecule*brew_molecule()const;
 };
 #endif // BAR_HH
 
index 33b60831c1998655148a69b18fc077111a3ec1d7..516a7b8f9eec378ee4b8f2439c41797bae544032 100644 (file)
@@ -4,45 +4,18 @@
 #include "glob.hh"
 #include "boxes.hh"
 #include "string.hh"
-    
+#include "staffelem.hh"
+
+
 /// a horizontally fixed size element of the score
-struct Item {
+struct Item : Staff_elem {
     /// indirection to the column it is in
     PCol * pcol_;
 
-    /// indirection to the pstaff it is in
-    PStaff *pstaff_;
-    
-    /// member: the symbols
-    Molecule *output;
-
-    /// 
-    Offset offset_;
-    /**
-      This is  needed, because #output# may still be
-      NULL.
-      */
     /****************/
-
-    void translate(Offset);
-    
-    /// do calculations after determining horizontal spacing
-    virtual void postprocess();
-
-    /// do calculations before determining horizontal spacing
-    virtual void preprocess();
-    /**
-      This is executed directly after the item is added to the
-      PScore
-      */
     
-    virtual Interval width() const;    
-    virtual Interval height() const;
-    String TeXstring () const ;
     Item();
     void print()const;
-    virtual ~Item();
-    Paperdef *paper() const;
 };
 /** Item is the datastructure for printables whose width is known
   before the spacing is calculated
diff --git a/hdr/script.hh b/hdr/script.hh
new file mode 100644 (file)
index 0000000..08d7a64
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  script.hh -- part of LilyPond
+
+  (c) 1996 Han-Wen Nienhuys
+*/
+
+#ifndef SCRIPT_HH
+#define SCRIPT_HH
+
+#include "scriptdef.hh"
+#include "item.hh"
+  
+struct Script : Item{
+    int dir;
+    int symdir;
+    int pos;
+    int staffsize;
+    Script_def*specs;
+    Stem * stem_;
+    Item * support;
+
+    /****************/
+    
+    void       set_symdir();
+    void       set_default_dir();
+    void       set_default_pos();
+
+    Molecule*  brew_molecule()const;
+    virtual void do_post_processing();
+    virtual void do_pre_processing();
+    Script(Script_req*, Item*,int,Stem*p=0);
+    virtual Interval width() const;    
+};
+
+
+#endif // SCRIPT_HH
+
index 261394c20648532587b5a059ef9f87a82977fa03..635b9fbbcc66b737d2a32f3ac4d1d73875383219 100644 (file)
@@ -25,13 +25,9 @@ struct Simple_walker: Staff_walker {
     Clef clef_;
     Rhythmic_grouping default_grouping;
     Rhythmic_grouping *current_grouping;
-//    Real inbar;                      // whuh?
-    
     svec<Slur_req*> pending_slur_reqs;
     svec<Slur*>  pending_slurs;
-
-
-
+    
     /****************/
 
     virtual void do_TYPESET_command(Command*);
@@ -39,12 +35,12 @@ struct Simple_walker: Staff_walker {
     virtual void process_requests();
     virtual void reset();
     
-    void do_note(Rhythmic_req*);
+    void do_note(Note_info);
     Simple_walker(Simple_staff*);
     Simple_column *col();
     Simple_staff *staff();
 
-    void do_local_key(Note_req*n);
+    void do_local_key(Note_req*, Notehead*);
     int find_slur(const Voice*v);
 };
 
index bb66f2b77717ab32606f9ef778822842e1ba1df4..01807f123e24fda107160bd764ad0ad2f397224b 100644 (file)
@@ -9,10 +9,12 @@ Bar::Bar( String t)
 {
     type = t;
 }
-void
-Bar::preprocess()
+Molecule*
+Bar::brew_molecule()const
 {    
     Symbol s = paper()->lookup_->bar(type);
-    output = new Molecule(Atom(s));
+Molecule*    output = new Molecule(Atom(s));
+return output;
+    
 }
     
index 14b242e5c60d344d3209bb86c96385b996d0b6b3..dc3cb40f3e4645ef2c51f838705ed3e83b301cf8 100644 (file)
@@ -9,10 +9,10 @@ Meter::Meter(svec<Scalar>a)
 {
 }
 
-void
-Meter::preprocess()
+Molecule*
+Meter::brew_molecule()const
 {
     Symbol s = paper()->lookup_->meter(args);
-    output = new Molecule(Atom(s));
+return new Molecule(Atom(s));
 }
 
index 4c0aa4b15cf11f2c40c15391e63854dde2ab9426..b3f2ac40c0bc719787d42593975e52086f0a37d5 100644 (file)
@@ -20,7 +20,7 @@ Simple_staff::get_TYPESET_item(Command *com)
        s = new Bar(com->args[1]);      
     } else if (type == "METER") {
        s = new Meter(arg);
-    } else if (type == "CLEF" ||type == "CURRENTCLEF") {
+    } else if (type == "CLEF" || type == "CURRENTCLEF") {
        Clef_item * c = new Clef_item;
        s = c;
        c->change = (type == "CLEF");