2 clef-item.cc -- implement Clef_item
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "clef-item.hh"
12 #include "molecule.hh"
13 #include "paper-def.hh"
15 #include "clef-engraver.hh"
16 #include "g-text-item.hh"
20 Clef_item::do_pre_processing()
22 dim_cache_[Y_AXIS].translate (paper()->internote_f () * y_position_i_);
23 change_b_ = (break_status_dir() != RIGHT);
29 Clef_item::Clef_item()
40 Clef_item::do_add_processing ()
42 if (!break_status_dir_) // broken stuff takes care of their own texts
44 SCM defvis = gh_eval_str ("(lambda (d) (if (= d 1) '(#f . #f) '(#t . #t)))");
49 pscore_l_->typeset_element (g);
52 g->style_str_ = "italic";
53 g->dim_cache_[Y_AXIS].parent_l_ = &dim_cache_[Y_AXIS];
54 g->dim_cache_[X_AXIS].parent_l_ = &dim_cache_[X_AXIS];
55 add_dependency (g); // just to be sure.
57 Real r = do_height ()[octave_dir_] + g->extent (Y_AXIS)[-octave_dir_];
58 g->dim_cache_[Y_AXIS].set_offset (r);
62 visibility_lambda_ = defvis;
64 g->visibility_lambda_ = defvis;
76 Clef_item::do_brew_molecule_p() const
81 // Atom s = lookup_l ()-> text ("roman", to_str (break_status_dir ()));
83 Atom s = lookup_l ()->clef (t);
84 Molecule*output = new Molecule (Atom (s));