From d36e8ced83cfeabcf4ec3840ffe93a717a17ac4d Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 6 Apr 1999 10:26:06 +0200 Subject: [PATCH] release: 1.1.38 --- AUTHORS.txt | 2 +- Documentation/topdocs/AUTHORS.yo | 2 +- NEWS | 63 ++++++----- TODO | 52 ++++----- VERSION | 4 +- flower/include/axes.hh | 2 - flower/offset.cc | 14 ++- input/test/script-column.fly | 3 + lily/afm-reader.cc | 7 +- lily/collision.cc | 17 +-- lily/dynamic-engraver.cc | 3 + lily/g-script-column-engraver.cc | 93 ++++++++++++++++ lily/g-script-column.cc | 76 +++++++++++++ lily/g-script.cc | 8 +- lily/g-staff-side.cc | 30 +++++ lily/g-text-item.cc | 8 +- lily/general-script-def.cc | 74 ------------- lily/include/g-script-column.hh | 30 +++++ lily/include/g-script.hh | 1 + lily/include/g-staff-side.hh | 7 +- lily/include/g-text-item.hh | 1 + lily/include/general-script-def.hh | 40 ------- lily/include/lookup.hh.orig | 61 ----------- lily/include/musical-request.hh | 6 +- lily/include/note-column.hh | 11 +- lily/include/rhythmic-column-engraver.hh | 1 - lily/include/score-element.hh | 12 +- lily/include/script-column.hh | 33 ------ lily/include/script-def.hh | 55 ---------- lily/include/script.hh | 43 -------- lily/include/stem.hh | 3 +- lily/mark-engraver.cc | 1 + lily/multi-measure-rest.cc | 2 - lily/musical-request.cc | 7 ++ lily/my-lily-parser.cc | 14 --- lily/note-column.cc | 48 +++----- lily/parser.yy | 116 +++++++++++--------- lily/request.cc | 1 + lily/rest-collision.cc | 9 +- lily/rhythmic-column-engraver.cc | 22 +--- lily/script-column.cc | 119 -------------------- lily/script.cc | 134 ----------------------- lily/slur.cc | 2 +- lily/stem.cc | 11 +- lily/super-element.cc | 8 +- lily/text-engraver.cc | 3 + lily/tuplet-spanner.cc | 2 +- ly/declarations.ly | 4 +- ly/engraver.ly | 2 +- make/out/lelievijver.lsm | 8 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- mutopia/gallina.ly | 2 +- scm/lily.scm | 3 +- scm/script.scm | 6 +- scripts/ly2dvi.py | 4 +- 56 files changed, 496 insertions(+), 806 deletions(-) create mode 100644 input/test/script-column.fly create mode 100644 lily/g-script-column-engraver.cc create mode 100644 lily/g-script-column.cc delete mode 100644 lily/general-script-def.cc create mode 100644 lily/include/g-script-column.hh delete mode 100644 lily/include/general-script-def.hh delete mode 100644 lily/include/lookup.hh.orig delete mode 100644 lily/include/script-column.hh delete mode 100644 lily/include/script-def.hh delete mode 100644 lily/include/script.hh delete mode 100644 lily/script-column.cc delete mode 100644 lily/script.cc diff --git a/AUTHORS.txt b/AUTHORS.txt index 5ff726d465..bfbc050244 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -24,7 +24,7 @@ o Anthony Fok , debian package: debian/* o Neil Jerram . parts of Documenta- tion/Vocab* -o Donald Ervin Knuth, http://www.cs-staff.stan- +o Donald Ervin Knuth, http://www-cs-staff.stan- ford.edu/~knuth/ mf/ital-*.mf (these were taken from the CM fonts) diff --git a/Documentation/topdocs/AUTHORS.yo b/Documentation/topdocs/AUTHORS.yo index ddac996a69..2822ed5b91 100644 --- a/Documentation/topdocs/AUTHORS.yo +++ b/Documentation/topdocs/AUTHORS.yo @@ -18,7 +18,7 @@ it()nemail(Anthony Fok)(foka@debian.org), debian package: debian/* it()nemail(Neil Jerram)(nj104@cus.cam.ac.uk). parts of Documentation/Vocab* -it()Donald Ervin Knuth, lurl(http://www.cs-staff.stanford.edu/~knuth/) +it()Donald Ervin Knuth, lurl(http://www-cs-staff.stanford.edu/~knuth/) mf/ital-*.mf (these were taken from the CM fonts) it()nemail(Werner Lemberg)(xlwy01@uxp1.hrz.uni-dortmund.de), misc bugfixes, some Beam and Stem code. diff --git a/NEWS b/NEWS index c3ac0d70c3..00ccefc193 100644 --- a/NEWS +++ b/NEWS @@ -1,39 +1,45 @@ ---- ../lilypond-1.1.37.mb1/NEWS Wed Mar 31 22:12:22 1999 -++ b/NEWS Mon Apr 5 22:54:57 1999 -@@ -1,3 +1,9 @@ +pl 37.script2 + - bf: AFM for BlueSky AFM files. + - \penalty = 4278 -> \penalty 4278 + - URG!! fixed major (unnoticed) bug in dependency engine + - Further Script hacking: + * G_script_column + * G_script_column_engraver + + pl 37.script1 + - major Script rehack: + * G_stem_staff_side_item + * G_script + * G_script_engraver + * G_script_req + - junked Text_def, changed \property textstyle -> \property textStyle +(todo -> convert-mudela) + - Line_of_score is an Axis_group_element, no more overlapping +lines, hopefully. + - mf: whole diamond head tweak + pl 37.mb2 - Added property clefStyle: "" / "transparent" / "fullSizeChanges" - New example: input/test/incipit.ly - Documented clefStyle and restStyle in refman.tex - Partial bug fix: octaviated clefs. Still broken!!! - pl 37.mb1 - - Added property restStyle. - - mensural 4th, 8th and 16th rests.--- ../lilypond-1.1.37/NEWS Wed Mar 31 21:50:35 1999 -++ b/NEWS Sun Apr 4 00:42:55 1999 -@@ -1,4 +1,13 @@ -pl 37.script1 - - major Script rehack. - - junked Text_def, changed \property textstyle -> \property textStyle -(todo -> convert-mudela) - - Line_of_score is an Axis_group_element, no more overlapping -lines, hopefully. - - mf: whole diamond head tweak -***** -pl 37 (march 30, 1999) - - diamond heads (probably really ugly). - - cross head. - - tweaked harmonic head a bit.pl 37.mb1 +pl 37.mb1 - Added property restStyle. - - mensural 4th, 8th and 16th rests. + - mensural 4th, 8th and 16th rests. +pl 37.uu1 + - FreeBSD bf -************* - - - diamond heads (probably really ugly). - - cross head. - - tweaked harmonic head a bit. - - property noteHeadStyle +**** +pl 37 (march 30, 1999) + - note head styles, see input/test/noteheadstyle.fly + * \property noteHeadStyle: + * diamond note heads (probably really ugly) + * cross note head. + * harmonic head (mf sources were tweaked) + * transparent for no \heads + * \property noteHeadStyle ="" for normal heads. pl 36.mb2 - bf: timeSignatureStyle @@ -44,11 +50,12 @@ pl 36.hwn1 - debian fixes. - don't insert extra alignment space for empty stuff. - Align_element derives from Axis_group_element + - junk cruft for detecting upbeam / downbeam. - junk all *{horizontal,vertical}* Score_element derived classes. - G_staff_side_item::padding_f_ now generic property. - some tweaking of beam & stem. - junk pointerlist in Sources - - junk Stem::mult_i_, Stem::beam_gap_i_, G_staff_side_item::padding + - junk Stem::mult_i_, Stem::beam_gap_i_, G_staff_side_item::padding, Bar::at_line_start_b_, Key_item::c_position_, Note_head::type_str_, Note_head::staff_size, Stem::xdir_ diff --git a/TODO b/TODO index d87dbf09f7..a29d36efb1 100644 --- a/TODO +++ b/TODO @@ -17,7 +17,6 @@ Grep for TODO and ugh/ugr/urg. > with the note "a4" there will be a black note at the ledger line where > "c" would be too. However, only the "a4" will have the extra blob. . * ps/lily.ps -. * AFM for BlueSky AFM files. . * devise standard for functioning of Vertical_align_element. . * fix interstaff slurs & beams. . * staff size for post/prebreaks @@ -27,9 +26,7 @@ Grep for TODO and ugh/ugr/urg. . * mutopia/J.S.Bach/wtk1-fugue2.ly . * input/test/grace . * fix: text on rests: ridiculous dims -. * \score { \notes { c8 c8 c8 c c c } -\paper { \translator { \VoiceContext \remove "Auto_beam_engraver";}} -} +. * clefs.ly . * m=\notes\relative c'''{ \time 2/4; @@ -73,6 +70,7 @@ otherwise 2). say preMudelaExample[eps]{}, and change it in document body someti . * latex bla.tex broken (titles / \lilyfooter stuff? . * fix dynamics decently, ie. use kerning & ligatures. . * support_l_arr_ empty in staff-margin's G_staff_side_item +. * slurs colllide with lyrics. . * minVerticalAlign for StaffGroups. . * fix OrchestralScore and Hara-kiri (i.e., fix Coriolan) . * Phrasing: Indicating the textual underlay of a piece, or @@ -81,6 +79,18 @@ otherwise dividing a piece into phrases. There are distinct ways of specifying the first two (although at present, they're not properly distinguished) but no distinct way to specify the third. Should there be? +. * spacing of mmrests. + +.* Cleanups needed +. * Beam +. * Stem + Notehead +. * Slur +. * Repeats +. * Rhythmic_grouping +. * Duration +. * Spring generation +. * Collision +. * Rest_collision .* TODO before 1.2 . * \selectmusic to cut pieces from music. @@ -129,8 +139,6 @@ compilation. . * fix Repeated_music design . * one big ly2dvi input that includes *all* tests. . * store req -> element, element -> element causes for warnings -. * use G_text_item in stead. -. * junk Script_def . * include examples in RPM. . * fix partial measures in meaningful way. . * add scripts to bars eg. |^"bla" @@ -204,7 +212,7 @@ length? . * uniformise property names... . * ydirection <-> yDirection . * rather allow '_' in identifiers first (i.e. junk ^ and _), - and do y_direction? +and do y_direction? . * typo checks on property names? . * use streambufs and iostream to provide IO handling for TeX stream, mudela stream, data-file. @@ -260,9 +268,7 @@ gs: Operand stack: . * abbrev -> tremolo . * abbreviation-beam -> (measured/unmeasured) tremolo . * partial -> anacrouse -. * shared lib . * robustify Beam (in case of no stems, 32nd notes) -. * decentralised spring factory . * move paper vars into engraver properties . * check for groff / troff/ nroff et . * more intelligent file searching @@ -270,17 +276,6 @@ gs: Operand stack: . * handle ^C for tmp/file creation. . * make LilyPond RPM fully relocatable . * dots & rest collisions. -. * documentation -. * remove links to non-free SW. -. * internal documentation -. * a general paper. -. * \properties -. * left/rightbeamcount -. * various other new properties. -. * introduction? -. * info? -. * LaTeX? -. * more manpages? . * the warning about the negative slur/tie length appears twice which is irritating. . * better hshift (dots, distance, head dependent) @@ -404,7 +399,6 @@ touching it. . * slurs . * accents . * dynamics - > Would it be hard to add support for proper dynamics in MIDI output? I > would really like to have this feature... @@ -493,13 +487,19 @@ hesitate to ask. . * PS lines to .eps files . * write custom prolog -. * NIFF ? -. * Common Music Notation -. * PostScript output (esp. Beams, Slurs, etc) -. * Move all Score_elems, into libmutype.a -. * SGML +. * SGML input . * Documentation +. * remove links to non-free SW. +. * internal documentation +. * a general paper. +. * \properties +. * left/rightbeamcount +. * various other new properties. +. * introduction? +. * info? +. * LaTeX? +. * more manpages? . * Doc (C) stuff of sheet music . * a better format? SGML? TeX? Info? . * a better tutorial diff --git a/VERSION b/VERSION index 83b317ad9b..1d49b60ae6 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 -PATCH_LEVEL=37 -MY_PATCH_LEVEL=mb2 +PATCH_LEVEL=38 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/include/axes.hh b/flower/include/axes.hh index dfacac28a1..b67eb47766 100644 --- a/flower/include/axes.hh +++ b/flower/include/axes.hh @@ -16,13 +16,11 @@ enum Axis { NO_AXES=2, }; -#ifndef STANDALONE #include "string.hh" // ugh String axis_name_str (Axis); -#endif // STANDALONE /** the operator ++ for Axis. diff --git a/flower/offset.cc b/flower/offset.cc index 916640e692..258cc1782c 100644 --- a/flower/offset.cc +++ b/flower/offset.cc @@ -24,15 +24,25 @@ Offset::str () const } #endif + +/* + free bsd fix by John Galbraith + */ + Offset complex_multiply (Offset z1, Offset z2) { Offset z; - z[X_AXIS] = z1[X_AXIS] * z2[X_AXIS] - z1[Y_AXIS]*z2[Y_AXIS]; - z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS]; + if(!isinf(z2[Y_AXIS])) + { + z[X_AXIS] = z1[X_AXIS] * z2[X_AXIS] - z1[Y_AXIS]*z2[Y_AXIS]; + z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS]; + } return z; } + + Offset complex_exp (Offset o) { diff --git a/input/test/script-column.fly b/input/test/script-column.fly new file mode 100644 index 0000000000..381c5fbcfd --- /dev/null +++ b/input/test/script-column.fly @@ -0,0 +1,3 @@ +%c''4^|^.^"foo"^"klap" +c''4^|^.^"foo"^"klap"^"puk"^\fermata^\stopped +c4_|_._"foo"_"klap"_"puk"_\fermata_\stopped diff --git a/lily/afm-reader.cc b/lily/afm-reader.cc index 5a606bd28d..7663aab22b 100644 --- a/lily/afm-reader.cc +++ b/lily/afm-reader.cc @@ -47,6 +47,8 @@ read_char_metric (String s, int size) String c = strip_leading_white (a[i]); Array b = String_convert::split_arr (c, ' '); + if (!b.size ()) + continue; if (b[0] == "C") char_metric.C_ = b[1].value_i (); else if (b[0] == "WX") @@ -71,7 +73,10 @@ Adobe_font_metric::read_char_metrics (Data_file &input, int size) Adobe_font_char_metric afm_char =read_char_metric (s, size); char_metrics_.push (afm_char); int i = char_metrics_.size ()-1; - ascii_to_metric_idx_ [afm_char.C_] = i; + + // TFM files uses neg. charcodes to store Space + if (afm_char.C_ >= 0) + ascii_to_metric_idx_ [afm_char.C_] = i; name_to_metric_dict_ [afm_char.N_] = i; } } diff --git a/lily/collision.cc b/lily/collision.cc index 706301aad1..56676c1d99 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -19,7 +19,6 @@ Collision::Collision() void Collision::add_column (Note_column* ncol_l) { - // ugh. Fixme. clash_l_arr_.push (ncol_l); add_element (ncol_l); add_dependency (ncol_l); @@ -33,7 +32,7 @@ int idx (int dir, bool h_shift_b) assert (abs (dir) == 1); int j = dir > 0 ? 0 : 3; if (h_shift_b) - j += dir; + j += dir; return j; } @@ -49,22 +48,22 @@ void Collision::do_pre_processing() { if (clash_l_arr_.size() <= 1) - return; + return; /* [stem up, stem up shifted, stem down shifted, stem down] - */ + */ Array clash_group_arr_a[4]; for (int i=0; i < clash_l_arr_.size(); i++) { Note_column* c_l = clash_l_arr_[i]; - if (! c_l->dir_) + Direction d = c_l->dir (); + if (!d) { warning (_ ("No stem direction set. Ignoring column in clash.")); continue; } - int d = (c_l->dir_); SCM shift = c_l->remove_elt_property (horizontal_shift_scm_sym); bool shift_b = (shift != SCM_BOOL_F); @@ -130,6 +129,7 @@ Collision::do_pre_processing() x_off[idx (d, true)] = d *1.0 ; } while ((d *= -1) != 1); + if (!middle.empty_b() && middle.length() < 2 && col_l_a[idx (1,0)] && col_l_a[idx (-1,0)]) { // reproduction of bugfix at 3am ? @@ -151,13 +151,8 @@ Collision::do_pre_processing() { if (col_l_a[j]) { - /* collision.cc:138: request for method `translate' is ambiguous - - (shaddup) - */ Offset o (x_off[j] * wid_f, 0); col_l_a[j]->translate (o); - // ((Score_element*)col_l_a[j])->translate (o); } } } diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index f3e72a2df3..e2188d4eb7 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -101,6 +101,9 @@ Dynamic_engraver::do_process_requests() text_p_->style_str_ = prop.length_i () ? prop : "dynamic"; staff_side_p_ = new G_staff_side_item; + staff_side_p_->set_elt_property (script_priority_scm_sym, + gh_int2scm (100)); + staff_side_p_->set_victim (text_p_); staff_side_p_->axis_ = Y_AXIS; diff --git a/lily/g-script-column-engraver.cc b/lily/g-script-column-engraver.cc new file mode 100644 index 0000000000..831f28bc64 --- /dev/null +++ b/lily/g-script-column-engraver.cc @@ -0,0 +1,93 @@ +/* + g-script-column-engraver.cc -- implement G_script_column_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#include "engraver.hh" +#include "g-script-column.hh" +#include "g-staff-side.hh" + +/** + Find potentially colliding scripts, and put them in a + G_script_column, that will fix the collisions. */ +class G_script_column_engraver : public Engraver +{ + G_script_column *scol_p_; + Link_array script_l_arr_; + Link_array staff_side_l_arr_; +public: + G_script_column_engraver (); + VIRTUAL_COPY_CONS(Translator); +protected: + virtual void acknowledge_element (Score_element_info); + virtual void process_acknowledged (); + virtual void do_pre_move_processing (); + virtual void do_post_move_processing (); +}; + + +G_script_column_engraver::G_script_column_engraver() +{ + scol_p_ =0; +} + +void +G_script_column_engraver::do_pre_move_processing () +{ + if (scol_p_) + { + typeset_element (scol_p_); + scol_p_ =0; + } +} + +void +G_script_column_engraver::do_post_move_processing () +{ + script_l_arr_.clear (); + staff_side_l_arr_.clear (); +} + +void +G_script_column_engraver::acknowledge_element( Score_element_info inf) +{ + Item *thing = dynamic_cast(inf.elem_l_); + if (!thing) + return; + + Dimension_cache * parcache = thing->dim_cache_[Y_AXIS].parent_l_; + if (!parcache || !thing) + return ; + + Graphical_element *parent = parcache->element_l (); + + if (G_staff_side_item * ss = dynamic_cast(parent)) + { + if (!ss->breakable_b ()) + { + script_l_arr_.push (thing); + } + } +} + +void +G_script_column_engraver::process_acknowledged () +{ + if (!scol_p_ && script_l_arr_.size () > 1) + { + scol_p_ = new G_script_column; + announce_element (Score_element_info (scol_p_, 0)); + } + + if (scol_p_) + { + for (int i=0; i < script_l_arr_.size (); i++) + scol_p_->add_staff_sided (script_l_arr_[i]); + script_l_arr_.clear (); + } +} +ADD_THIS_TRANSLATOR(G_script_column_engraver); diff --git a/lily/g-script-column.cc b/lily/g-script-column.cc new file mode 100644 index 0000000000..d6f3d8b9f8 --- /dev/null +++ b/lily/g-script-column.cc @@ -0,0 +1,76 @@ +/* + g-script-column.cc -- implement G_script_column + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ +#include "g-script-column.hh" +#include "g-staff-side.hh" + +static G_staff_side_item * +get_g_staff_side (Item *i) +{ + Graphical_element *e1 = i->dim_cache_[Y_AXIS].parent_l_->element_l (); + + return dynamic_cast(e1); +} + +void +G_script_column::add_staff_sided (Item *i) +{ + SCM p = get_g_staff_side (i)->get_elt_property (script_priority_scm_sym); + if (p == SCM_BOOL_F) + return; + + staff_sided_item_l_arr_.push (i); + add_dependency (i); +} + +static int +staff_side_compare (Item * const &i1, + Item * const &i2) +{ + Score_element *e1 = get_g_staff_side (i1); + Score_element *e2 = get_g_staff_side (i2); + + SCM p1 = e1->get_elt_property (script_priority_scm_sym); + SCM p2 = e2->get_elt_property (script_priority_scm_sym); + + return gh_scm2int (SCM_CDR(p1)) - gh_scm2int (SCM_CDR(p2)); +} + +void +G_script_column::do_pre_processing () +{ + Drul_array > arrs; + + for (int i=0; i < staff_sided_item_l_arr_.size (); i++) + { + G_staff_side_item * ip = get_g_staff_side (staff_sided_item_l_arr_[i]); + arrs[ip->dir_].push (staff_sided_item_l_arr_[i]); + } + + Direction d = DOWN; + do { + Link_array &arr(arrs[d]); + + arr.sort (staff_side_compare); + + Item * last = 0; + for (int i=0; i < arr.size (); i++) + { + G_staff_side_item * gs = get_g_staff_side (arr[i]); + if (last) + { + gs->add_support (last); + gs->add_support (get_g_staff_side (last)); + } + + gs->remove_elt_property (script_priority_scm_sym); + last = arr[i]; + } + + } while (flip (&d) != DOWN); +} diff --git a/lily/g-script.cc b/lily/g-script.cc index 9ad7c9aca2..867bcf7dd5 100644 --- a/lily/g-script.cc +++ b/lily/g-script.cc @@ -12,7 +12,7 @@ TODO: Quantisation support (staccato dots between stafflines) */ - +#include "debug.hh" #include "g-script.hh" #include "lookup.hh" #include "g-staff-side.hh" @@ -67,3 +67,9 @@ G_script::do_brew_molecule_p () const { return new Molecule (get_molecule (staff_side_l_->dir_)); } + +void +G_script::do_print () const +{ + DOUT << "Indices: " << indices_drul_[LEFT] << ", " << indices_drul_[RIGHT]; +} diff --git a/lily/g-staff-side.cc b/lily/g-staff-side.cc index db1b29cd69..4d74c16628 100644 --- a/lily/g-staff-side.cc +++ b/lily/g-staff-side.cc @@ -9,6 +9,7 @@ #include "g-staff-side.hh" #include "staff-symbol.hh" +#include "debug.hh" G_staff_side_item::G_staff_side_item () { @@ -121,3 +122,32 @@ G_staff_side_item::do_add_processing () add_support (staff_symbol_l ()); } } + +Interval +G_staff_side_item::do_height () const +{ + Interval i; + if (to_position_l_) + return to_position_l_->extent (Y_AXIS); + return i; +} + +Interval +G_staff_side_item::do_width () const +{ + Interval i; + if (to_position_l_) + return to_position_l_->extent (X_AXIS); + return i; +} +void +G_staff_side_item::do_print () const +{ +#ifndef NPRINT + if (to_position_l_) + DOUT << "positioning " << to_position_l_->name(); + + DOUT << "axis == " << axis_name_str (axis_) + << ", dir == " << to_str (dir_ ); +#endif +} diff --git a/lily/g-text-item.cc b/lily/g-text-item.cc index 1854e96c5b..6f54c2ad0a 100644 --- a/lily/g-text-item.cc +++ b/lily/g-text-item.cc @@ -8,7 +8,7 @@ */ #include "g-text-item.hh" - +#include "debug.hh" #include "molecule.hh" #include "paper-def.hh" #include "lookup.hh" @@ -25,3 +25,9 @@ G_text_item::G_text_item () { style_str_ = "roman"; } + +void +G_text_item::do_print () const +{ + DOUT << "text= " << text_str_; +} diff --git a/lily/general-script-def.cc b/lily/general-script-def.cc deleted file mode 100644 index a425c9f387..0000000000 --- a/lily/general-script-def.cc +++ /dev/null @@ -1,74 +0,0 @@ - -/* - general-script-def.cc -- implement General_script_def - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys -*/ - -#include "molecule.hh" -#include "general-script-def.hh" -#include "debug.hh" - - -Direction -General_script_def::staff_dir() const -{ - return DOWN; -} - -Direction -General_script_def::rel_stem_dir() const -{ - return CENTER; -} -int -General_script_def::priority_i() const -{ - return 1000; -} - -bool -General_script_def::inside_b() const -{ - return false; -} - -bool -General_script_def::equal_b (General_script_def const&g) const -{ - return do_equal_b (&g); -} - -bool -General_script_def::do_equal_b (General_script_def const*) const -{ - return true; -} - - -void -General_script_def::print() const -{ - DOUT << classname(this) << "{"; - do_print(); - DOUT << "}"; -} - -void -General_script_def::do_print() const -{ -} - -Molecule -General_script_def::get_molecule (Paper_def*, Direction) const -{ - Molecule s; - return Molecule (s); -} - - - - - diff --git a/lily/include/g-script-column.hh b/lily/include/g-script-column.hh new file mode 100644 index 0000000000..62caab8b48 --- /dev/null +++ b/lily/include/g-script-column.hh @@ -0,0 +1,30 @@ +/* + g-script-column.hh -- declare G_script_column + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#ifndef G_SCRIPT_COLUMN_HH +#define G_SCRIPT_COLUMN_HH + +#include "item.hh" + +class G_script_column : public Item +{ + /** + Array of objects that are placed by staffsides + */ + Link_array staff_sided_item_l_arr_; +public: + void add_staff_sided (Item*); +protected: + virtual void do_pre_processing (); +}; + + +#endif /* G_SCRIPT_COLUMN_HH */ + + diff --git a/lily/include/g-script.hh b/lily/include/g-script.hh index f1309638ad..cbc5f6ee1b 100644 --- a/lily/include/g-script.hh +++ b/lily/include/g-script.hh @@ -28,6 +28,7 @@ public: void set_staff_side (G_staff_side_item*); protected: +virtual void do_print () const; virtual void do_substitute_element_pointer (Score_element*o, Score_element*n); virtual void do_pre_processing (); diff --git a/lily/include/g-staff-side.hh b/lily/include/g-staff-side.hh index 5f527141e0..e6808863a6 100644 --- a/lily/include/g-staff-side.hh +++ b/lily/include/g-staff-side.hh @@ -26,13 +26,13 @@ class G_staff_side_item : public Item, public Staff_symbol_referencer { void position_self (); -public: +public: Score_element * to_position_l_; Direction dir_; Link_array support_l_arr_; Axis axis_; - + //junkme. bool staff_support_b_; G_staff_side_item (); @@ -42,6 +42,9 @@ public: VIRTUAL_COPY_CONS(Score_element); virtual Direction get_default_direction () const; protected: + virtual Interval do_height () const; + virtual Interval do_width () const; + virtual void do_print () const; virtual void do_add_processing (); virtual void do_substitute_element_pointer (Score_element*,Score_element*); virtual void do_pre_processing (); diff --git a/lily/include/g-text-item.hh b/lily/include/g-text-item.hh index c27ad99a69..3edfe6c72c 100644 --- a/lily/include/g-text-item.hh +++ b/lily/include/g-text-item.hh @@ -24,6 +24,7 @@ public: G_text_item (); VIRTUAL_COPY_CONS (Score_element); protected: + virtual void do_print () const; virtual Molecule *do_brew_molecule_p () const; }; diff --git a/lily/include/general-script-def.hh b/lily/include/general-script-def.hh deleted file mode 100644 index 74b2075ae7..0000000000 --- a/lily/include/general-script-def.hh +++ /dev/null @@ -1,40 +0,0 @@ -/* - general-script-def.hh -- declare General_script_def - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys -*/ - - -#ifndef GENERAL_SCRIPT_DEF_HH -#define GENERAL_SCRIPT_DEF_HH - - - -#include "lily-proto.hh" -#include "input.hh" -#include "virtual-methods.hh" -#include "direction.hh" - -/** - Definition of anything that is put aside staff/notes. - */ -class General_script_def : public Input { -public: - VIRTUAL_COPY_CONS(General_script_def); - - virtual Direction staff_dir() const; - void print() const; - virtual Direction rel_stem_dir() const; - virtual int priority_i() const; - virtual bool inside_b() const; - virtual Molecule get_molecule (Paper_def* p, Direction dir_) const; - bool equal_b (General_script_def const&) const; - virtual ~General_script_def() {} -protected: - virtual bool do_equal_b (General_script_def const *) const; - virtual void do_print() const; -}; - -#endif // GENERAL_SCRIPT_DEF_HH diff --git a/lily/include/lookup.hh.orig b/lily/include/lookup.hh.orig deleted file mode 100644 index abf3434a8b..0000000000 --- a/lily/include/lookup.hh.orig +++ /dev/null @@ -1,61 +0,0 @@ -/* - lookup.hh -- declare Lookup - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - -#ifndef LOOKUP_HH -#define LOOKUP_HH - -#include "molecule.hh" -#include "fproto.hh" -#include "direction.hh" -#include "box.hh" - -/** handy interface to symbol table - */ -class Lookup -{ -public: - Lookup (); - Lookup (Lookup const&); - - Molecule simple_bar (String s, Real w) const; - Molecule accidental (int, bool cautionary) const; - Molecule afm_find (String, bool warn=true) const; - Molecule notehead (int, String) const; - - Molecule bar (String, Real height) const; - Molecule beam (Real, Real, Real) const; - Molecule clef (String) const; - Molecule dashed_slur (Array controls, Real thick, Real dash) const; - Molecule dots () const; - Molecule ledger_line (Interval) const; - Molecule fill (Box b) const; - Molecule filledbox (Box b) const; - Molecule flag (int, Direction) const; - Molecule hairpin (Real width, bool decresc, bool continued) const; - Molecule plet (Real dy, Real dx, Direction dir) const; - Molecule rest (int, bool outside, String) const; - Molecule rule_symbol (Real height, Real width) const; - Molecule script (String idx) const; - Molecule stem (Real y1_pos, Real y2_pos) const; - Molecule slur (Array controls) const; - Molecule streepje (int type) const; - Molecule text (String style, String text) const; - Molecule staff_brace (Real dy) const; - Molecule staff_bracket (Real dy) const; - Molecule volta (Real w, bool last_b) const; - Molecule special_time_signature (String, int,int) const; - Molecule time_signature (int n,int d) const; - - Paper_def * paper_l_; - - String font_name_; - Adobe_font_metric * afm_l_; -}; - -#endif // LOOKUP_HH diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 1fd514cde2..b4950a7971 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -61,6 +61,7 @@ class Articulation_req : public G_script_req public: String articulation_str_; protected: + virtual bool do_equal_b (Request*) const; virtual void do_print () const; VIRTUAL_COPY_CONS(Music); }; @@ -165,11 +166,12 @@ class Dynamic_req : public virtual Request { public: VIRTUAL_COPY_CONS(Music); }; - +/* + merge with Articulation_req? + */ class Absolute_dynamic_req : public Dynamic_req { public: String loudness_str_; - String loudness_str () const; Absolute_dynamic_req(); protected: diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index 8fd5af02b1..db18a621c9 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -11,13 +11,13 @@ #define NOTE_COLUMN_HH #include "item.hh" -#include "script-column.hh" +#include "axis-group-item.hh" /** a struct for treating a group of noteheads (noteheads, stem (chord) and scripts) as a single entity. */ -class Note_column : public Script_column { +class Note_column : public Axis_group_item { protected: - virtual void do_pre_processing(); + virtual void do_print () const; virtual void do_substitute_element_pointer (Score_element*,Score_element*); public: @@ -27,10 +27,9 @@ public: JUNKME.v */ - Direction dir_; + Direction dir () const; Stem* stem_l_; - Link_array head_l_arr_; Link_array rest_l_arr_; @@ -38,14 +37,12 @@ public: // Interval width () const; void translate_rests(int dy); - Note_column (); void set_stem (Stem*); void set_dotcol (Dot_column*); void add_head (Rhythmic_head*); bool rest_b () const; - virtual void add_script (Script*s); void sort (); }; diff --git a/lily/include/rhythmic-column-engraver.hh b/lily/include/rhythmic-column-engraver.hh index b9101c84d7..c4514f00bb 100644 --- a/lily/include/rhythmic-column-engraver.hh +++ b/lily/include/rhythmic-column-engraver.hh @@ -14,7 +14,6 @@ #include "parray.hh" class Rhythmic_column_engraver :public Engraver { - Link_array