lilypond-1.3.7
[lilypond.git] / lily / mark-engraver.cc
blobe00947c9ab4100c53ba4b94ab68b26c3d8bd71b4
1 /*
2 mark-engraver.cc -- implement Mark_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8 #include "command-request.hh"
9 #include "mark-engraver.hh"
10 #include "engraver-group-engraver.hh"
11 #include "text-item.hh"
14 ADD_THIS_TRANSLATOR (Mark_engraver);
16 Mark_engraver::Mark_engraver ()
18 mark_req_l_ = 0;
19 axis_ = Y_AXIS;
20 type_ = "mark";
21 visibility_lambda_ = ly_eval_str ("mark-visibility");
24 void
25 Mark_engraver::do_post_move_processing ()
27 mark_req_l_ = 0;
31 bool
32 Mark_engraver::do_try_music (Music* r_l)
34 if (Mark_req *mr = dynamic_cast <Mark_req *> (r_l))
36 mark_req_l_ = mr;
37 return true;
39 return false;
42 void
43 Mark_engraver::do_process_requests ()
45 if (mark_req_l_)
47 create_items (mark_req_l_);
48 text_p_->text_str_ = mark_req_l_->str_;
49 SCM st = ly_str02scm ((text_p_->text_str_.index_any_i ("0123456789") >= 0 )
50 ? "mark" : "large");
51 text_p_->set_elt_property ("style", st);