]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-def.hh
release: 1.3.24
[lilypond.git] / lily / include / paper-def.hh
1 /*
2   paper-def.hh -- declare Paper_def
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1996, 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef PAPER_DEF_HH
11 #define PAPER_DEF_HH
12 #include "lily-proto.hh"
13 #include "lily-guile.hh"
14 #include "real.hh"
15
16 #include "moment.hh"
17 #include "array.hh"
18 #include "interval.hh"
19 #include "music-output-def.hh"
20
21 /** 
22
23   Symbols, dimensions and constants pertaining to visual output.
24
25   This struct takes care of all kinds of symbols, dimensions and
26   constants. Most of them are related to the point-size of the fonts,
27   so therefore, the lookup table for symbols is also in here.
28
29   TODO: 
30   
31   add support for multiple fontsizes 
32
33   remove all utility funcs 
34   
35
36   add support for other len->wid conversions.
37
38
39   Interesting variables:
40   
41   /// The distance between lines
42   interline
43   
44 */
45 class Paper_def : public Music_output_def 
46 {
47   Hash_table<int, Lookup *> *lookup_p_tab_p_;
48   static int default_count_i_;
49
50 protected:
51   VIRTUAL_COPY_CONS(Music_output_def);
52
53 public:    
54   virtual ~Paper_def ();
55
56   Array<Interval> shape_int_a_;
57   /*
58     JUNKME
59    */
60   Real get_realvar (SCM symbol) const;
61   Real get_var (String id) const;
62
63   
64   void reinit ();
65   Paper_def ();
66   void set_lookup (int, Lookup*);
67
68   Paper_def (Paper_def const&);
69   /** The distance between beams of multiplicity_i
70       JUNKME
71   */
72   Real interbeam_f (int multiplicity_i) const;
73
74   Interval line_dimensions_int (int) const;
75
76   void print () const;
77
78   Lookup const * lookup_l (int sz) const;       // TODO naming
79
80
81   virtual int get_next_default_count () const;
82   static void reset_default_count();
83
84   void output_settings (Paper_outputter*) const;
85
86   Paper_stream* paper_stream_p () const;
87   String base_output_str () const;
88
89   // urg
90   friend int yyparse (void*);
91 };
92
93 #endif // Paper_def_HH