2 paper-def.hh -- declare Paper_def
4 source file of the GNU LilyPond music typesetter
6 (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include "lily-proto.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
33 add support for other len->wid conversions.
35 Input_engraver should be in here.
37 class Paper_def : public Music_output_def
39 Assoc<int, Lookup *> *lookup_p_assoc_p_;
40 static int default_count_i_;
43 VIRTUAL_COPY_CONS(Paper_def,Music_output_def);
46 virtual ~Paper_def ();
47 DECLARE_MY_RUNTIME_TYPEINFO;
49 Array<Interval> shape_int_a_;
51 Real get_var (String) const;
54 void set_lookup (int, Lookup*);
56 Paper_def (Paper_def const&);
57 /// The distance between beams of multiplicity_i
58 Real interbeam_f (int multiplicity_i) const;
60 /// The thickness of a beam
61 Real beam_thickness_f () const;
63 /// The distance between lines
64 Real interline_f () const;
65 /// half the distance between lines
66 Real internote_f () const;
68 /// thickness of the standard line
69 Real rule_thickness () const;
71 /// thickness of the staff line
72 Real staffline_f () const;
74 Interval line_dimensions_int (int) const;
75 Real linewidth_f () const;
77 /// height of the staff
78 Real staffheight_f () const;
80 /// width of a crotchet ball
81 Real note_width () const;
84 Lookup const * lookup_l (int sz) const; // TODO naming
86 /** convert a duration to an idealspacing
87 influence using the geometric_ and paratime_signatures.
89 Real duration_to_dist (Moment, Real) const;
90 Real geometric_spacing (Moment) const;
91 Real arithmetic_constant (Moment minimal_mom) const;
92 Real arithmetic_spacing (Moment mom,Real constant) const;
93 virtual int get_next_default_count () const;
95 void output_settings (Paper_outputter*) const;
96 Paper_outputter* paper_outputter_p (Paper_stream*, Scope*, String) const;
97 Paper_stream* paper_stream_p () const;
98 String base_output_str () const;
101 friend int yyparse (void*);
104 #endif // Paper_def_HH