]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/global-context.hh
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / include / global-context.hh
1 /*
2   global-context.hh -- declare Global_context
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef GLOBAL_CONTEXT_HH
10 #define GLOBAL_CONTEXT_HH
11
12 #include "context.hh"
13 #include "pqueue.hh"
14
15 class Global_context : public virtual Context
16 {
17   PQueue<Moment> extra_mom_pq_;
18   Output_def *output_def_;
19   int unique_count_;
20
21   DECLARE_CLASSNAME(Global_context);
22
23   friend class Output_def;
24 public:
25   Global_context (Output_def *, Moment final, Object_key *key);
26   int get_moments_left () const;
27   Moment sneaky_insert_extra_moment (Moment);
28   void add_moment_to_process (Moment);
29   void run_iterator_on_me (Music_iterator *);
30   virtual Score_context *get_score_context () const;
31
32   void apply_finalizations ();
33   void add_finalization (SCM);
34
35   virtual SCM get_output ();
36   virtual void prepare (Moment);
37   virtual void one_time_step ();
38   virtual void finish ();
39   virtual Output_def *get_output_def () const;
40   virtual Moment now_mom () const;
41   virtual Context *get_default_interpreter ();
42
43   int new_unique ();
44   Moment previous_moment () const;
45 protected:
46   Moment final_mom_;
47   Moment prev_mom_;
48   Moment now_mom_;
49 };
50
51 SCM ly_format_output (SCM);
52
53 #endif // GLOBAL_CONTEXT_HH