]> git.donarmstrong.com Git - lilypond.git/blob - lily/paper-line.cc
e4da3cb548337bba2cf5120c3466e0f1c67b4d18
[lilypond.git] / lily / paper-line.cc
1 /*
2   paper-line.cc -- implement Paper_line
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "paper-line.hh"
10 #include "ly-smobs.icc"
11
12 Paper_line::Paper_line (Offset o, SCM stencils, bool is_title)
13 {
14   dim_ = o;
15   stencils_ = stencils;
16   is_title_ = is_title;
17 }
18
19 Offset
20 Paper_line::dim () const
21 {
22   return dim_;
23 }
24
25 bool
26 Paper_line::is_title () const
27 {
28   return is_title_;
29 }
30
31 SCM
32 Paper_line::stencils () const
33 {
34   return stencils_;
35 }
36
37 SCM
38 Paper_line::mark_smob (SCM s)
39 {
40   Paper_line *line = (Paper_line*) ly_cdr (s);
41   return line->stencils_;
42 }
43
44 int
45 Paper_line::print_smob (SCM, SCM port, scm_print_state*)
46 {
47   scm_puts ("#<Paper_line ", port);
48   scm_puts (" >", port);
49   return 1;
50 }
51
52 SCM
53 Paper_line::smobbed_copy () const
54 {
55   Paper_line *line = new Paper_line (*this);
56   return line->smobbed_self ();
57 }
58
59 IMPLEMENT_SIMPLE_SMOBS (Paper_line);
60 IMPLEMENT_TYPE_P (Paper_line, "ly:paper-line?");
61 IMPLEMENT_DEFAULT_EQUAL_P (Paper_line);