lilypond-1.3.145
[lilypond.git] / lily / request.cc
blob7ad67285b1836a1b3ca8845dda7e4bc46538b2a6
1 /*
2 request.cc -- implement Request
4 source file of the GNU LilyPond music typesetter
6 (c) 1996--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "request.hh"
10 #include "debug.hh"
14 bool
15 Request::equal_b (Request const* r) const
17 return r->do_equal_b (this) || this->do_equal_b (r) ;
20 bool
21 Request::do_equal_b (Request const*) const
23 return true;
27 Request::Request ()
28 : Music (SCM_EOL)
30 set_mus_property ("type", ly_symbol2scm ("request"));
35 Script_req::Script_req ()
37 set_direction (CENTER);
40 void
41 Script_req::set_direction (Direction d)
43 set_mus_property ("direction", gh_int2scm (d));
46 Direction
47 Script_req::get_direction () const
49 SCM d = get_mus_property ("direction");
51 return (isdir_b (d)) ? to_dir (d) : CENTER;
55 Direction
56 Span_req::get_span_dir () const
58 SCM d = get_mus_property ("span-direction");
60 return (isdir_b (d)) ? to_dir (d) : CENTER;
63 void
64 Span_req::set_span_dir (Direction d)
66 set_mus_property ("span-direction", gh_int2scm (d));