2 paper-def.hh -- declare Paper_def
4 source file of the GNU LilyPond music typesetter
6 (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include "lily-proto.hh"
13 #include "lily-guile.hh"
18 #include "interval.hh"
19 #include "music-output-def.hh"
23 Symbols, dimensions and constants pertaining to visual output.
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.
31 add support for multiple fontsizes
36 add support for other len->wid conversions.
38 Input_engraver should be in here.
41 Interesting variables:
43 /// The distance between lines
47 class Paper_def : public Music_output_def
49 Hash_table<int, Lookup *> *lookup_p_tab_p_;
50 static int default_count_i_;
53 VIRTUAL_COPY_CONS(Music_output_def);
56 virtual ~Paper_def ();
59 Array<Interval> shape_int_a_;
60 Real get_realvar (SCM symbol) const;
61 Real get_var (String id) const;
63 SCM get_scm_var (SCM sym) const;
67 void set_lookup (int, Lookup*);
69 Paper_def (Paper_def const&);
70 /// The distance between beams of multiplicity_i
71 Real interbeam_f (int multiplicity_i) const;
73 /// The thickness of a beam
74 Real beam_thickness_f () const;
76 /// thickness of the standard line
77 Real rule_thickness () const;
79 /// thickness of the staff line
80 Real staffline_f () const;
82 Interval line_dimensions_int (int) const;
83 Real linewidth_f () const;
85 /// height of the staff
86 Real staffheight_f () const;
88 /// width of a crotchet ball
89 Real note_width () const;
92 Lookup const * lookup_l (int sz) const; // TODO naming
94 /** convert a duration to an idealspacing
95 influence using the geometric_ and paratime_signatures.
97 Real length_mom_to_dist (Moment, Real) const;
98 Real geometric_spacing (Moment) const;
99 Real arithmetic_constant (Moment minimal_mom) const;
100 Real arithmetic_spacing (Moment mom,Real constant) const;
101 virtual int get_next_default_count () const;
102 static void reset_default_count();
104 void output_settings (Paper_outputter*) const;
105 Paper_outputter* paper_outputter_p (Paper_stream*, Scope*, String) const;
106 Paper_stream* paper_stream_p () const;
107 String base_output_str () const;
110 friend int yyparse (void*);
113 #endif // Paper_def_HH