From 66b14fa596d0d154e3be43d33abfd4bdf24d28aa Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:34:52 +0000 Subject: [PATCH] lilypond-0.0.41 --- lily/beam.cc | 3 +- lily/include/p-col.hh | 86 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 lily/include/p-col.hh diff --git a/lily/beam.cc b/lily/beam.cc index b9fbd0a28c..87e9114caf 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -1,5 +1,6 @@ #include "varray.hh" +#include "proto.hh" #include "dimen.hh" #include "beam.hh" #include "misc.hh" @@ -7,7 +8,7 @@ #include "symbol.hh" #include "molecule.hh" #include "leastsquares.hh" -#include "pcol.hh" +#include "p-col.hh" #include "stem.hh" #include "paper-def.hh" #include "lookup.hh" diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh new file mode 100644 index 0000000000..2641e64008 --- /dev/null +++ b/lily/include/p-col.hh @@ -0,0 +1,86 @@ +#ifndef COLS_HH +#define COLS_HH + +#include "glob.hh" +#include "boxes.hh" +#include "plist.hh" +#include "item.hh" + + +/** + stuff grouped vertically. + This is a class to address items vertically. It contains the data for: + \begin{itemize} + \item + unbroken score + \item + broken score + \item + the linespacing problem + \end{itemize} + */ + +struct PCol { + PointerList its; + PointerList stoppers, starters; + + + + /** prebreak is put before end of line. + if broken here, then (*this) column is discarded, and prebreak + is put at end of line, owned by Col + */ + PCol *prebreak_p_; + + /// postbreak at beginning of the new line + PCol *postbreak_p_; + + /** if this column is pre or postbreak, then this field points to + the parent. */ + PCol *daddy_l_; + + /// if lines are broken then this column is in #line# + const Line_of_score *line_l_; + + /// if lines are broken then this column x-coord #hpos# + Real hpos; + + PScore * pscore_l_; + + /* *************** */ + /// which one (left =0) + int rank() const; + + /// does this column have items + bool used_b() const; + + void add(Item *i); + + /// Can this be broken? true eg. for bars. + bool breakable_b()const; + + Interval width() const; + ~PCol(); + PCol(PCol * parent); + + /** + which col comes first?. + signed compare on columns. + + @return < 0 if c1 < c2. + */static int compare(const PCol &c1, const PCol &c2); + + + void OK() const; + void set_breakable(); + void print()const; +private: + PCol(PCol const&){} +}; + + +#include "compare.hh" +instantiate_compare(PCol &, PCol::compare); + + +#endif -- 2.39.5