-#ifndef COLS_HH
-#define COLS_HH
+/*
+ p-col.hh -- declare Paper_column
-#include "glob.hh"
-#include "boxes.hh"
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef P_COL_HH
+#define P_COL_HH
+
+#include "horizontal-group-item.hh"
#include "plist.hh"
-#include "item.hh"
+#include "rod.hh"
/**
\end{itemize}
*/
-class PCol {
+class Paper_column : public Horizontal_group_item {
public:
- PointerList<Item const *> its;
- PointerList<Spanner const *> stoppers, starters;
-
- /** prebreak is put before end of line.
+ DECLARE_MY_RUNTIME_TYPEINFO;
+ SCORE_ELEMENT_CLONE(Paper_column);
+ Drul_array< Array<Column_rod> > minimal_dists_arr_drul_;
+
+ void preprocess ();
+ /// set a minimum distance
+ void add_rod (Paper_column * to, Real distance);
+
+ /** 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#
- Line_of_score const *line_l_;
+ Paper_column *prebreak_l() const;
- /** if lines are broken then this column x-coord #hpos# if not
- known, then hpos == -1.(ugh?) */
+ /// postbreak at beginning of the new line
+ Paper_column *postbreak_l() const;
- Real hpos; // should use ptr?
+ virtual Paper_column * column_l () const;
+ /// if lines are broken then this column is in #line#
+ Line_of_score *line_l_;
- PScore * pscore_l_;
+ virtual Line_of_score *line_l () const;
+ bool error_mark_b_;
+ bool used_b_ ; // manual override..
+
- /* *************** */
- /// which one (left =0)
- int rank() const;
+ /// which one (left =0)
+ int rank_i() const;
- /// does this column have items
- bool used_b() const;
+ /// does this column have items
+ bool used_b() const;
+ bool breakpoint_b() const;
- void add(Item *i);
+ void add_item (Item *i);
- /// Can this be broken? true eg. for bars.
- bool breakable_b()const;
-
- Interval width() const;
- ~PCol();
- PCol(PCol * parent);
+ Paper_column();
- /**
- which col comes first?.
- signed compare on columns.
+ /**
+ which col comes first?.
+ signed compare on columns.
- @return < 0 if c1 < c2.
+ @return < 0 if c1 < c2.
*/
- static int compare(const PCol &c1, const PCol &c2);
- void set_rank(int);
+ static int compare (const Paper_column &c1, const Paper_column &c2);
+ void set_rank (int);
- void OK() const;
- void set_breakable();
- void print()const;
+ void OK() const;
+ virtual void do_print() const;
private:
- /**
- The ranking: left is smaller than right
- -1 is uninitialised.
- */
- int rank_i_;
- PCol(PCol const&){}
+ /**
+ The ranking: left is smaller than right
+ -1 is uninitialised.
+ */
+ int rank_i_;
+
};
#include "compare.hh"
-instantiate_compare(PCol &, PCol::compare);
+INSTANTIATE_COMPARE(Paper_column &, Paper_column::compare);
+#endif // P_COL_HH
-#endif