From: fred Date: Tue, 5 Nov 1996 20:33:11 +0000 (+0000) Subject: lilypond-0.0.8 X-Git-Tag: release/1.5.59~6882 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=805f9b44ddadc43d5facd467b7821e12551ff312;p=lilypond.git lilypond-0.0.8 --- diff --git a/CodingStyle b/CodingStyle deleted file mode 100644 index c5d730c0a6..0000000000 --- a/CodingStyle +++ /dev/null @@ -1,55 +0,0 @@ -CODING STANDARDS: - -Functions and methods do not return errorcodes, but use assert for -checking status. - -INDENTATION, in emacs: - - -(add-hook 'c-mode-hook - '(lambda ()(setq c-basic-offset 4))) - - -(add-hook 'c++-mode-hook - '(lambda() (c-set-style "Stroustrup") - ) - ) - - -CLASSES and TYPES: - - This_is_a_class - -DATA MEMBERS - - Class:member - -if the member's name resembles its type, then we use - - Class Fubular { ..} - - Class::fubular_ - -COMMENTS - -/// short description -class Class { - /// - Data data_member_; - /** - .. - */ - - /****************/ - - /// short memo - member(); - /** - long doco of member() - */ -}; -/** - Class documentation. -*/ - -Unfortunately most of the code isn't really documented that good. \ No newline at end of file diff --git a/README b/README index 41c366eec3..fd1c616b3a 100644 --- a/README +++ b/README @@ -56,5 +56,12 @@ stacktrace of the crash. HOW DOES IT WORK -Use The Source, Luke. If you don't know C++, you can try editing +* Use The Source, Luke. If you don't know C++, you can try editing .dstreamrc for copious debugging output. + +* see also the subdir Documentation + +* The source is commented in the DOC++ style. +Check out doc++ at + + http://www.ZIB-Berlin.DE/VisPar/doc++/doc++.html diff --git a/TODO b/TODO deleted file mode 100644 index 1f96a09b76..0000000000 --- a/TODO +++ /dev/null @@ -1,13 +0,0 @@ - * clefs - - * beam - - * fonttables -> fontdims - - * clear IDENTIFIERs - - * Paperdef -> fontsize . - - * merge Paper, Lookup, Outputfile, and Symtable. - - * all places in the code marked TODO! and ugh/ARGH diff --git a/item.hh b/item.hh index cf3d11c313..b450ab59ea 100644 --- a/item.hh +++ b/item.hh @@ -4,8 +4,6 @@ #include "glob.hh" #include "boxes.hh" #include "string.hh" -#include "tex.hh" - /// a horizontally fixed size element of the score struct Item { @@ -17,7 +15,17 @@ struct Item { */ /****************/ + + /// do calculations after determining horizontal spacing + virtual void postprocess(); + /// do calculations before determining horizontal spacing + virtual void preprocess(); + /** + This is executed directly after the item is added to the + PScore + */ + virtual Interval width() const; virtual Interval height() const; String TeXstring () const ; @@ -25,7 +33,12 @@ struct Item { void print()const; virtual ~Item(); }; -/** An item must be part of a Column +/** Item is the datastructure for printables whose width is known + before the spacing is calculated + + NB. This doesn't mean an Item has to initialize the output field before + spacing calculation. + */ diff --git a/notehead.hh b/notehead.hh new file mode 100644 index 0000000000..b694e95af8 --- /dev/null +++ b/notehead.hh @@ -0,0 +1,38 @@ +/* + notehead.hh -- part of LilyPond + + (c) 1996 Han-Wen Nienhuys +*/ + +#ifndef NOTEHEAD_HH +#define NOTEHEAD_HH +#include "item.hh" + +/// ball at the end of the stem +struct Notehead : public Item +{ + int position; + int staff_size; + int dots; + int balltype; + + /****************/ + void preprocess(); + + Notehead(int staff_size); + /** + position of top line (5 linestaff: 8) + */ + void print()const; +private: + void brew_molecole(); +}; +/** + takes care of: + + * help lines + * proper placing of dots + + */ +#endif // NOTEHEAD_HH + diff --git a/stem.hh b/stem.hh index 039bc5182c..acbebe0d92 100644 --- a/stem.hh +++ b/stem.hh @@ -8,6 +8,7 @@ #define STEM_HH #include "item.hh" +/// the rule attached to the ball struct Stem : public Item { // heads the stem encompasses (positions) int minnote, maxnote; @@ -20,12 +21,24 @@ struct Stem : public Item { // flagtype? 4 none, 8 8th flag, 0 = beam. int flag; - /****************/ - void brew_molecole(); - void calculate(); + + void postprocess(); Stem(int center); void print() const; - Interval width() const; + Interval width() const; +private: + void calculate(); + void brew_molecole(); }; +/** + takes care of: + + \begin{itemize} + \item the rule + \item the flag + \item up/down position. + \end{itemize} + */ + #endif diff --git a/tex.hh b/tex.hh index 2f60630fd5..546797a7c1 100644 --- a/tex.hh +++ b/tex.hh @@ -4,6 +4,7 @@ #include "string.hh" #include "boxes.hh" +/// parameter substitution in TeXstrings String substitute_args(String source, svec args); /**