]> git.donarmstrong.com Git - lilypond.git/blobdiff - score.hh
release: 0.0.6
[lilypond.git] / score.hh
index 3e65d50d998d7e7146cd20543486d4cc82623c21..176d7fa47a0f7e55f9217eb2666f8c9346e6bf10 100644 (file)
--- a/score.hh
+++ b/score.hh
@@ -1,81 +1,50 @@
 #ifndef SCORE_HH
 #define SCORE_HH
-
 #include "vray.hh"
-#include "cols.hh"
-#include "mtime.hh"
-#include "command.hh"
-
-struct Score_column {
-    PCol * pcol;
-    svec<Mtime> durations;
-    Mtime when;
-
-    /// 
-    bool musical;
-    
-
-    Score_column(Mtime when);
-
-    static int compare(Score_column & c1, Score_column &c2) {
-       return sgn(c1.when - c2.when);
-    }
-    void set_breakable() {
-        pcol->set_breakable();
-    }
-    bool used();
-    void print() const;
-};
-/**
-
-    When typesetting hasn't started on PScore yet, the columns which
-    contain data have a rhythmical position. Score_column is the type
-    with a rhythmical time attached to it. The calculation of
-    idealspacing is done with data in these columns. (notably: the
-    #durations# field)
-
-    */
-
-instantiate_compare(Score_column&, Score_column::compare);
+#include "proto.hh"
+#include "plist.hh"
 
 
 /// the total music def of one movement
 struct Score {
-    /// staffs_ and commands_ form the problem definition.
+    /// paper_, staffs_ and commands_ form the problem definition.
+    Paperdef *paper_;
     PointerList<Staff *> staffs_;
-    PointerList<Command*> commands_;
+    Score_commands *commands_;
     
     /// "runtime" fields for setting up spacing    
     PointerList<Score_column*> cols_;
     PScore *pscore_;
 
     /****************************************************************/
-    
-    /// add #Idealspacings# to #pscore_#
-    void calc_idealspacing();
-    void process();
 
     /// construction
     void add_staff(Staff *st);
+    void set(Paperdef*);
+    Score();
+    ~Score();    
+    void add(Staff*);        
+    void set(Score_commands*);
+
 
-    void distribute_commands();
-    /** add the score wide commands (bars, breaks) to each staff so
-    they can process (typeset) them if needed */
     void OK() const;
-    Score_column *find_col(Mtime,bool);
-    void do_pcols();
-    void add(Command *);
-    void add(Staff*);
+    Score_column *find_col(Real,bool);
+    void process();
     void output(String fn);
-    PCursor<Score_column*> create_cols(Mtime);
+    PCursor<Score_column*> create_cols(Real);
     void print() const;
-    void do_miscs() ;
-    Mtime last() const;
+    Real last() const;
+    
+private:
+    void do_pcols();    
     void clean_cols();
-    void clean_commands();
-
+    void distribute_commands();
     void do_connect(PCol *c1, PCol *c2, Real d);
     void connect_nonmus(PCol* c1, PCol *c2, Real d);
+    /// add #Idealspacings# to #pscore_#
+    void calc_idealspacing();
+    /** add the score wide commands (bars, breaks) to each staff so
+    they can process (typeset) them if needed */
 };
 /**