]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.41
authorfred <fred>
Sun, 24 Mar 2002 19:34:51 +0000 (19:34 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:34:51 +0000 (19:34 +0000)
lily/include/midi-output.hh
lily/include/p-score.hh [new file with mode: 0644]
lily/include/staffline.hh

index 19457172cd8df4c8e3a2f1b62bacebc545616ad3..d5e9481f2500d52c92dddc298a86cebc0faab359 100644 (file)
@@ -9,7 +9,7 @@
 
 #ifndef MIDIOUTPUT_HH
 #define MIDIOUTPUT_HH
-#include "pscore.hh"
+#include "p-score.hh"
 
 struct Midi_output {
     Midi_output(Score* score_l, Midi_def* );
diff --git a/lily/include/p-score.hh b/lily/include/p-score.hh
new file mode 100644 (file)
index 0000000..eeec67e
--- /dev/null
@@ -0,0 +1,106 @@
+// the breaking problem for a score.
+
+#ifndef PSCORE_HH
+#define PSCORE_HH
+
+#include "colhpos.hh"
+#include "varray.hh"
+#include "p-col.hh"
+#include "p-staff.hh"
+
+
+/** all stuff which goes onto paper. notes, signs, symbols in a score can be grouped in two ways:
+    horizontally (staffwise), and vertically (columns). #PScore#
+    contains the items, the columns and the staffs.
+ */
+
+struct PScore {
+    Paper_def *paper_l_;
+    
+    /// the columns, ordered left to right
+    IPointerList<PCol *> cols;
+
+    /// the idealspacings, no particular order
+    IPointerList<Idealspacing*> suz;
+
+    /// the staffs ordered top to bottom
+    IPointerList<PStaff*> staffs;
+
+    /// all symbols in score. No particular order.
+    IPointerList<Item*> its;
+
+    /// if broken, the different lines
+    IPointerList<Line_of_score*> lines;
+
+    /// crescs etc; no particular order
+    IPointerList<Spanner *> spanners;
+
+    /// broken spanners
+    IPointerList<Spanner*> broken_spans;
+
+    /* *************** */
+    /* CONSTRUCTION */
+    
+    PScore(Paper_def*);
+    /// add a line to the broken stuff. Positions given in #config#
+    void set_breaking(Array<Col_hpositions>);
+
+    void add(PStaff *);
+    
+
+    /** add an item.
+       add the item in specified containers. If breakstatus is set
+       properly, add it to the {pre,post}break of the pcol.
+       */
+    void typeset_item(Item *item_p,  PCol *pcol_l,PStaff*pstaf_l,int breakstatus=1);
+
+    /// add a Spanner
+    void typeset_spanner(Spanner*, PStaff*);
+    ///    add to bottom of pcols
+    void add(PCol*);
+    void add_broken(Spanner*);
+
+    /* INSPECTION */
+    Array<Item*> select_items(PStaff*, PCol*);
+
+     /**
+       @return argument as a cursor of the list
+       */
+    PCursor<PCol *> find_col(const PCol *)const;
+
+    /* MAIN ROUTINES */
+    void process();
+
+    /// last deed of this struct
+    void output(Tex_stream &ts);
+
+    /* UTILITY ROUTINES */
+
+    /// get the spacing between c1 and c2, create one if necessary.
+    Idealspacing* get_spacing(PCol *c1, PCol *c2);
+
+    /// connect c1 and c2
+    void do_connect(PCol *c1, PCol *c2, Real distance_f, Real strength_f);
+
+    /// connect c1 and c2 and any children of c1 and c2
+    void connect(PCol* c1, PCol *c2, Real distance_f,Real  strength_f= 1.0);
+    
+    /* STANDARD ROUTINES */
+    void OK()const;
+    void print() const;
+private:
+    /// before calc_breaking
+    void preprocess();
+
+    /// calculate where the lines are to be broken, and use results
+    void calc_breaking();
+
+    /// after calc_breaking
+    void postprocess();
+    
+    /// delete unused columns
+    void clean_cols();
+};
+
+#endif
index 9fbe3ec9177a1964c56c3c7b4815c452a4784ed9..107d360c79860b7a3c86001bf7f097230238b6bd 100644 (file)
@@ -12,7 +12,7 @@
 #include "plist.hh"
 #include "varray.hh"
 #include "glob.hh"
-#include "pstaff.hh"
+#include "p-staff.hh"
 
 /// one broken line of staff.
 struct Line_of_staff {