2 clef-item.cc -- implement Clef_item
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "clef-item.hh"
12 #include "molecule.hh"
13 #include "paper-def.hh"
15 #include "g-text-item.hh"
19 Clef_item::do_pre_processing()
21 dim_cache_[Y_AXIS].translate (paper()->internote_f () * y_position_i_);
22 change_b_ = (break_status_dir() != RIGHT);
28 Clef_item::Clef_item()
39 Clef_item::do_add_processing ()
41 if (!break_status_dir_) // broken stuff takes care of their own texts
43 SCM defvis = gh_eval_str ("(lambda (d) (if (= d 1) '(#f . #f) '(#t . #t)))");
48 pscore_l_->typeset_element (g);
51 g->style_str_ = "italic";
52 g->dim_cache_[Y_AXIS].parent_l_ = &dim_cache_[Y_AXIS];
53 g->dim_cache_[X_AXIS].parent_l_ = &dim_cache_[X_AXIS];
54 add_dependency (g); // just to be sure.
56 Real r = do_height ()[octave_dir_] + g->extent (Y_AXIS)[-octave_dir_];
57 g->dim_cache_[Y_AXIS].set_offset (r);
62 set_elt_property (ly_symbol ("visibility_lambda"),
66 g->set_elt_property (ly_symbol ("visibility_lambda"),
73 Clef_item::do_brew_molecule_p() const
79 Molecule*output = new Molecule (lookup_l ()->clef (t));