--- /dev/null
+/*
+ abbrev.hh -- declare Abbreviation
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+ */
+
+#ifndef ABBREV_HH
+#define ABBREV_HH
+
+#include "item.hh"
+class Abbreviation : public Item {
+ Stem * stem_l_;
+protected:
+ virtual void do_print () const;
+ virtual Molecule *brew_molecule_p () const;
+ virtual void do_substitute_dependent (Score_elem*, Score_elem*);
+public:
+ int abbrev_flags_i_;
+ Abbreviation ();
+ void set_stem (Stem *);
+};
+
+#endif /* ABBREV_HH */
+
#include "musical-request.hh"
#include "duration-convert.hh"
#include "misc.hh"
+#include "abbrev.hh"
Stem_engraver::Stem_engraver()
{
abbrev_req_l_ = 0;
stem_p_ = 0;
+ abbrev_p_ = 0;
default_abbrev_i_ = 16;
dir_ = CENTER;
}
t = default_abbrev_i_;
else
default_abbrev_i_ = t;
- stem_p_->abbrev_flag_i_ =intlog2 (t) - (durlog_i>? 2);
+
+ abbrev_p_ = new Abbreviation;
+ announce_element (Score_elem_info (abbrev_p_, abbrev_req_l_));
+ abbrev_p_->abbrev_flags_i_ =intlog2 (t) - (durlog_i>? 2);
}
announce_element (Score_elem_info (stem_p_, r));
}
void
Stem_engraver::do_pre_move_processing()
{
+ if (abbrev_p_)
+ {
+ abbrev_p_->set_stem (stem_p_);
+ typeset_element (abbrev_p_);
+ abbrev_p_ = 0;
+ }
if (stem_p_)
{
Scalar prop = get_property ("ydirection");