2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1996--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/>.
23 #include "grob-info.hh"
24 #include "translator.hh"
27 a struct which processes events, and creates the #Grob#s.
28 It may use derived classes.
30 class Engraver
: public Translator
32 Grob
*internal_make_grob (SCM sym
, SCM cause
, char const *name
,
33 char const *f
, int l
, char const *fun
);
34 friend SCM
ly_engraver_make_grob (SCM
, SCM
, SCM
);
35 friend class Engraver_group
;
38 take note of item/spanner
39 put item in spanner. Adjust local key; etc.
41 Default: ignore the info
43 virtual void acknowledge_grob (Grob_info
) {}
44 virtual void announce_grob (Grob_info
);
45 virtual void announce_end_grob (Grob_info
);
46 Engraver_group
*get_daddy_engraver () const;
50 Announce element. Default: pass on to daddy. Utility
52 void announce_grob (Grob
*, SCM cause
);
53 void announce_end_grob (Grob
*, SCM cause
);
55 Item
*internal_make_item (SCM sym
, SCM cause
, char const *name
,
56 char const *f
, int l
, char const *fun
);
57 Spanner
*internal_make_spanner (SCM sym
, SCM cause
, char const *name
,
58 char const *f
, int l
, char const *fun
);
59 Paper_column
*internal_make_column (SCM sym
, char const *name
,
60 char const *f
, int l
, char const *fun
);
65 TRANSLATOR_DECLARATIONS (Engraver
);
68 #define make_item(x, cause) internal_make_item (ly_symbol2scm (x), cause, x, __FILE__, __LINE__, __FUNCTION__)
69 #define make_spanner(x, cause) internal_make_spanner (ly_symbol2scm (x), cause, x, __FILE__, __LINE__, __FUNCTION__)
70 #define make_paper_column(x) internal_make_column (ly_symbol2scm (x), x, __FILE__, __LINE__, __FUNCTION__)
72 Engraver
* unsmob_engraver (SCM eng
);
73 bool ly_is_grob_cause (SCM obj
);