From 252ac896101e906f2184d538c9bd91046757b4b3 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 5 Oct 1996 14:14:47 +0000 Subject: [PATCH] lilypond-0.0.1 --- symtable.hh | 16 ++++++++++++++++ tex.hh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 symtable.hh create mode 100644 tex.hh diff --git a/symtable.hh b/symtable.hh new file mode 100644 index 0000000000..20cd45022e --- /dev/null +++ b/symtable.hh @@ -0,0 +1,16 @@ +struct Symtable : public Assoc { + +}; + + +struct Symtables : private Assoc { + String fname; + bool done_reading; + Symtables(String s) : fname (s) { + done_reading = false; + } + void read() ; + Symtable* operator()(String s); + +}; + diff --git a/tex.hh b/tex.hh new file mode 100644 index 0000000000..04090aa510 --- /dev/null +++ b/tex.hh @@ -0,0 +1,54 @@ +#ifndef TEX_HH +#define TEX_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; + + static const Stretchable_symbol* get_linestaff(int n); +}; + +/// anything which can be output +struct Output { + virtual String TeXstring() const=0; + /** generate a TeX string, which typesets the symbol. Vertical + base position is the "origin" of the staff + */ + virtual Box extent() const=0; +}; +/** + any output should (at least) be outputtable for TeX, and have a + dimension +*/ + + +/// an idea +struct Text_gob : Output { + String text; + // fonts, sizes, etc? + virtual String TeXstring() const; + virtual Box extent() const; +}; + + +/// #h# is in points +String vstrut(Real h); + + +#endif -- 2.39.5