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
Molecule*
Clef_item::brew_molecule_p()const
{
- String t = type;
+ String t = type_;
if (change)
t += "_change";
Symbol s = paper()->lookup_l()->clef(t);
}
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);
#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
#ifndef STAFFELEMINFO_HH
#define STAFFELEMINFO_HH
+#include "scalar.hh"
#include "proto.hh"
#include "varray.hh"
};
-struct Features {
- bool initialiser_b_;
- int direction_i_;
-
- Features();
- static Features dir(int);
+struct Feature {
+ Scalar type_;
+ Scalar value_;
};
#endif // STAFFELEMINFO_HH
{"absdynamic", ABSDYNAMIC},
{"group", GROUP},
{"geometric", GEOMETRIC},
+ {"hshift", HSHIFT},
{"in", IN_T},
{"inputregister", INPUT_REGS},
{"lyric", LYRIC},
Text_register::Text_register()
{
text_p_ = 0;
- set_feature(Features::dir(0));
+ dir_i_ =0;
post_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()