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_;
44 virtual ~Paper_def ();
45 DECLARE_MY_RUNTIME_TYPEINFO;
46 VIRTUAL_COPY_CONS (Paper_def,Music_output_def);
48 Array<Interval> shape_int_a_;
50 Real get_var (String) const;
53 void set_lookup (int, Lookup*);
55 Paper_def (Paper_def const&);
56 /// The distance between beams of multiplicity_i
57 Real interbeam_f (int multiplicity_i) const;
59 /// The thickness of a beam
60 Real beam_thickness_f () const;
62 /// The distance between lines
63 Real interline_f () const;
64 /// half the distance between lines
65 Real internote_f () const;
67 /// thickness of the standard line
68 Real rule_thickness () const;
70 /// thickness of the staff line
71 Real staffline_f () const;
73 Interval line_dimensions_int (int) const;
74 Real linewidth_f () const;
76 /// height of the staff
77 Real staffheight_f () const;
79 /// width of a crotchet ball
80 Real note_width () const;
83 Lookup const * lookup_l (int sz) const; // TODO naming
85 virtual Paper_def* paper_l ();
86 virtual String dimension_str (Real r) const;
87 virtual Lookup* lookup_p (Lookup const&) const;
88 virtual Lookup* lookup_p (Symtables const&) const;
89 virtual String unknown_str () const;
91 /** convert a duration to an idealspacing
92 influence using the geometric_ and paratime_signatures.
94 Real duration_to_dist (Moment, Real) const;
95 Real geometric_spacing (Moment) const;
96 Real arithmetic_constant (Moment minimal_mom) const;
97 Real arithmetic_spacing (Moment mom,Real constant) const;
98 virtual int get_next_default_count () const;
99 virtual String output_settings_str () const;
101 friend int yyparse (void*);
104 #endif // PAPER_DEF_HH