#include "head-column.hh"
#include "note-head.hh"
#include "stem.hh"
+#include "script.hh"
Head_column::Head_column()
{
Head_column::set(Stem*stem_l)
{
stem_l_ = stem_l;
- add_dependency(stem_l);
+ Score_elem::add_dependency(stem_l);
+ for (int i=0; script_l_arr_.size(); i++)
+ script_l_arr_[i]->set_stem( stem_l );
}
+void
+Head_column::add(Script *script_l)
+{
+ Script_column::add(script_l) ;
+ if (stem_l_ )
+ script_l->set_stem( stem_l_ );
+}
void
Head_column::add(Note_head *n_l)
{
#include "real.hh"
#include "interval.hh"
#include "offset.hh"
+#include "axes.hh"
-/// a square subset of Real^2
struct Box {
- Interval x, y;
-
+ Interval interval_a_[NO_AXES];
+
+ Interval &x() {return interval_a_[X_AXIS]; }
+ Interval &y(){ return interval_a_[Y_AXIS]; }
+ Interval x()const{ return interval_a_[X_AXIS]; }
+ Interval y()const{return interval_a_[Y_AXIS]; }
+ Interval operator[](Axis a ) {
+ return interval_a_[a];
+ }
+
void translate(Offset o) {
- x.translate(o.x);
- y.translate(o.y);
+ x().translate(o.x());
+ y().translate(o.y());
}
+
/// smallest box enclosing #b#
void unite(Box b) {
- x.unite(b.x);
- y.unite(b.y);
+ x().unite(b.x());
+ y().unite(b.y());
}
Box();
Box(Interval ix, Interval iy);
a.push(print_dimen( h));
Symbol ret=(*symtables_)("bars")->lookup(s);;
ret.tex = substitute_args(ret.tex, a);
- ret.dim.y = Interval( 0, h);
+ ret.dim.y() = Interval( 0, h);
return ret;
}
Array<String> a;
a.push(idx);
ret.tex = substitute_args(ret.tex, a);
- ret.dim.x = Interval(0,wid);
+ ret.dim.x() = Interval(0,wid);
return ret;
}
{
Real internote_f = paper_l_ ->internote_f();
Symbol s;
- s.dim.x = Interval(0,wid);
Real dy = (lines >0) ? (lines-1)*internote_f : 0;
- s.dim.y = Interval(0,dy);
+ s.dim = Box(Interval(0,wid), Interval(0,dy));
Array<String> a;
a.push(lines);
Lookup::meter(Array<Scalar> a) const
{
Symbol s;
- s.dim.x = Interval( 0 PT, 10 PT);
- s.dim.y = Interval(0, 20 PT); // todo
+ s.dim.x() = Interval( 0 PT, 10 PT);
+ s.dim.y() = Interval(0, 20 PT); // todo
String src = (*symtables_)("param")->lookup("meter").tex;
s.tex = substitute_args(src,a);
return s;
}
Symbol s;
- s.dim.x = Interval(0,0);
- s.dim.y = Interval(y1,y2);
+ s.dim.x() = Interval(0,0);
+ s.dim.y() = Interval(y1,y2);
Array<String> a;
a.push(print_dimen(y1));
Array<String> a;
a.push(idx);
s.tex = substitute_args(s.tex,a);
- s.dim.y = Interval(0,y);
+ s.dim.y() = Interval(0,y);
}
{
Array<String> a;
Score_align_engraver::do_pre_move_processing()
{
if (align_p_) {
- typeset_breakable_item( align_p_);
+ typeset_element( align_p_);
align_p_ =0;
}
}
if (!align_p_ ) {
align_p_ = new Horizontal_group_item;
+ align_p_->breakable_b_ = true;
announce_element(Score_elem_info(align_p_,0));
}
-
- align_p_->add_element(inf.elem_l_);
+ Score_elem * unbound_elem = inf.elem_l_;
+ while ( unbound_elem->axis_group_l_a_[X_AXIS] )
+ unbound_elem = unbound_elem->axis_group_l_a_[X_AXIS];
+ align_p_->add_element(unbound_elem );
}
}