2 paper-system.cc -- implement Paper_system
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2005 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "paper-system.hh"
11 #include "virtual-methods.hh"
13 #include "ly-smobs.icc"
15 IMPLEMENT_SMOBS (Paper_system);
16 IMPLEMENT_TYPE_P (Paper_system, "ly:paper-system?");
17 IMPLEMENT_DEFAULT_EQUAL_P (Paper_system);
19 Paper_system::Paper_system (Stencil s, bool is_title)
23 break_before_penalty_ = 0;
26 staff_refpoints_ = Interval (0, 0);
29 Paper_system::~Paper_system ()
34 Paper_system::mark_smob (SCM smob)
36 Paper_system *system = (Paper_system *) SCM_CELL_WORD_1 (smob);
37 return system->stencil_.expr ();
41 Paper_system::print_smob (SCM smob, SCM port, scm_print_state*)
43 Paper_system *p = (Paper_system *) SCM_CELL_WORD_1 (smob);
44 scm_puts ("#<", port);
45 scm_puts (classname (p), port);
46 scm_puts ("n ", port);
47 scm_puts (to_string (p->number_).to_str0 (), port);
48 scm_puts (", p ", port);
49 scm_puts (to_string (p->break_before_penalty_).to_str0 (), port);
51 scm_puts (" t", port);
52 scm_puts (" >", port);
57 Paper_system::is_title () const
63 Paper_system::break_before_penalty () const
65 return break_before_penalty_;
69 Paper_system::to_stencil () const