]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.52
authorfred <fred>
Sun, 24 Mar 2002 19:39:31 +0000 (19:39 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:39:31 +0000 (19:39 +0000)
lily/clef-item.cc
lily/dynamic-reg.cc
lily/include/clef-item.hh
lily/include/staff-elem-info.hh
lily/my-lily-lexer.cc
lily/text-reg.cc

index a95c54d454f1206995d619d9868ee2f373d42af3..48e63b7f3b57025e3075f7ae5f27fed53c3ff49a 100644 (file)
@@ -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);
index 59de6094374edd41b815219d62b293e174885430..11a74756a7f4563d225984adef7f618b0f6dcc7f 100644 (file)
@@ -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);
index 341204f8eab2c284d7e1e41cbff594dc82950a4b..d0e29994ef3720397ac3a58e7f03e7a05af3a0f4 100644 (file)
@@ -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
index 25b8281ebd7039871bc5502204eb77d06e747681..25fa480170749e8bf3fb2eaecee63d7984255c7a 100644 (file)
@@ -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
index 1a274f92d9c1426b963b563ff4b801552f333f4a..f1f7cb0cfd41d2ffe86ef86731ff41556b96d7d3 100644 (file)
@@ -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},
index c502781a1d7b80740f0bd43a5da46ddd8d80f4e4..b1d921c45da3ff9426334b4d6ff4a44c0a655fc7 100644 (file)
@@ -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()