X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-marker-scheme.cc;h=670d096158857f60301cab24ca3df4f67f446745;hb=4578dfbfdab5704ffc5317adfb252cb242f30115;hp=3278a7b013d6d9a350108342f778279b4718c4cc;hpb=651887bf80f7d060457ef46a97341eec46688b44;p=lilypond.git diff --git a/lily/page-marker-scheme.cc b/lily/page-marker-scheme.cc index 3278a7b013..670d096158 100644 --- a/lily/page-marker-scheme.cc +++ b/lily/page-marker-scheme.cc @@ -1,19 +1,42 @@ /* - page-marker-scheme.cc -- implement Page_marker bindings. + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2007--2010 Nicolas Sceaux - (c) 2007 Nicolas Sceaux + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "page-marker.hh" -LY_DEFINE (ly_make_page_marker, "ly:make-page-marker", +LY_DEFINE (ly_make_page_permission_marker, "ly:make-page-permission-marker", 2, 0, 0, (SCM symbol, SCM permission), "Return page marker with page breaking and turning permissions.") { LY_ASSERT_TYPE (ly_is_symbol, symbol, 1); - Page_marker *page_marker = new Page_marker (symbol, permission); + Page_marker *page_marker = new Page_marker (); + page_marker->set_permission (symbol, permission); + return page_marker->unprotect (); +} + +LY_DEFINE (ly_make_page_label_marker, "ly:make-page-label-marker", + 1, 0, 0, + (SCM label), + "Return page marker with label.") +{ + LY_ASSERT_TYPE (ly_is_symbol, label, 1); + Page_marker *page_marker = new Page_marker (); + page_marker->set_label (label); return page_marker->unprotect (); }