--- /dev/null
+#include "line.hh"
+
+
+#include "cols.hh"
+String
+Spanner::TeXstring() const
+{
+ assert(right->line);
+ Real w = left->hpos - right->hpos;
+ return (*strets)(w);
+}
+
+Spanner *
+Spanner::broken_at(const PCol *c1, const PCol *c2) const
+{
+ Spanner *sp = new Spanner(*this);
+ sp->left = c1;
+ sp->right = c2;
+ return sp;
+}
+
+Spanner::Spanner()
+{
+ pstaff_=0;
+ strets=0;
+ left = right = 0;
+}
+
+/****************************************************************/
+String
+Item::TeXstring() const
+{
+ return output->TeXstring();
+}
+
+Interval
+Item::width() const
+{
+ return output->extent().x;
+}
+
+/****************************************************************/
+
+Item::Item()
+{
+ col = 0;
+ output = 0;
+ pstaff_ = 0;
+}
--- /dev/null
+#ifndef ITEM_HH
+#define ITEM_HH
+
+#include "glob.hh"
+#include "boxes.hh"
+#include "string.hh"
+#include "tex.hh"
+
+/// a symbol which is attached between two columns.
+struct Spanner {
+ const PCol *left, *right;
+ Stretchable_symbol *strets;
+ PStaff * pstaff_;
+ /// clone a piece of this spanner.
+ Spanner *broken_at(const PCol *c1, const PCol *c2) const;
+ /**
+
+ PRE
+ c1 >= start, c2 <= stop
+ */
+ String TeXstring () const ;
+ Spanner();
+};
+/** Spanner should know about the items which it should consider:
+ e.g. slurs should be steep enough to "enclose" all those items. This
+ is absolutely necessary for beams, since they have to adjust the
+ length of stems of notes they encompass.
+
+ */
+
+/// a fixed size element of the score
+struct Item {
+ virtual Interval width() const;
+
+ const PCol * col;
+ Output *output;
+
+ PStaff *pstaff_;
+ /** needed for knowing at which staff to output this item
+ */
+ String TeXstring () const ;
+ Item();
+};
+/** An item must be part of a Column
+*/
+
+#endif
--- /dev/null
+#ifndef LINE_HH
+#define LINE_HH
+
+/*
+ horizontal structures for broken scores.
+*/
+
+#include "real.hh"
+#include "list.hh"
+#include "vray.hh"
+#include "glob.hh"
+#include "pstaff.hh"
+
+
+
+/// the columns of a score that form one line.
+struct
+Line_of_score {
+ List<const PCol *> cols;
+
+ // need to store height of each staff.
+ PointerList<Line_of_staff*> staffs;
+ const PScore * score; // needed to generate staffs
+
+ /****************/
+
+ Line_of_score(svec<const PCol *> sv, const PScore *);
+
+ String TeXstring() const;
+
+ // is #c# contained in #*this#?
+ bool element(const PCol *c);
+};
+
+/// one broken line of staff.
+struct Line_of_staff {
+ Real height;
+
+ /// y-pos of the baseline, measured from the top.
+ Real base;
+
+ PointerList<Spanner *> brokenspans;
+ Line_of_score const * scor;
+ const PStaff *pstaff_;
+
+ /****************/
+
+ String TeXstring() const;
+ Line_of_staff(Line_of_score*, PStaff *);
+};
+
+#endif
--- /dev/null
+#include "real.hh"
+
+class Vector;
+class Matrix;
+class Line_of_score;
+class Line_of_staff;
+class PCol;
+class PStaff;
+class Staff;
+class Staff_column;
+class Score;
+class Score_column;
+class Voice;
+class Voice_element;
+class Voicegroup;
+class Request;
+class Command;
+class Request;
+class Stem_req;
+class Span_req;
+class Slur_req;
+class Decresc_req;
+class Cresc_req;
+class Bracket_req;
+class Script_req;
+class Rest_req;
+class Note_req;
+class Lyric_req;
+class Chord;
+class Absdynamic_req;
+struct Offset;
+struct Interval;
+struct Box;
+struct PCol;
+struct Idealspacing;
+struct Spanner;
+struct Item;
+struct Line_of_staff;
+struct Colinfo;
+struct Linestaff;
+struct Atom;
+struct Molecule;
+struct PScore;
+struct Request;
+struct Note_req;
+struct Lyric_req;
+struct Script_req;
+struct Rest_req;
+struct Chord;
+struct Stem_req;
+struct Span_req;
+struct Beam_req;
+struct Bracket_req;
+struct Slur_req;
+struct Dynamic;
+struct Cresc_req;
+struct Decresc_req;
+struct Absdynamic_req;
+struct Score_column;
+struct Score;
+struct Staff_column;
+struct Staff;
+struct Command;
+struct Symbol;
+struct Stretchable_symbol;
+struct Output;
+struct Text_gob;
+struct Voice;
+struct Voicegroup;
+struct Voice_element;
+struct String;
+struct Tex_stream;
+struct Identifier;
+struct Keyword;
+class Mixed_qp;
+typedef Mixed_qp Optimisation_problem;
--- /dev/null
+#include "pstaff.hh"
+
+PStaff::PStaff()
+{
+ stafsym = 0;
+}
+
+void
+PStaff::add(Item *i )
+{
+ its.bottom().add(i);
+ i->pstaff_ = this;
+}
--- /dev/null
+#ifndef PSTAFF_HH
+#define PSTAFF_HH
+
+#include "list.hh"
+#include "item.hh"
+
+/// items grouped vertically.
+class PStaff {
+public:
+ Stretchable_symbol *stafsym;
+ List<const Spanner*> spans;
+ List<Item*> its;
+
+ void add(Item*i);
+ PStaff();
+ virtual ~PStaff() {}
+};
+
+#endif