From: fred Date: Sun, 24 Mar 2002 19:55:34 +0000 (+0000) Subject: lilypond-0.1.11 X-Git-Tag: release/1.5.59~4015 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7bffe7ac111973a47f364019005d1f69b0a99cce;p=lilypond.git lilypond-0.1.11 --- diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 797fde9584..c297bb7843 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -1,11 +1,17 @@ -#ifndef COLS_HH -#define COLS_HH +/* + p-col.hh -- declare Paper_column + source file of the GNU LilyPond music typesetter -#include "boxes.hh" -#include "plist.hh" -#include "item.hh" + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef P_COL_HH +#define P_COL_HH +#include "horizontal-group-item.hh" +#include "plist.hh" /** stuff grouped vertically. @@ -20,81 +26,64 @@ \end{itemize} */ -class PCol { +class Paper_column : public Horizontal_group_item { public: - Link_list its; - Link_list starters; - - /** prebreak is put before end of line. + DECLARE_MY_RUNTIME_TYPEINFO; + SCORE_ELEM_CLONE(Paper_column); + + /** 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_; + Paper_column *prebreak_l() const; - /// 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_; + /// postbreak at beginning of the new line + Paper_column *postbreak_l() const; - /// if lines are broken then this column is in #line# - Line_of_score *line_l_; + /// 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?) */ - - Real hpos_f_; // should use ptr? - - bool error_mark_b_; - bool used_b_ ; // manual override.. + virtual Line_of_score *line_l () const; + bool error_mark_b_; + bool used_b_ ; // manual override.. - Paper_score * pscore_l_; + /* *************** */ - /* *************** */ - /// which one (left =0) - int rank_i() const; + /// which one (left =0) + int rank_i() const; - /// does this column have items - bool used_b() const; - bool breakpoint_b() const; - void clean_breakable_items(); + /// does this column have items + bool used_b() const; + bool breakpoint_b() const; - void add (Item *i); + void add (Item *i); - /// Can this be broken? true eg. for bars. - bool breakable_b()const; - - Interval width() const; - virtual ~PCol(); - PCol(); + 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(); - virtual void do_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