summaryrefslogtreecommitdiff
path: root/symbol.hh
blob: 464a4237428c8fd87c73e9fe789e9c4cc70e9c14 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef SYMBOL_HH
#define SYMBOL_HH
#include "string.hh"
#include "boxes.hh"
struct Symbol {
    String tex;
    Box dim;

    Symbol (String, Box );
    static const Symbol*find_ball(int);
    static const Symbol*find_rest(int);
    static const Symbol*find_bar(String);
    Symbol() ;
};

/// a symbol with a variable width
struct Stretchable_symbol {
public:

    /// return a string for a symbol in this width.
    virtual String operator ()(Real width)=0;
    virtual Interval height(Real width) const =0;
    static const Stretchable_symbol* get_linestaff(int n);
};

#endif