]> git.donarmstrong.com Git - lilypond.git/blob - tex.hh
04090aa51063a47480a637d2a1d1d9004d77f007
[lilypond.git] / tex.hh
1 #ifndef TEX_HH
2 #define TEX_HH
3 #include "string.hh"
4 #include "boxes.hh"
5
6 struct Symbol {
7     String tex;
8     Box dim;
9
10     Symbol (String, Box );
11     static const Symbol*find_ball(int);
12     static const Symbol*find_rest(int);
13     static const Symbol*find_bar(String);
14     Symbol() { }
15 };
16
17 /// a symbol with a variable width
18 struct Stretchable_symbol {
19 public:
20
21     /// return a string for a symbol in this width.
22     virtual String operator ()(Real width)=0;
23
24     static const Stretchable_symbol* get_linestaff(int n);
25 };
26
27 /// anything which can be output
28 struct Output {
29     virtual String TeXstring() const=0;
30     /** generate a TeX string, which typesets the symbol. Vertical
31      base position is the "origin" of the staff
32     */
33     virtual Box extent() const=0;
34 };
35 /**
36   any output should (at least) be outputtable for TeX, and have a
37   dimension
38 */
39
40
41 /// an idea
42 struct Text_gob : Output {
43     String text;
44     // fonts, sizes, etc?
45     virtual String TeXstring() const;
46     virtual Box extent() const;
47 };
48
49
50 /// #h# is in points
51 String vstrut(Real h);
52
53
54 #endif