note={A rewrite of MusicTeX. After licensing quarrels, MusiXTeX has
been split into two (both still non-GNU GPL licensed) branches.},
}
-
+
+
+
+@Misc{opus,
+ title = {opus},
+html={http://www.sincrosoft.com}
+}
+
@misc{musixtex2,
title = {MusiXTeX},
HTML={http://www.gmd.de/Misc/Music/},
--- /dev/null
+/*
+ killing-cons.tcc -- declare Killing_cons
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef KILLING_CONS_TCC
+#define KILLING_CONS_TCC
+
+#include "cons.hh"
+
+template<class T>
+Killing_cons<T>::~Killing_cons ()
+{
+ delete car_;
+}
+
+template<class T>
+void
+copy_killing_cons_list (Cons_list<T> &dest, Cons<T> *src)
+{
+ for (; src; src = src->next_)
+ {
+ T *t = new T(*src->car_);
+ dest.append ( new Killing_cons<T> (t, 0));
+ }
+}
+
+template<class T>
+void
+clone_killing_cons_list (Cons_list<T> & dest, Cons<T> *src)
+{
+ for (; src; src = src->next_)
+ {
+ T *t = src->car_->clone ();
+ dest.append (new Killing_cons<T> (t, 0));
+ }
+}
+
+#endif /* KILLING_CONS_TCC */
+
#ifndef SOURCE_HH
#define SOURCE_HH
-
+#include "cons.hh"
#include "proto.hh"
-#include "plist.hh"
+
class Sources
{
private:
const File_path * path_C_;
- Pointer_list<Source_file*> sourcefile_p_list_;
+ Cons<Source_file> *sourcefile_p_list_;
bool binary_b_ ;
};
#include <assert.h>
-
+#include "killing-cons.tcc"
#include "binary-source-file.hh"
#include "string.hh"
#include "proto.hh"
-#include "plist.hh"
#include "source-file.hh"
#include "source.hh"
#include "file-path.hh"
void
Sources::add (Source_file* sourcefile_p)
{
- sourcefile_p_list_.bottom ().add (sourcefile_p);
+ sourcefile_p_list_ = new Killing_cons<Source_file> (sourcefile_p, sourcefile_p_list_);
}
/**
Source_file*
Sources::sourcefile_l (char const* ch_C)
{
- PCursor<Source_file*> sourcefile_l_pcur (sourcefile_p_list_.top ());
- for (; sourcefile_l_pcur.ok (); sourcefile_l_pcur++)
- if (sourcefile_l_pcur->in_b (ch_C))
- return *sourcefile_l_pcur;
+
+ for (Cons<Source_file> *i = sourcefile_p_list_; i; i = i->next_)
+ if (i->car_->in_b (ch_C))
+ return i->car_;
return 0;
}
abeam_p_->multiple_i_ = s->flag_i_;
if (s->type_i () != 1) // no abbrev gaps on half note
- s->beam_gap_i_ = s->flag_i_ - ((s->type_i () >? 2) - 2);
+ s->set_elt_property (beam_gap_scm_sym,
+ gh_int2scm(s->flag_i_ - ((s->type_i () >? 2) - 2)));
abeam_p_->add_stem (s);
}
--- /dev/null
+/*
+ axis-align-item.cc -- implement
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "axis-align-item.hh"
+
+Axis_align_item::Axis_align_item ()
+{
+}
--- /dev/null
+/*
+ axis-align-spanner.cc -- implement
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+#include "axis-align-spanner.hh"
+
+Axis_align_spanner::Axis_align_spanner()
+{
+}
}
-void
-Bar_engraver::acknowledge_element (Score_element_info i)
-{
- if (Bar *b = dynamic_cast<Bar *> (i.elem_l_))
- {
- // only bar-engraver should create bars
- assert (0);
- }
-}
+
void
Bar_engraver::create_bar ()
Scalar prop = get_property ("barAtLineStart", 0);
if (prop.to_bool ())
{
- bar_p_->at_line_start_b_ = true;
+ bar_p_->set_elt_property (at_line_start_scm_sym, SCM_BOOL_T);
}
announce_element (Score_element_info (bar_p_, bar_req_l_));
}
Scalar padding = get_property (type_ + "ScriptPadding", 0);
if (padding.length_i() && padding.isnum_b ())
{
- staff_side_p_->padding_f_ = Real(padding);
+ staff_side_p_->set_elt_property (padding_scm_sym, gh_double2scm(Real(padding)));
}
}
+
+Dot_column::Dot_column ()
+{
+ set_axes(X_AXIS,X_AXIS);
+}
dir_ = CENTER;
to_position_l_ = 0;
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- padding_f_ = 0;
+
axis_ = Y_AXIS;
}
common = dim_cache_[axis_].parent_l_;
}
Interval sym_dim = to_position_l_->extent (axis_);
- Real off = dim_cache_[axis_].relative_coordinate (common) - padding_f_ * dir_;
-
+ Real off = dim_cache_[axis_].relative_coordinate (common);
+
+ SCM pad = remove_elt_property (padding_scm_sym);
+ if (pad != SCM_BOOL_F)
+ {
+ off -= gh_scm2double (SCM_CDR(pad)) * dir_;
+ }
dim_cache_[axis_].set_offset (dim[dir_] - sym_dim[-dir_] - off);
}
void
Hara_kiri_line_group_engraver::create_line_spanner ()
{
- staffline_p_ = new Hara_kiri_vertical_group_spanner;
+ staffline_p_ = new Hara_kiri_group_spanner;
+
}
void
{
if (Rhythmic_head *h = dynamic_cast<Rhythmic_head *> (e))
{
- dynamic_cast<Hara_kiri_vertical_group_spanner*> (staffline_p_)
+ dynamic_cast<Hara_kiri_group_spanner*> (staffline_p_)
->add_interesting_item (h);
}
Line_group_engraver_group::typeset_element (e);
#include "debug.hh"
#include "item.hh"
-Hara_kiri_vertical_group_spanner::Hara_kiri_vertical_group_spanner()
+Hara_kiri_group_spanner::Hara_kiri_group_spanner()
{
+ set_axes(Y_AXIS,Y_AXIS);
}
void
-Hara_kiri_vertical_group_spanner::add_interesting_item (Item* n)
+Hara_kiri_group_spanner::add_interesting_item (Item* n)
{
add_dependency (n);
interesting_items_.push (n);
}
void
-Hara_kiri_vertical_group_spanner::do_post_processing ()
+Hara_kiri_group_spanner::do_post_processing ()
{
if (!interesting_items_.empty ())
return;
}
void
-Hara_kiri_vertical_group_spanner::do_substitute_element_pointer (Score_element*o, Score_element*n)
+Hara_kiri_group_spanner::do_substitute_element_pointer (Score_element*o, Score_element*n)
{
if (Item *it = dynamic_cast<Item *> (o))
interesting_items_.substitute (it, dynamic_cast<Item *> (n));
void
-Hara_kiri_vertical_group_spanner::do_print () const
+Hara_kiri_group_spanner::do_print () const
{
Axis_group_spanner::do_print ();
}
--- /dev/null
+/*
+ vertical-align-spanner.hh -- declare Vertical_align_spanner
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef VERTICAL_ALIGN_SPANNER_HH
+#define VERTICAL_ALIGN_SPANNER_HH
+
+#include "spanner.hh"
+#include "align-element.hh"
+#include "axis-group-spanner.hh"
+
+class Axis_align_spanner : public virtual Align_element,
+ public virtual Axis_group_spanner
+{
+public:
+ VIRTUAL_COPY_CONS(Score_element);
+ Axis_align_spanner ();
+ virtual void do_print() const {}
+};
+#endif // VERTICAL_ALIGN_SPANNER_HH
A grouping item. Its special support is in do_breakable_col_processing().
*/
-class Axis_group_item : public virtual Axis_group_element, public Item {
+class Axis_group_item : public virtual Axis_group_element,
+ public virtual Item {
protected:
virtual void do_breakable_col_processing();
void OK() const;
virtual void do_print() const;
+public:
+ VIRTUAL_COPY_CONS(Score_element);
};
#endif // AXIS_ITEM_HH
void request_bar (String type_str);
protected:
- virtual void acknowledge_element (Score_element_info i);
virtual void do_creation_processing ();
virtual void do_removal_processing ();
virtual bool do_try_music (Music *req_l);
class Bar:public Item {
public:
String type_str_;
- bool at_line_start_b_;
-
-
VIRTUAL_COPY_CONS(Score_element);
Bar ();
virtual void do_pre_processing ();
virtual Molecule* do_brew_molecule_p () const;
virtual Real get_bar_size () const;
+
private:
void do_print () const;
};
#define SPAN_BAR_GRAV_HH
#include "engraver.hh"
-
+class Axis_align_spanner;
/**
Make bars that span multiple "staffs". Catch bars, and span a
{
Span_bar * spanbar_p_;
Array<Bar*> bar_l_arr_;
- Vertical_align_spanner * valign_l_;
+ Axis_align_spanner * valign_l_;
public:
VIRTUAL_COPY_CONS(Translator);
#ifndef BREAK_ALIGN_ITEM_HH
#define BREAK_ALIGN_ITEM_HH
-#include "horizontal-align-item.hh"
+#include "axis-align-item.hh"
/// align breakable items (clef, bar, etc.)
-class Break_align_item : public Horizontal_align_item {
+class Break_align_item : public Axis_align_item {
protected:
- virtual void do_pre_processing();
+ virtual void do_pre_processing();
public:
-
- VIRTUAL_COPY_CONS(Score_element);
+ Break_align_item ();
+ VIRTUAL_COPY_CONS(Score_element);
};
#endif // BREAK_ALIGN_ITEM_HH
#ifndef COLLISION_HH
#define COLLISION_HH
#include "lily-proto.hh"
-#include "horizontal-vertical-group-item.hh"
+#include "axis-group-item.hh"
/**
Resolve conflicts between various Note_columns (chords).
multistaff support (see Chlapik: equal noteheads should be on the
same hpos.)
*/
-class Collision : public Horizontal_vertical_group_item {
+class Collision : public Axis_group_item {
protected:
virtual void do_substitute_element_pointer (Score_element*,Score_element*);
virtual void do_pre_processing();
#ifndef DOT_COLUMN_HH
#define DOT_COLUMN_HH
-#include "horizontal-group-item.hh"
+#include "axis-group-item.hh"
/**
Group dots. This is needed because, the dots have to be aligned per voice
*/
-class Dot_column : public Horizontal_group_item
+class Dot_column : public Axis_group_item
{
Link_array<Rhythmic_head> head_l_arr_;
Link_array<Dots> dot_l_arr_;
void add_head (Rhythmic_head*);
void add_dots (Dots*);
-
+ Dot_column ();
protected:
virtual void do_pre_processing ();
virtual void do_substitute_element_pointer (Score_element *o, Score_element*n);
public:
int no_dots_i_;
int position_i_;
-
Dots ();
};
Score_element * to_position_l_;
Direction dir_;
Link_array<Score_element> support_l_arr_;
- Real padding_f_;
Axis axis_;
G_staff_side_item ();
*/
class Graphical_axis_group : public virtual Graphical_element {
public:
+ // keep array in order.
+ bool ordered_b_;
Link_array<Graphical_element> elem_l_arr_;
Axis axes_[2];
Interval extent (Axis) const;
virtual void do_print() const;
Graphical_axis_group (Graphical_axis_group const&);
- Graphical_axis_group (Axis,Axis);
+ Graphical_axis_group ();
+ virtual void set_axes (Axis,Axis);
void remove_all ();
bool contains_b (Graphical_element const *) const;
void add_element (Graphical_element*);
void remove_element (Graphical_element*);
-
};
#endif // Graphical_axis_group_HH
#ifndef HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
#define HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
-#include "vertical-group-spanner.hh"
+#include "axis-group-spanner.hh"
/**
As Vertical_group_spanner, but keep track of interesting items. If
we don't contain any interesting items after linebreaking, then
gracefully commit suicide. Objective: don't disgrace Lily by
typesetting empty lines in orchestral scores. */
-class Hara_kiri_vertical_group_spanner : public Vertical_group_spanner
+class Hara_kiri_group_spanner : public Axis_group_spanner
{
public:
- Hara_kiri_vertical_group_spanner ();
+ Hara_kiri_group_spanner ();
virtual void do_post_processing ();
void add_interesting_item (Item* n);
protected:
VIRTUAL_COPY_CONS(Translator);
Key key_;
Key_change_req * keyreq_l_;
- Key_item * kit_p_;
+ Key_item * item_p_;
Array<Musical_pitch> accidental_idx_arr_;
Array<Musical_pitch> old_accidental_idx_arr_;
- bool default_key_b_;
- bool change_key_b_;
+
+
protected:
virtual bool do_try_music (Music *req_l);
/// An item which places accidentals at the start of the line
class Key_item :public Item, public Staff_symbol_referencer {
-public:
-
Array<int> pitch_arr_;
Array<int> acc_arr_;
Array<int> old_pitch_arr_;
Array<int> old_acc_arr_;
+ int c0_position_;
+
+
+public:
+ bool multi_octave_b_;
- // ugh. Naming
- int c_position;
- // see above.
- int c0_position;
- bool default_b_;
- bool multi_octave_b_;
+ int get_c_position () const;
VIRTUAL_COPY_CONS(Score_element);
int calculate_position(int p, int a) const;
protected:
- virtual void do_pre_processing();
virtual Molecule* do_brew_molecule_p() const;
};
struct Graphical_axis_group;
struct Global_translator;
struct Hara_kiri_line_group_engraver;
-struct Hara_kiri_vertical_group_spanner;
+struct Hara_kiri_group_spanner;
struct Head_column;
-struct Horizontal_align_item;
-struct Horizontal_group_element;
-struct Horizontal_group_item;
-struct Horizontal_vertical_group;
struct Idealspacing;
struct Identifier;
struct Input_file;
struct Timing_req;
struct Vertical_brace;
struct Vertical_spanner;
-struct Vertical_group_element;
-struct Vertical_group_spanner;
-struct Vertical_align_spanner;
-struct Vertical_align_engraver;
+
struct Volta_spanner;
struct Align_element;
struct Sequential_music;
*/
class Line_group_engraver_group : public Engraver_group_engraver {
protected:
- Vertical_group_spanner *staffline_p_;
+ Axis_group_spanner *staffline_p_;
virtual void create_line_spanner ();
virtual void do_creation_processing();
class Note_head : public Rhythmic_head {
public:
-
- String note_head_type_str_;
-
- /// position of top line (5 linestaff: 8)
int position_i_;
- /// -1 = lowest, 0 = inside, 1 = top
- int extremal_i_;
-
- /// needed for the help-lines
- int staff_size_i_;
- Direction x_dir_;
-
Note_head ();
+ void flip_around_stem (Direction);
static int compare (Note_head * const &a, Note_head *const &b) ;
protected:
virtual Interval do_width () const;
#ifndef P_COL_HH
#define P_COL_HH
-#include "horizontal-group-item.hh"
+#include "axis-group-item.hh"
#include "rod.hh"
\end{itemize}
*/
-class Paper_column : public Horizontal_group_item {
+class Paper_column : public Axis_group_item {
public:
VIRTUAL_COPY_CONS(Score_element);
Drul_array<Array<Column_rod> > minimal_dists_arr_drul_;
#ifndef SCRIPT_COLUMN_HH
#define SCRIPT_COLUMN_HH
-#include "horizontal-vertical-group-item.hh"
+#include "axis-group-item.hh"
/** a struct for treating a group of noteheads (noteheads, stem
(chord) and scripts) as a single entity. */
-class Script_column : public Horizontal_vertical_group_item {
+class Script_column : public Axis_group_item {
protected:
- virtual void do_print() const;
- virtual void do_substitute_element_pointer (Score_element*, Score_element*);
- virtual void do_pre_processing() ;
+ virtual void do_print() const;
+ virtual void do_substitute_element_pointer (Score_element*, Score_element*);
+ virtual void do_pre_processing() ;
public:
- Link_array<Script> script_l_arr_;
- Link_array<Item> support_l_arr_;
+ Link_array<Script> script_l_arr_;
+ Link_array<Item> support_l_arr_;
- virtual void add_script (Script *);
- void add_support (Item*);
+ virtual void add_script (Script *);
+ void add_support (Item*);
+ Script_column ();
};
#endif // SCRIPT_COLUMN_HH
Real interstaff_f_;
Stem* stem_l_;
+
Stem_info ();
- Stem_info (Stem *);
+ Stem_info (Stem *, int);
};
#endif // STEM_INFO_HH
dir_force: is direction explicitely specified? (bool)
+ /// how many abbrev beam don't reach stem?
+ int beam_gap_i_;
+
+
+
*/
// todo: remove baseclass Staff_symbol_referencer, since stem
// can be across a staff.
*/
Drul_array<Real> yextent_drul_;
- /**
- geen gedonder, jij gaat onder.
- -1 stem points down, +1: stem points up
- */
- Direction stem_xdir_;
-
Link_array<Note_head> head_l_arr_;
Link_array<Rest> rest_l_arr_;
public:
- /// how many abbrev beam don't reach stem?
- int beam_gap_i_;
-
/// log of the duration. Eg. 4 -> 16th note -> 2 flags
int flag_i_;
Drul_array<int> beams_i_drul_;
- /// maximum number of beams
- int mult_i_;
-
/// direction stem (that's me)
Direction dir_;
/// ensure that this Stem also encompasses the Notehead #n#
void add_head (Rhythmic_head*n);
-
-
Real hpos_f () const;
Real chord_start_f () const;
#define VERTICAL_ALIGN_GRAV_HH
#include "engraver.hh"
-
+class Axis_align_spanner;
class Vertical_align_engraver : public Engraver {
- Vertical_align_spanner * valign_p_;
+ Axis_align_spanner * valign_p_;
public:
VIRTUAL_COPY_CONS(Translator);
Key_engraver::Key_engraver ()
{
- kit_p_ = 0;
+ item_p_ = 0;
do_post_move_processing ();
}
void
Key_engraver::create_key ()
{
- if (!kit_p_)
+ if (!item_p_)
{
- kit_p_ = new Key_item;
- kit_p_->set_elt_property (break_priority_scm_sym, gh_int2scm(-1)); // ugh
- kit_p_->multi_octave_b_ = key_.multi_octave_b_;
- announce_element (Score_element_info (kit_p_,keyreq_l_));
+ item_p_ = new Key_item;
+ item_p_->set_elt_property (break_priority_scm_sym, gh_int2scm(-1)); // ugh
+ item_p_->multi_octave_b_ = key_.multi_octave_b_;
+ announce_element (Score_element_info (item_p_,keyreq_l_));
for (int i = 0; i < accidental_idx_arr_.size(); i++)
Musical_pitch m_l =accidental_idx_arr_[i];
int a =m_l.accidental_i_;
if (key_.multi_octave_b_)
- kit_p_->add (m_l.steps (), a);
+ item_p_->add (m_l.steps (), a);
else
- kit_p_->add (m_l.notename_i_, a);
+ item_p_->add (m_l.notename_i_, a);
}
for (int i = 0 ; i< old_accidental_idx_arr_.size(); i++)
Musical_pitch m_l =old_accidental_idx_arr_[i];
int a =m_l.accidental_i_;
if (key_.multi_octave_b_)
- kit_p_->add_old (m_l.steps (), a);
+ item_p_->add_old (m_l.steps (), a);
else
- kit_p_->add_old (m_l.notename_i_, a);
+ item_p_->add_old (m_l.notename_i_, a);
}
}
}
else if (dynamic_cast<Bar *> (info.elem_l_)
&& accidental_idx_arr_.size ())
{
- if (!keyreq_l_)
- default_key_b_ = true;
+ bool def = (!item_p_);
create_key ();
+ if (def)
+ {
+ item_p_->set_elt_property (visibility_lambda_scm_sym,
+ gh_eval_str ("postbreak_only_visibility"));
+ }
}
}
void
Key_engraver::do_pre_move_processing ()
{
- if (kit_p_)
+ if (item_p_)
{
- kit_p_->default_b_ = default_key_b_;
- typeset_element (kit_p_);
- kit_p_ = 0;
+ typeset_element (item_p_);
+ item_p_ = 0;
}
}
Key_engraver::do_post_move_processing ()
{
keyreq_l_ = 0;
- default_key_b_ = false;
old_accidental_idx_arr_.clear ();
}
{
multi_octave_b_ = false;
set_elt_property (breakable_scm_sym, SCM_BOOL_T);
- default_b_ = false;
set_c_position (0);
}
-void
-Key_item::set_c_position (int c0)
+int
+Key_item::get_c_position () const
{
- c0_position = c0;
// Find the c in the range -4 through 2
- int from_bottom_pos = c0 + 4;
+ int from_bottom_pos = c0_position_ + 4;
from_bottom_pos = from_bottom_pos%7;
from_bottom_pos = (from_bottom_pos + 7)%7; // Precaution to get positive.
- c_position = from_bottom_pos - 4;
+ return from_bottom_pos - 4;
+}
+
+
+void
+Key_item::set_c_position (int c0)
+{
+ c0_position_ = c0;
}
{
if (multi_octave_b_)
{
- return p + c0_position;
+ return p + c0_position_;
}
else {
- if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+c_position>4)) && (p+c_position>1))
+ if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+get_c_position ()>4)) && (p+get_c_position ()>1))
||
- (a>0 && ((p>SHARP_TOP_PITCH) || (p+c_position>5)) && (p+c_position>2)))
+ (a>0 && ((p>SHARP_TOP_PITCH) || (p+get_c_position ()>5)) && (p+get_c_position ()>2)))
{
p -= 7; /* Typeset below c_position */
}
- return p + c_position;
+ return p + get_c_position ();
}
}
-void
-Key_item::do_pre_processing()
-{
- if (default_b_)
- {
- bool transparent = (break_status_dir() != RIGHT);
- set_empty (transparent);
-
- if (transparent)
- set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- }
-}
*/
#include "staff-symbol.hh"
-#include "vertical-group-spanner.hh"
+#include "axis-group-spanner.hh"
#include "command-request.hh"
#include "bar.hh"
#include "debug.hh"
void
Line_group_engraver_group::create_line_spanner ()
{
- staffline_p_ = new Vertical_group_spanner ;
+ staffline_p_ = new Axis_group_spanner ;
+ staffline_p_->set_axes (Y_AXIS,Y_AXIS);
}
void
Paper_column::Paper_column()
{
+ set_axes (X_AXIS, X_AXIS);
+
line_l_=0;
rank_i_ = -1;
}
return j;
}
+
+Script_column::Script_column ()
+{
+ set_axes (X_AXIS,X_AXIS);
+}
+
void
Script_column::do_pre_processing()
{
Stem::Stem ()
{
beams_i_drul_[LEFT] = beams_i_drul_[RIGHT] = -1;
- mult_i_ = 0;
-
yextent_drul_[DOWN] = yextent_drul_[UP] = 0;
flag_i_ = 2;
dir_ = CENTER;
- stem_xdir_ = LEFT;
-
- beam_gap_i_ = 0;
beam_l_ = 0;
}
set_default_dir ();
/*
stems in unnatural (forced) direction should be shortened,
- accoding to [Roush & Gourlay]
+ according to [Roush & Gourlay]
*/
if (((int)chord_start_f ())
&& (dir_ != get_default_dir ()))
if (!stem_length_f ())
set_default_stemlen ();
-
- if (dir_ == UP)
- stem_xdir_ = RIGHT;
- if (invisible_b ())
- stem_xdir_ = CENTER;
}
-/*
- TODO
-
- move into note_column.cc
-
- */
void
Stem::set_noteheads ()
{
if (dir_ < 0)
head_l_arr_.reverse ();
- head_l_arr_[0]->extremal_i_ = -1;
- head_l_arr_.top ()->extremal_i_ = 1;
+ Note_head * beginhead = head_l_arr_[0];
+ beginhead->set_elt_property (extremal_scm_sym, SCM_BOOL_T);
+ if (beginhead != head_l_arr_.top ())
+ head_l_arr_.top ()->set_elt_property (extremal_scm_sym, SCM_BOOL_T);
+
int parity=1;
- int lastpos = head_l_arr_[0]->position_i_;
+ int lastpos = beginhead->position_i_;
for (int i=1; i < head_l_arr_.size (); i ++)
{
int dy =abs (lastpos- head_l_arr_[i]->position_i_);
if (dy <= 1)
{
if (parity)
- head_l_arr_[i]->x_dir_ = (stem_xdir_ == LEFT) ? LEFT : RIGHT;
+ head_l_arr_[i]->flip_around_stem (dir_);
parity = !parity;
}
else
Interval head_wid(0, head_l_arr_[0]->extent (X_AXIS).length ());
Real rule_thick(paper_l ()->rule_thickness ());
Interval stem_wid(-rule_thick/2, rule_thick/2);
- if (stem_xdir_ == CENTER)
+ if (dir_ == CENTER)
r = head_wid.center ();
else
- r = head_wid[stem_xdir_] - stem_wid[stem_xdir_];
+ r = head_wid[dir_] - stem_wid[dir_];
}
return r;
}
return note_delta_f () + Item::hpos_f ();
}
-/*
- TODO: head_l_arr_/rest_l_arr_ in
- */
void
Stem::do_substitute_element_pointer (Score_element*o,Score_element*n)
{
if (Note_head*h=dynamic_cast<Note_head*> (o))
- head_l_arr_.substitute (h, dynamic_cast<Note_head*>(n));
+ head_l_arr_.substitute (h, dynamic_cast<Note_head*>(n));
if (Rest *r=dynamic_cast<Rest*> (o))
rest_l_arr_.substitute (r, dynamic_cast<Rest*>(n));
if (Beam* b = dynamic_cast<Beam*> (o))
{
if (b == beam_l_)
- {
- beam_l_ = dynamic_cast<Beam*> (n);
- if (!beam_l_)
- {
- beams_i_drul_[LEFT] = 0;
- beams_i_drul_[RIGHT] = 0;
- mult_i_ = 0;
- }
- }
+ beam_l_ = dynamic_cast<Beam*> (n);
}
Staff_symbol_referencer::do_substitute_element_pointer (o,n);
-
}
Scalar padding = get_property ("textScriptPadding", 0);
if (padding.length_i() && padding.isnum_b ())
{
- ss->padding_f_ = Real(padding);
+ ss->set_elt_property (padding_scm_sym, gh_double2scm(Real(padding)));
}
Scalar empty = get_property ("textEmptyDimension", 0);
do
{
// tie attached to outer notehead
- if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_)
+ if (head_l_drul_[d]
+ && head_l_drul_[d]->remove_elt_property (extremal_scm_sym) != SCM_BOOL_F)
{
if (d == LEFT)
dx_f_drul_[d] += notewidth;