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 "text-item.hh"
16 #include "paper-score.hh"
17 #include "dimension-cache.hh"
18 #include "staff-side.hh"
21 Clef_item::do_pre_processing()
23 Staff_symbol_referencer::do_pre_processing();
24 SCM style_sym =get_elt_property ("style");
26 if (style_sym != SCM_UNDEFINED)
27 style = ly_scm2string (style_sym);
29 if (break_status_dir() != RIGHT && style != "fullSizeChanges")
31 if (style == "transparent")
33 set_elt_property ("transparent", SCM_BOOL_T);
41 Clef_item::Clef_item()
43 set_elt_property ("breakable", SCM_BOOL_T);
50 Clef_item::do_add_processing ()
52 if (!break_status_dir ()) // broken stuff takes care of their own texts
56 SCM octave_dir = remove_elt_property ("octave-dir");
57 if (isdir_b (octave_dir))
60 Side_position_interface spi (g);
61 spi.set_axis (Y_AXIS);
63 pscore_l_->typeset_element (g);
66 g->set_elt_property ("style", gh_str02scm ("italic"));
67 g->set_parent (this, Y_AXIS);
68 g->set_parent (this, X_AXIS);
69 g->set_elt_property ("direction", octave_dir);
71 add_dependency (g); // just to be sure.
72 SCM my_vis = get_elt_property ("visibility-lambda");
73 if (my_vis != SCM_UNDEFINED)
74 g->set_elt_property ("visibility-lambda", my_vis);
82 Clef_item::do_brew_molecule_p() const
84 Molecule*output = new Molecule (lookup_l ()->afm_find (String ("clefs-" + symbol_)));