2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GLOBAL_CONTEXT_HH
21 #define GLOBAL_CONTEXT_HH
26 struct Preinit_Global_context
28 Output_def *output_def_;
29 Preinit_Global_context ();
32 class Global_context : Preinit_Global_context, public Context
34 PQueue<Moment> extra_mom_pq_;
35 virtual void derived_mark () const;
37 DECLARE_CLASSNAME (Global_context);
39 friend class Output_def;
41 Global_context (Output_def *);
42 int get_moments_left () const;
43 Moment sneaky_insert_extra_moment (Moment);
44 void add_moment_to_process (Moment);
45 void run_iterator_on_me (Music_iterator *);
46 virtual Context *get_score_context () const;
48 void apply_finalizations ();
49 void add_finalization (SCM);
52 virtual SCM get_output ();
53 virtual Output_def *get_output_def () const;
54 virtual Moment now_mom () const;
55 virtual Context *get_default_interpreter (const string &context_id = "");
57 Moment previous_moment () const;
63 SCM ly_format_output (SCM);
65 #endif // GLOBAL_CONTEXT_HH