def name():
- return pwd.getpwuid(os.getuid())[4]
+ return os.environ['USERNAME']
+
+# field 4 of passwd is also used for finger info (phone no., office etc)
+# return pwd.getpwuid(os.getuid())[4]
def c_commentify(str):
return '/* ' + regsub.gsub('^',' ', str) + '\n */';
Atom vbrace (Real &dy) const;
Atom vbracket (Real &dy) const;
Atom time_signature (Array<Scalar>) const;
+ Atom special_time_signature (String) const;
Atom stem (Real y1_pos, Real y2_pos) const;
Atom rule_symbol (Real height, Real width) const;
Atom accidental (int) const;
*/
class Time_signature: public Item {
- Array<Scalar> args;
+
+
protected:
virtual Molecule*brew_molecule_p() const;
public:
- Time_signature (Array<Scalar> args) ;
+ Time_signature () ;
+ Array<Scalar> args_;
+ String time_sig_type_str_;
+
DECLARE_MY_RUNTIME_TYPEINFO;
SCORE_ELEMENT_CLONE(Time_signature);
};
args.push (req->beats_i_);
args.push (req->one_beat_i_);
- time_signature_p_ = new Time_signature (args);
+ time_signature_p_ = new Time_signature ();
+ time_signature_p_->args_ = args;
time_signature_p_->break_priority_i_ = 1; // ugh
}
+
if (time_signature_p_)
announce_element (Score_element_info (time_signature_p_, req));
}
{
if (time_signature_p_)
{
+ Scalar sigstyle = get_property ("timeSignatureStyle");
+ if (sigstyle.length_i ())
+ {
+ time_signature_p_->time_sig_type_str_ = sigstyle;
+ }
+
typeset_element (time_signature_p_);
time_signature_p_ =0;
}
+/*
+ time-signature.cc -- implement Time_signature
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1996--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
#include "scalar.hh"
#include "molecule.hh"
#include "time-signature.hh"
#include "paper-def.hh"
#include "lookup.hh"
-Time_signature::Time_signature (Array<Scalar>a)
- :args (a)
+Time_signature::Time_signature ()
{
breakable_b_ = true;
}
Molecule*
Time_signature::brew_molecule_p() const
{
- Atom s = lookup_l ()->time_signature (args);
+ Atom s;
+ if (time_sig_type_str_.length_i ())
+ {
+ s = lookup_l ()-> special_time_signature (time_sig_type_str_);
+ }
+ else
+ s = lookup_l ()->time_signature (args_);
s.translate_axis (-s.extent()[Y_AXIS].center (), Y_AXIS);
return new Molecule (Atom (s));
}