From 648d15e32bbfb86fa769b5d7abacd7e73b6cbd34 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:39:31 +0000 Subject: [PATCH] lilypond-0.0.52 --- lily/clef-item.cc | 12 ++++++------ lily/dynamic-reg.cc | 5 +++-- lily/include/clef-item.hh | 14 +++++++++----- lily/include/staff-elem-info.hh | 10 ++++------ lily/my-lily-lexer.cc | 1 + lily/text-reg.cc | 7 ++++--- 6 files changed, 27 insertions(+), 22 deletions(-) diff --git a/lily/clef-item.cc b/lily/clef-item.cc index a95c54d454..48e63b7f3b 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -24,14 +24,14 @@ Clef_item::Clef_item() void Clef_item::read(String t) { - type = t; - if (type == "violin") + type_= t; + if (type_ == "violin") y_off = 2; - if (type == "alto") + if (type_ == "alto") y_off = 4; - if (type == "tenor") + if (type_ == "tenor") y_off = 6; - if (type == "bass") + if (type_ == "bass") y_off = 6; } void @@ -43,7 +43,7 @@ Clef_item::read(Clef_register const &k) Molecule* Clef_item::brew_molecule_p()const { - String t = type; + String t = type_; if (change) t += "_change"; Symbol s = paper()->lookup_l()->clef(t); diff --git a/lily/dynamic-reg.cc b/lily/dynamic-reg.cc index 59de609437..11a74756a7 100644 --- a/lily/dynamic-reg.cc +++ b/lily/dynamic-reg.cc @@ -117,9 +117,10 @@ Dynamic_register::acceptable_request_b(Request*r)const } void -Dynamic_register::set_feature(Features i) +Dynamic_register::set_feature(Feature i) { - dir_i_ = i.direction_i_; + if (i.type_ == "vdir") + dir_i_ = i.value_; } IMPLEMENT_STATIC_NAME(Dynamic_register); diff --git a/lily/include/clef-item.hh b/lily/include/clef-item.hh index 341204f8ea..d0e29994ef 100644 --- a/lily/include/clef-item.hh +++ b/lily/include/clef-item.hh @@ -9,21 +9,25 @@ #define CLEFITEM_HH #include "item.hh" - -struct Clef_item : Item { - String type; +/** + Set a clef in a staff. + */ +class Clef_item : public Item { +protected: + Molecule* brew_molecule_p()const; +public: + + String type_; int y_off; /// is this a change clef (smaller size)? bool change; - /* *************** */ NAME_MEMBERS(Clef_item); Clef_item(); void read(Clef_register const&); void read(String); - Molecule* brew_molecule_p()const; }; #endif // CLEFITEM_HH diff --git a/lily/include/staff-elem-info.hh b/lily/include/staff-elem-info.hh index 25b8281ebd..25fa480170 100644 --- a/lily/include/staff-elem-info.hh +++ b/lily/include/staff-elem-info.hh @@ -10,6 +10,7 @@ #ifndef STAFFELEMINFO_HH #define STAFFELEMINFO_HH +#include "scalar.hh" #include "proto.hh" #include "varray.hh" @@ -26,11 +27,8 @@ struct Staff_elem_info { }; -struct Features { - bool initialiser_b_; - int direction_i_; - - Features(); - static Features dir(int); +struct Feature { + Scalar type_; + Scalar value_; }; #endif // STAFFELEMINFO_HH diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 1a274f92d9..f1f7cb0cfd 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -30,6 +30,7 @@ static Keyword_ent the_key_tab[]={ {"absdynamic", ABSDYNAMIC}, {"group", GROUP}, {"geometric", GEOMETRIC}, + {"hshift", HSHIFT}, {"in", IN_T}, {"inputregister", INPUT_REGS}, {"lyric", LYRIC}, diff --git a/lily/text-reg.cc b/lily/text-reg.cc index c502781a1d..b1d921c45d 100644 --- a/lily/text-reg.cc +++ b/lily/text-reg.cc @@ -11,7 +11,7 @@ Text_register::Text_register() { text_p_ = 0; - set_feature(Features::dir(0)); + dir_i_ =0; post_move_processing(); } @@ -56,9 +56,10 @@ Text_register::pre_move_processing() } } void -Text_register::set_feature(Features i) +Text_register::set_feature(Feature i) { - dir_i_ = i.direction_i_; + if (i.type_ == "vdir") + dir_i_ = i.value_; } void Text_register::post_move_processing() -- 2.39.5