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

« back to all changes in this revision

Viewing changes to lily/include/output-def.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:
 
1
/*
 
2
  music-output-def.hh -- declare Output_def
 
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 MUSIC_OUTPUT_DEF_HH
 
10
#define MUSIC_OUTPUT_DEF_HH
 
11
 
 
12
#include "std-string.hh"
 
13
#include "lily-proto.hh"
 
14
#include "virtual-methods.hh"
 
15
#include "smobs.hh"
 
16
#include "input.hh"
 
17
 
 
18
/*
 
19
  Output settings for a block of music.
 
20
 
 
21
  This devolved into a rather empty class. The distinction between
 
22
  various instances is made in the parser, which creates
 
23
  midi/layout/paper blocks depending on the keyword read.
 
24
 
 
25
  The data structure is set up as recursive: the definitions not
 
26
  supplied in layout are looked up in paper. This is done through
 
27
  the parent_ field of Output_def. However, such nesting is limited to
 
28
  two levels,
 
29
 
 
30
  * first because the parser hard-codes the different types
 
31
  of output block.
 
32
 
 
33
  * Second, because the prime benefit of multiple levels
 
34
  (eg. paper containing layout for a score, containing layout of a
 
35
  \score embedded in \markup) requires scaling the Stencils (eg. the
 
36
  one coming from score at markup level)
 
37
  
 
38
 */
 
39
class Output_def   
 
40
{
 
41
 
 
42
public:
 
43
  VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
 
44
  DECLARE_SMOBS (Output_def, );
 
45
public:
 
46
  SCM scope_;
 
47
  Output_def *parent_;
 
48
  
 
49
  Input input_origin_;
 
50
  string user_key_;
 
51
 
 
52
  Lily_parser *parser_;
 
53
  Lily_parser *get_parser () const;
 
54
  
 
55
  Output_def (Output_def const&);
 
56
  Output_def ();
 
57
 
 
58
  /*
 
59
    variables.
 
60
   */
 
61
  SCM c_variable (string id) const;
 
62
  SCM lookup_variable (SCM sym) const;
 
63
  void set_variable (SCM sym, SCM val);
 
64
  Real get_dimension (SCM symbol) const;
 
65
};
 
66
SCM get_font_table (Output_def *def);
 
67
void assign_context_def (Output_def *m, SCM transdef);
 
68
SCM find_context_def (Output_def const *m, SCM name);
 
69
 
 
70
int get_tempo (Output_def*def, Moment moment);
 
71
void set_tempo (Output_def*def, Moment moment, int count_per_minute_i);
 
72
 
 
73
Interval line_dimensions_int (Output_def*def, int);
 
74
 
 
75
 
 
76
Font_metric *select_encoded_font (Output_def *layout, SCM chain);
 
77
Font_metric *select_font (Output_def *layout, SCM chain);
 
78
 
 
79
DECLARE_UNSMOB (Output_def, output_def);
 
80
 
 
81
 
 
82
Font_metric* find_pango_font (Output_def *layout,  SCM descr, Real factor);
 
83
Font_metric *find_scaled_font (Output_def *od, Font_metric *f, Real magnification);
 
84
Output_def *scale_output_def (Output_def *def, Real scale);
 
85
 
 
86
Real output_scale (Output_def*);
 
87
 
 
88
#endif /* MUSIC_OUTPUT_DEF_HH */