bool
Note_head_register::try_request(Request *req_l)
{
- if (req_l->note() || req_l->rest())
- note_req_l_=req_l->rhythmic();
+ if (req_l->musical() && (req_l->musical()->note() || req_l->musical()->rest()))
+ note_req_l_=req_l->musical()->rhythmic();
else
return false;
}
for ( int i = 0; i < ptr()->musicalreq_l_arr_.size(); i++ ) {
- Rhythmic_req *n = ptr()->musicalreq_l_arr_[i]->rhythmic();
+ Musical_req *m = ptr()->musicalreq_l_arr_[i]->musical();
+ if (!m)
+ return;
+ Rhythmic_req *n = m->rhythmic();
if ( !n)
continue;
Note_req * note_l = n->note();
-#include "varray.hh"
+/*
+ molecule.cc -- implement Molecule
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "interval.hh"
#include "dimen.hh"
#include "string.hh"
#include "debug.hh"
#include "tex.hh"
-void
-Atom::print() const
-{
- mtor << "texstring: " <<sym.tex<<"\n";
-}
-
-Box
-Atom::extent() const
-{
- Box b( sym.dim);
- b.translate(off);
- return b;
-}
-
-Atom::Atom(Symbol s)
-{
- sym=s;
-}
-
-
-String
-Atom::TeX_string() const
-{
- /* infinity checks. */
- assert( abs(off.x) < 100 CM);
- assert( abs(off.y) < 100 CM);
-
- // whugh.. Hard coded...
- String s("\\placebox{%}{%}{%}");
- Array<String> a;
- a.push(print_dimen(off.y));
- a.push(print_dimen(off.x));
- a.push(sym.tex);
- return substitute_args(s, a);
-}
/* *************** */
for (iter_top(ats,c); c.ok(); c++)
c->print();
}
+
+void
+Molecule::add(Atom const &a)
+{
+ ats.bottom().add(new Atom(a));
+}