X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fp-col.hh;h=bf2d032cf25183ca2a80bdfe2709f86e3d7cb1d9;hb=434da79e9d7684b2b05fa92a6d808d4ea7933046;hp=87f15841643f06f08dc4aff847b28447450194c8;hpb=90d3ec050c58d6fa91f668dd6ca1ae8f16df20c3;p=lilypond.git diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 87f1584164..bf2d032cf2 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -1,11 +1,18 @@ -#ifndef COLS_HH -#define COLS_HH +/* + p-col.hh -- declare Paper_column -#include "glob.hh" -#include "boxes.hh" -#include "plist.hh" -#include "item.hh" + source file of the GNU LilyPond music typesetter + (c) 1997--1999 Han-Wen Nienhuys +*/ + + +#ifndef P_COL_HH +#define P_COL_HH + +#include "axis-group-item.hh" +#include "rod.hh" +#include "spring.hh" /** stuff grouped vertically. @@ -20,80 +27,47 @@ \end{itemize} */ -class PCol { +class Paper_column : public Axis_group_item { public: - Link_list its; - Link_list 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_; + VIRTUAL_COPY_CONS(Score_element); + Drul_array > minimal_dists_arr_drul_; + Drul_array > spring_arr_drul_; + void preprocess (); + /// set a minimum distance + void add_rod (Paper_column * to, Real distance); + void add_spring (Paper_column * to, Real dist, Real strength); - /// 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 *line_l_; + virtual Paper_column * column_l () const; + /// if lines are broken then this column is in #line# + Line_of_score *line_l_; - /** if lines are broken then this column x-coord #hpos# if not - known, then hpos == -1.(ugh?) */ + virtual Line_of_score *line_l () const; - Real hpos; // should use ptr? + /// which one (left =0) + int rank_i() const; - bool error_mark_b_; - bool used_b_ ; // manual override.. - - PScore * pscore_l_; + bool breakpoint_b() const; + void add_item (Item *i); - /* *************** */ - /// which one (left =0) - int rank_i() const; + Paper_column(); - /// does this column have items - bool used_b() const; - bool breakpoint_b() const; - void clean_breakable_items(); - - void add(Item *i); + void set_rank (int); - /// Can this be broken? true eg. for bars. - bool breakable_b()const; + void OK() const; + virtual void do_print() const; +private: - Interval width() const; - ~PCol(); - PCol(PCol * parent); - - /** - which col comes first?. - signed compare on columns. - - @return < 0 if c1 < c2. + /** + The ranking: left is smaller than right + -1 is uninitialised. */ - static int compare(const PCol &c1, const PCol &c2); - void set_rank(int); + int rank_i_; - void OK() const; - void set_breakable(); - void print()const; -private: - - /** - The ranking: left is smaller than right - -1 is uninitialised. - */ - int rank_i_; - PCol(PCol const&){} }; -#include "compare.hh" -instantiate_compare(PCol &, PCol::compare); +// #include "compare.hh" +// INSTANTIATE_COMPARE(Paper_column &, Paper_column::compare); +#endif // P_COL_HH -#endif