source file of the GNU LilyPond music typesetter
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-
+#include "moment.hh"
#include "paper-column.hh"
#include "paper-score.hh"
#include "debug.hh"
+#include "axis-group-interface.hh"
void
Paper_column::add_rod (Paper_column * p, Real d)
#endif
}
-bool
-Paper_column::breakpoint_b() const
-{
- return !line_l_;
-}
-
-Paper_column::Paper_column()
-{
- set_axes (X_AXIS, X_AXIS);
-
- line_l_=0;
- rank_i_ = -1;
-}
-
Line_of_score*
Paper_column::line_l() const
{
return line_l_;
}
-
-
-
Paper_column*
Paper_column::column_l () const
{
return (Paper_column*)(this);
}
-/*
- ugh.
- */
-void
-Paper_column::preprocess ()
+Paper_column::Paper_column (Moment w)
{
- minimal_dists_arr_drul_[LEFT].sort (Column_rod::compare);
- minimal_dists_arr_drul_[RIGHT].sort (Column_rod::compare);
- spring_arr_drul_[LEFT].sort (Column_spring::compare);
- spring_arr_drul_[RIGHT].sort (Column_spring::compare);
+ SCM when = (new Moment (w))->smobify_self ();
+ scm_unprotect_object (when);
+ set_elt_property ("when", when);
+
+ Axis_group_interface (this).set_interface ();
+ Axis_group_interface (this).set_axes (X_AXIS, X_AXIS);
+
+ line_l_=0;
+ rank_i_ = -1;
+}
+
+Moment
+Paper_column::when_mom () const
+{
+ SCM m = get_elt_property ("when");
+ Moment s (0);
+ if (SMOB_IS_TYPE_B(Moment, m))
+ {
+ s = *SMOB_TO_TYPE (Moment,m);
+ }
+ return s;
+}
+
+bool
+Paper_column::musical_b () const
+{
+ SCM m = get_elt_property ("shortest-starter-duration");
+ Moment s (0);
+ if (SMOB_IS_TYPE_B(Moment, m))
+ {
+ s = *SMOB_TO_TYPE (Moment,m);
+ }
+ return s != Moment(0);
}
+