DECLARE_SMOBS (Book);
public:
- string user_key_;
SCM header_;
Output_def *paper_;
SCM scores_;
SCM input_location_;
Book (Book const &);
- Input *origin() const;
- VIRTUAL_COPY_CONSTRUCTOR(Book, Book);
+ Input *origin () const;
+ VIRTUAL_COPY_CONSTRUCTOR (Book, Book);
Book ();
void add_score (SCM);
void add_bookpart (SCM);
class Music_wrapper_iterator;
class Note_performer;
class Output_def;
-class Object_key;
-class Object_key_dumper;
-class Object_key_undumper;
class Open_type_font;
class Output_property;
class Page_breaking;
class Transposed_music;
class yyFlexLexer;
-typedef void (*Engraver_void_function_engraver_grob_info) (Engraver *, Grob_info);
+typedef void (*Engraver_void_function_engraver_grob_info) (Engraver *,
+ Grob_info);
typedef void (*Translator_void_method_ptr) (Translator *);
#endif /* LILY_PROTO_HH */
along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MUSIC_OUTPUT_DEF_HH
-#define MUSIC_OUTPUT_DEF_HH
+#ifndef OUTPUT_DEF_HH
+#define OUTPUT_DEF_HH
#include "lily-proto.hh"
#include "virtual-methods.hh"
Output_def *parent_;
Input input_origin_;
- string user_key_;
Output_def (Output_def const&);
Output_def ();
Font_metric* find_pango_font (Output_def *layout, SCM descr, Real factor);
-Font_metric *find_scaled_font (Output_def *od, Font_metric *f, Real magnification);
+Font_metric *find_scaled_font (Output_def *od, Font_metric *f,
+ Real magnification);
Output_def *scale_output_def (Output_def *def, Real scale);
Real output_scale (Output_def*);
-#endif /* MUSIC_OUTPUT_DEF_HH */
+#endif /* OUTPUT_DEF_HH */
SCM input_location_;
SCM header_;
public:
- Input *origin() const;
-
- vector<Output_def*> defs_;
- string user_key_;
+ Input *origin () const;
+
+ vector<Output_def *> defs_;
bool error_found_;
Score ();
Score (Score const &);
VIRTUAL_COPY_CONSTRUCTOR (Score, Score);
-
+
SCM get_music () const;
void add_output_def (Output_def *def);
void set_music (SCM music);
#include <sstream>
using namespace std;
-#include "context.hh" // for nested_property_alist
+#include "context.hh" // for nested_property_alist
#include "international.hh"
#include "interval.hh"
#include "keyword.hh"
{"name", NAME},
{"new", NEWCONTEXT},
{"notemode", NOTEMODE},
- {"objectid", OBJECTID},
{"once", ONCE},
{"override", OVERRIDE},
{"paper", PAPER},
Lily_lexer::Lily_lexer (Lily_lexer const &src, Lily_parser *parser)
: Includable_lexer ()
{
- parser_ = parser;
+ parser_ = parser;
keytable_ = (src.keytable_) ? new Keyword_table (*src.keytable_) : 0;
chordmodifier_tab_ = src.chordmodifier_tab_;
pitchname_tab_stack_ = src.pitchname_tab_stack_;
{
if (!keytable_)
return SCM_EOL;
-
+
SCM l = SCM_EOL;
SCM *tail = &l;
for (vsize i = 0; i < keytable_->table_.size (); i++)
yy_flex_debug = get_program_option ("debug-lexer");
parser_->set_yydebug (get_program_option ("debug-parser"));
-
new_input (main_input_name_, sources_);
scm_module_define (scm_car (scopes_),
Lily_lexer::mark_smob (SCM s)
{
ASSERT_LIVE_IS_ALLOWED ();
-
+
Lily_lexer *lexer = (Lily_lexer *) SCM_CELL_WORD_1 (s);
scm_gc_mark (lexer->chordmodifier_tab_);
%token MIDI "\\midi"
%token NAME "\\name"
%token NOTEMODE "\\notemode"
-%token OBJECTID "\\objectid"
%token OCTAVE "\\octave"
%token ONCE "\\once"
%token OVERRIDE "\\override"
%type <scm> number_expression
%type <scm> number_factor
%type <scm> number_term
-%type <scm> object_id_setting
%type <scm> octave_check
%type <scm> optional_context_mod
%type <scm> optional_id
;
-object_id_setting:
- OBJECTID STRING { $$ = $2; }
- ;
-
toplevel_expression:
lilypond_header {
PARSER->lexer_->set_identifier (ly_symbol2scm ("$defaultheader"), $1);
$$->scores_ = SCM_EOL;
$$->bookparts_ = SCM_EOL;
}
- | book_body object_id_setting {
- $$->user_key_ = ly_scm2string ($2);
- }
;
bookpart_block:
$$->paper_ = 0;
$$->scores_ = SCM_EOL;
}
- | bookpart_body object_id_setting {
- $$->user_key_ = ly_scm2string ($2);
- }
;
score_block:
$$->protect ();
$$->origin ()->set_spot (@$);
}
- | score_body object_id_setting {
- $$->user_key_ = ly_scm2string ($2);
- }
| score_body lilypond_header {
$$->set_header ($2);
}
return sc->get_header ();
}
-
LY_DEFINE (ly_score_set_header_x, "ly:score-set-header!",
2, 0, 0, (SCM score, SCM module),
"Set the score header.")
LY_ASSERT_SMOB (Score, score, 1);
SCM_ASSERT_TYPE (ly_is_module (module), module, SCM_ARG2, __FUNCTION__,
"module");
-
+
Score *sc = unsmob_score (score);
sc->set_header (module);
return SCM_UNSPECIFIED;
}
-
LY_DEFINE (ly_score_music, "ly:score-music",
1, 0, 0, (SCM score),
"Return score music.")
2, 0, 0, (SCM score, SCM layout),
"Run @var{score} through @var{layout} (an output definition)"
" scaled to correct output-scale already, returning a list of"
- " layout-lines. This function takes an optional"
- " @code{Object_key} argument.")
+ " layout-lines.")
{
LY_ASSERT_SMOB (Score, score, 1);
LY_ASSERT_SMOB (Output_def, layout, 2);