source file of the GNU LilyPond music typesetter
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-
-#ifndef SCORE_GRAV_HH
-#define SCORE_GRAV_HH
+#ifndef SCORE_ENGRAVER_HH
+#define SCORE_ENGRAVER_HH
#include "engraver-group.hh"
-#include "global-translator.hh"
-/**
- Top level engraver. Puts elements into appropriate columns.
- */
-class Score_engraver :
- public Engraver_group_engraver, public Global_translator
+class Score_engraver : public Engraver_group
{
- Line_of_score * scoreline_l_;
- int break_penalty_i_;
- int breaks_i_;
-
- Link_array<Score_element> elem_p_arr_;
-
- Score_column* command_column_l_;
- Score_column* musical_column_l_;
-
- void set_columns (Score_column*,Score_column*);
- void typeset_all();
-
-public:
- TRANSLATOR_CLONE(Score_engraver);
- Paper_score * pscore_p_;
- DECLARE_MY_RUNTIME_TYPEINFO;
-
- Score_engraver();
- virtual Music_output *get_output_p ();
-protected:
- virtual void prepare (Moment);
- virtual void finish();
- virtual void process();
- virtual int depth_i() const { return Global_translator::depth_i ();}
+ System *system_;
+
+ vector<Grob*> elems_;
+ Paper_score *pscore_;
+
+ void typeset_all ();
protected:
+ DECLARE_LISTENER (finish);
+ DECLARE_LISTENER (prepare);
+ DECLARE_LISTENER (one_time_step);
+
/* Engraver_group_engraver interface */
- virtual Staff_info get_staff_info() const;
- virtual bool do_try_request (Request*);
- virtual void do_creation_processing();
- virtual void do_removal_processing();
- virtual void announce_element (Score_element_info);
- virtual void do_announces();
- virtual void typeset_element (Score_element*elem_p);
- virtual void typeset_element (Graphical_lisp_element*elem_p);
- virtual void do_pre_move_processing();
- virtual void do_add_processing ();
+ virtual void connect_to_context (Context *);
+ virtual void disconnect_from_context ();
+ virtual void initialize ();
+ virtual void finalize ();
+ virtual void announce_grob (Grob_info);
+ void stop_translation_timestep ();
+
+ /*
+ Translator interface
+ */
+ virtual void derived_mark () const;
+
+public:
+ Score_engraver ();
};
-#endif // SCORE_GRAV_HH
+#endif /* SCORE_ENGRAVER_HH */