From: fred Date: Sun, 24 Mar 2002 19:45:09 +0000 (+0000) Subject: lilypond-0.0.67 X-Git-Tag: release/1.5.59~4623 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=510b8910a760e26bf3b2d9134ae1c0be4ccca18b;p=lilypond.git lilypond-0.0.67 --- diff --git a/lib/include/input.hh b/lib/include/input.hh index f87385c428..e68940257c 100644 --- a/lib/include/input.hh +++ b/lib/include/input.hh @@ -10,6 +10,8 @@ #ifndef INPUT_HH #define INPUT_HH +#include "proto.hh" + /** Base class for anything that records its poisition in the parse file. */ diff --git a/lily/atom.cc b/lily/atom.cc new file mode 100644 index 0000000000..0ca9649b35 --- /dev/null +++ b/lily/atom.cc @@ -0,0 +1,52 @@ +/* + atom.cc -- implement Atom + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ +#include "symbol.hh" +#include "tex.hh" +#include "interval.hh" +#include "dimen.hh" +#include "string.hh" +#include "varray.hh" +#include "debug.hh" + + + +void +Atom::print() const +{ + mtor << "texstring: " < a; + a.push(print_dimen(off.y)); + a.push(print_dimen(off.x)); + a.push(sym.tex); + return substitute_args(s, a); +} diff --git a/lily/include/atom.hh b/lily/include/atom.hh new file mode 100644 index 0000000000..5e9f2601ff --- /dev/null +++ b/lily/include/atom.hh @@ -0,0 +1,17 @@ +/* + atom.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef ATOM_HH +#define ATOM_HH + +#include "symbol.hh" +#error + + +#endif // ATOM_HH diff --git a/lily/include/symbol.hh b/lily/include/symbol.hh index 6e04d049cf..96fbd7c9b8 100644 --- a/lily/include/symbol.hh +++ b/lily/include/symbol.hh @@ -1,3 +1,11 @@ +/* + symbol.hh -- declare Symbol, Atom + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + #ifndef SYMBOL_HH #define SYMBOL_HH @@ -14,4 +22,24 @@ struct Symbol { String str()const; // for printing. }; + +/// a symbol which can be translated, and freely copied +struct Atom { + Offset off; + Symbol sym; + + /* *************** */ + + void translate(Offset o) { + off += o; + } + + /// how big is #this#? + Box extent() const; + Atom(Symbol s); + + void print() const; + + String TeX_string() const; +}; #endif