lilypond-0.0.2
[lilypond.git] / tex.hh
blob04090aa51063a47480a637d2a1d1d9004d77f007
1 #ifndef TEX_HH
2 #define TEX_HH
3 #include "string.hh"
4 #include "boxes.hh"
6 struct Symbol {
7 String tex;
8 Box dim;
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() { }
17 /// a symbol with a variable width
18 struct Stretchable_symbol {
19 public:
21 /// return a string for a symbol in this width.
22 virtual String operator ()(Real width)=0;
24 static const Stretchable_symbol* get_linestaff(int n);
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
33 virtual Box extent() const=0;
35 /**
36 any output should (at least) be outputtable for TeX, and have a
37 dimension
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;
50 /// #h# is in points
51 String vstrut(Real h);
54 #endif