~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/include/engraver.hh

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
  source file of the GNU LilyPond music typesetter
5
5
 
6
 
  (c) 1996--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
6
  (c) 1996--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
7
*/
8
8
 
9
 
 
10
9
#ifndef ENGRAVER_HH
11
10
#define ENGRAVER_HH
12
11
 
13
 
#include "lily-proto.hh"
14
 
#include "array.hh"
15
 
#include "event.hh"
 
12
#include "music.hh"
16
13
#include "grob-info.hh"
17
14
#include "translator.hh"
18
15
 
19
 
 
20
16
/**
21
 
  a struct which processes events, and creates the #Grob#s.
22
 
  It may use derived classes. 
23
 
  */
24
 
class Engraver : public virtual Translator {
25
 
    
26
 
  friend class Engraver_group_engraver;
 
17
   a struct which processes events, and creates the #Grob#s.
 
18
   It may use derived classes.
 
19
*/
 
20
class Engraver : public Translator
 
21
{
 
22
 
 
23
  friend class Engraver_group;
27
24
protected:
28
25
  /*
29
 
    Call this when you're finished with ELEM_P.
30
 
   */
31
 
  virtual void typeset_grob (Grob*elem);
32
 
  /*
33
26
    take note of item/spanner
34
27
    put item in spanner. Adjust local key; etc.
35
28
 
36
29
    Default: ignore the info
37
 
    */
 
30
  */
38
31
  virtual void acknowledge_grob (Grob_info) {}
39
 
 
40
 
  /** Do things with stuff found in acknowledge_grob. Ugh. Should
41
 
     be looped with acknowledge_grob.
42
 
     
43
 
   */
44
 
  virtual void process_acknowledged_grobs () {}
45
 
  /**
46
 
    Announce element. Default: pass on to daddy. Utility
47
 
    */
48
 
  virtual void announce_grob (Grob*, SCM cause);
49
32
  virtual void announce_grob (Grob_info);
50
 
  Engraver_group_engraver*get_daddy_engraver () const;
 
33
  Engraver_group *get_daddy_engraver () const;
51
34
 
52
35
public:
53
 
  Score_engraver * get_score_engraver () const;
54
 
  /**
55
 
    override other ctor
56
 
   */
57
 
  TRANSLATOR_DECLARATIONS(Engraver);
 
36
  /**
 
37
     Announce element. Default: pass on to daddy. Utility
 
38
  */
 
39
  void announce_grob (Grob *, SCM cause);
 
40
 
 
41
  Score_engraver *get_score_engraver () const;
 
42
  /**
 
43
     override other ctor
 
44
  */
 
45
  TRANSLATOR_DECLARATIONS (Engraver);
58
46
};
59
47
 
60
 
#define make_item(x) make_item_from_properties (daddy_context_, ly_symbol2scm (x))
61
 
#define make_spanner(x) make_spanner_from_properties (daddy_context_, ly_symbol2scm (x))
62
 
Item* make_item_from_properties (Context * tg, SCM x);
63
 
Spanner* make_spanner_from_properties (Context * tg, SCM x);
64
 
 
65
 
 
66
 
 
 
48
#define make_item(x, cause) make_item_from_properties (this, ly_symbol2scm (x), cause, x)
 
49
#define make_spanner(x, cause) make_spanner_from_properties (this, ly_symbol2scm (x), cause, x)
 
50
#define make_paper_column(x) make_paper_column_from_properties (this, ly_symbol2scm (x), x)
 
51
Grob *make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, char const *name);
 
52
Item *make_item_from_properties (Engraver *tg, SCM x, SCM cause, char const *name);
 
53
Spanner *make_spanner_from_properties (Engraver *tg, SCM x, SCM cause, char const *name);
 
54
Paper_column *make_paper_column_from_properties (Engraver *tg, SCM x, char const *name);
67
55
 
68
56
#endif // ENGRAVER_HH