2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2010 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 class Global_context : public virtual Context
28 PQueue<Moment> extra_mom_pq_;
29 Output_def *output_def_;
31 DECLARE_CLASSNAME(Global_context);
33 friend class Output_def;
35 Global_context (Output_def *);
36 int get_moments_left () const;
37 Moment sneaky_insert_extra_moment (Moment);
38 void add_moment_to_process (Moment);
39 void run_iterator_on_me (Music_iterator *);
40 virtual Context *get_score_context () const;
42 void apply_finalizations ();
43 void add_finalization (SCM);
45 DECLARE_LISTENER (prepare);
46 virtual SCM get_output ();
47 virtual Output_def *get_output_def () const;
48 virtual Moment now_mom () const;
49 virtual Context *get_default_interpreter (string context_id = "");
51 Moment previous_moment () const;
57 SCM ly_format_output (SCM);
58 Global_context *unsmob_global_context (SCM x);
60 #endif // GLOBAL_CONTEXT_HH