+.3.35.hwn1
+===========
+
+* textEmptyDimension changed into textNonEmpty, default: off,
+ie. texts don't occupy space.
+
+* Use STL map for Lookup::lookup_p_tab_p_
+
+* Abstracted Axis_group_element into Axis_group_interface, and removed
+Axis_group_element. This eliminates some multiple inheritance in the
+backend
+
1.3.35.jcn1
===========
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=35
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=36
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
#include "interval.hh"
#include "direction.hh"
#include "debug.hh"
-#include "hash-table-iter.hh"
#include "dimension-cache.hh"
+#include "axis-group-interface.hh"
/*
This callback is set in the children of the align element. It does
Align_element::add_element (Score_element* s)
{
s->add_offset_callback (alignment_callback, axis ());
- Axis_group_element::add_element (s);
+ axis_group (this).add_element (s);
}
/*
Array<Interval> dims;
Link_array<Score_element> elems;
- Link_array<Score_element> all_elts (elem_l_arr ());
+ Link_array<Score_element> all_elts
+ = Group_interface__extract_elements (this, (Score_element*) 0, "elements");
for (int i=0; i < all_elts.size(); i++)
{
Interval y = all_elts[i]->extent(a) + all_elts[i]->relative_coordinate (this, a);
void
Align_element::set_axis (Axis a)
{
- set_axes (a, a);
+ axis_group (this).set_axes (a, a);
}
-
-
-
-
-
+Align_element::Align_element ()
+{
+ axis_group (this).set_interface ();
+}
+++ /dev/null
-/*
- axis-group-element.cc -- implement Axis_group_element
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "axis-group-element.hh"
-#include "dimension-cache.hh"
-#include "group-interface.hh"
-
-Link_array<Score_element>
-Axis_group_element::elem_l_arr () const
-{
- return
- Group_interface__extract_elements (this, (Score_element*)0, "elements");
-}
-
-Link_array<Score_element>
-Axis_group_element::get_children ()
-{
- Link_array<Score_element> childs;
- Link_array<Score_element> elems = elem_l_arr ();
-
- for (int i=0; i < elems.size (); i++)
- {
- Score_element* e = elems[i];
- childs.push (e) ;
- Axis_group_element * axis_group= dynamic_cast <Axis_group_element *> (e);
- if (axis_group)
- childs.concat (axis_group->get_children ());
- }
-
- return childs;
-}
-
-Axis_group_element::Axis_group_element()
-{
- set_elt_property ("elements", SCM_EOL);
- set_elt_property ("transparent", SCM_BOOL_T);
-}
-
-void
-Axis_group_element::set_axes (Axis a1, Axis a2)
-{
- SCM ax = gh_cons (gh_int2scm (a1), SCM_EOL);
- if (a1 != a2)
- ax= gh_cons (gh_int2scm (a2), ax);
-
-
- set_elt_property ("axes", ax);
-
- if (a1 != X_AXIS && a2 != X_AXIS)
- set_empty (X_AXIS);
- if (a1 != Y_AXIS && a2 != Y_AXIS)
- set_empty (Y_AXIS);
-
- dim_cache_[a1]->set_callback(extent_callback);
- dim_cache_[a2]->set_callback (extent_callback);
-}
-
-Interval
-Axis_group_element::extent_callback (Dimension_cache const *c)
-{
- Axis a = c->axis ();
- Axis_group_element * me
- = dynamic_cast<Axis_group_element*> (c->element_l ());
-
- Interval r;
- for (SCM s = me->get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
- {
- SCM e=gh_car (s);
- Score_element * se = SMOB_TO_TYPE (Score_element, e);
-
- Interval dims = se->extent (a);
- if (!dims.empty_b ())
- r.unite (dims + se->relative_coordinate (me, a));
- }
-
- return r;
-}
-
-
-bool
-Axis_group_element::axis_b (Axis a )const
-{
- return dim_cache_[a]->extent_callback_l_ == extent_callback;
-}
-
-
-void
-Axis_group_element::add_element (Score_element *e)
-{
- used_b_ =true;
- e->used_b_ = true;
-
- for (SCM ax = get_elt_property ("axes"); ax != SCM_EOL ; ax = gh_cdr (ax))
- {
- Axis a = (Axis) gh_scm2int (gh_car (ax));
-
- if (!e->parent_l (a))
- e->set_parent (this, a);
- }
- Group_interface gi (this);
- gi.add_element (e);
-
- add_dependency (e);
-}
-
#include "axis-group-engraver.hh"
#include "axis-group-spanner.hh"
#include "paper-column.hh"
+#include "axis-group-interface.hh"
Axis_group_engraver::Axis_group_engraver ()
{
Axis_group_engraver::do_creation_processing ()
{
staffline_p_ = get_spanner_p ();
- staffline_p_->set_axes (Y_AXIS, Y_AXIS);
+ axis_group (staffline_p_).set_axes (Y_AXIS, Y_AXIS);
staffline_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
announce_element (Score_element_info (staffline_p_, 0));
}
/* UGH UGH UGH */
for (int i=0; i < elts_.size (); i++)
{
- if (!elts_[i]->parent_l (Y_AXIS))
- staffline_p_->add_element (elts_[i]);
- else
- if (
- // elts_[i]->get_elt_property ("Axis_group_element::add_extra_element") == SCM_UNDEFINED &&
- ! dynamic_cast<Axis_group_element*> (elts_[i]->parent_l (Y_AXIS)))
-
- {
- staffline_p_->add_element (elts_[i]);
- }
+ Score_element *par = elts_[i]->parent_l (Y_AXIS);
+ if (!par || !axis_group (par).has_interface_b ())
+ axis_group (staffline_p_).add_element (elts_[i]);
}
elts_.clear ();
}
--- /dev/null
+/*
+ axis-group-interface.cc -- implement Axis_group_interface
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "axis-group-interface.hh"
+#include "score-element.hh"
+#include "dimension-cache.hh"
+
+Axis_group_interface::Axis_group_interface (Score_element*s)
+ : Group_interface (s)
+{
+ elt_l_ = s;
+}
+
+Axis_group_interface
+axis_group (Score_element*s)
+{
+ return Axis_group_interface (s);
+}
+
+void
+Axis_group_interface::add_element (Score_element *e)
+{
+ elt_l_->used_b_ = true;
+ e->used_b_ = true;
+
+ for (SCM ax = elt_l_->get_elt_property ("axes"); ax != SCM_EOL ; ax = gh_cdr (ax))
+ {
+ Axis a = (Axis) gh_scm2int (gh_car (ax));
+
+ if (!e->parent_l (a))
+ e->set_parent (elt_l_, a);
+ }
+
+ Group_interface::add_element (e);
+
+ elt_l_->add_dependency (e);
+}
+
+
+bool
+Axis_group_interface::axis_b (Axis a )const
+{
+ return elt_l_->dim_cache_[a]->extent_callback_l_ == group_extent_callback;
+}
+
+Interval
+Axis_group_interface::group_extent_callback (Dimension_cache const *c)
+{
+ Axis a = c->axis ();
+ Score_element * me = c->element_l ();
+
+ Interval r;
+ for (SCM s = me->get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+ {
+ SCM e=gh_car (s);
+ Score_element * se = SMOB_TO_TYPE (Score_element, e);
+
+ Interval dims = se->extent (a);
+ if (!dims.empty_b ())
+ r.unite (dims + se->relative_coordinate (me, a));
+ }
+
+ return r;
+}
+
+
+void
+Axis_group_interface::set_interface ()
+{
+ if (!has_interface_b ())
+ {
+ elt_l_->set_elt_property ("elements", SCM_EOL);
+ elt_l_->set_elt_property ("transparent", SCM_BOOL_T);
+ elt_l_->set_elt_property ("axes" , SCM_EOL);
+ group (elt_l_, "interfaces").add_thing (ly_symbol2scm ("Axis_group"));
+ }
+}
+
+void
+Axis_group_interface::set_axes (Axis a1, Axis a2)
+{
+ // set_interface () ?
+
+ SCM ax = gh_cons (gh_int2scm (a1), SCM_EOL);
+ if (a1 != a2)
+ ax= gh_cons (gh_int2scm (a2), ax);
+
+
+ elt_l_->set_elt_property ("axes", ax);
+
+ if (a1 != X_AXIS && a2 != X_AXIS)
+ elt_l_->set_empty (X_AXIS);
+ if (a1 != Y_AXIS && a2 != Y_AXIS)
+ elt_l_->set_empty (Y_AXIS);
+
+ elt_l_->dim_cache_[a1]->set_callback (Axis_group_interface::group_extent_callback);
+ elt_l_->dim_cache_[a2]->set_callback (Axis_group_interface::group_extent_callback);
+}
+
+Link_array<Score_element>
+Axis_group_interface::get_children ()
+{
+ Link_array<Score_element> childs;
+ childs.push (elt_l_) ;
+
+ if (!has_interface_b ())
+ return childs;
+
+ for (SCM ep = elt_l_->get_elt_property ("elements"); gh_pair_p (ep); ep = gh_cdr (ep))
+ {
+ Score_element* e = unsmob_element (gh_car (ep));
+ if (e)
+ childs.concat (axis_group (e).get_children ());
+ }
+
+ return childs;
+}
+
+bool
+Axis_group_interface::has_interface_b ()
+{
+ SCM memq = scm_memq (ly_symbol2scm ("Axis_group"),
+ elt_l_->get_elt_property ("interfaces"));
+
+ return (memq != SCM_BOOL_F);
+}
+
+
--- /dev/null
+/*
+ axis-group-item.cc -- implement Axis_group_interface
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "axis-group-item.hh"
+#include "axis-group-interface.hh"
+
+Axis_group_item ::Axis_group_item ()
+{
+ axis_group (this).set_interface ();
+}
--- /dev/null
+/*
+ axis-group-spanner.cc -- implement Axis_group_spanner
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "axis-group-spanner.hh"
+#include "axis-group-interface.hh"
+
+Axis_group_spanner::Axis_group_spanner()
+{
+ axis_group (this).set_interface ();
+}
#include "protected-scm.hh"
#include "break-align-item.hh"
#include "axis-group-item.hh"
+#include "axis-group-interface.hh"
class Break_align_engraver : public Engraver
{
else
{
group = new Axis_group_item;
- group->set_axes (X_AXIS,X_AXIS);
+ axis_group(group).set_axes (X_AXIS,X_AXIS);
group->set_elt_property ("origin", name);
group->set_parent (align_l_, Y_AXIS);
announce_element (Score_element_info (group, 0));
column_alist_ = scm_assoc_set_x (column_alist_, name, group->self_scm_);
}
- group->add_element (item_l);
+ axis_group (group).add_element (item_l);
}
}
#include "paper-score.hh"
#include "paper-def.hh"
#include "paper-column.hh"
+#include "group-interface.hh"
/*
Handle spacing for prefatory matter.
Link_array<Score_element> elems;
- Link_array<Score_element> all_elems (elem_l_arr ());
+ Link_array<Score_element> all_elems
+ = Group_interface__extract_elements (this, (Score_element*)0,
+ "elements");
for (int i=0; i < all_elems.size(); i++)
{
#include "note-column.hh"
#include "note-head.hh"
#include "paper-def.hh"
+#include "axis-group-interface.hh"
+
Collision::Collision()
{
- set_axes (X_AXIS, Y_AXIS);
+ axis_group (this).set_axes (X_AXIS, Y_AXIS);
}
void
Collision::add_column (Note_column* ncol_l)
{
- add_element (ncol_l);
+ axis_group (this).add_element (ncol_l);
add_dependency (ncol_l);
}
#include "staff-symbol-referencer.hh"
#include "directional-element-interface.hh"
#include "side-position-interface.hh"
+#include "axis-group-interface.hh"
+
void
Dot_column::add_dots (Dots *d)
gi.add_element (d);
add_dependency (d);
- add_element (d);
+ axis_group (this).add_element (d);
}
void
gi.set_interface ();
directional_element (this).set (RIGHT);
- set_axes(X_AXIS,X_AXIS);
+ axis_group (this).set_axes(X_AXIS,X_AXIS);
}
/*
#include "paper-column.hh"
#include "dimension-cache.hh"
#include "side-position-interface.hh"
+#include "axis-group-interface.hh"
+
class Grace_position_engraver:public Engraver
{
warning (_("Unattached grace notes. Attaching to last musical column."));
align_l_->set_parent (0, X_AXIS);
- last_musical_col_l_->add_element (align_l_);
+ axis_group(last_musical_col_l_).add_element (align_l_);
}
last_musical_col_l_ = get_staff_info ().musical_pcol_l ();
Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "axis-group-interface.hh"
#include "hara-kiri-vertical-group-spanner.hh"
#include "debug.hh"
#include "item.hh"
Hara_kiri_group_spanner::Hara_kiri_group_spanner()
{
set_elt_property ("items-worth-living", SCM_EOL);
- set_axes(Y_AXIS,Y_AXIS);
+ axis_group (this).set_axes(Y_AXIS,Y_AXIS);
}
void
if (gh_pair_p (worth))
return;
- Link_array<Score_element> childs = get_children ();
+ Link_array<Score_element> childs = axis_group (this).get_children ();
for (int i = 0; i < childs.size (); i++)
{
Score_element* s = childs[i];
#ifndef VERTICAL_ALIGN_ITEM_HH
#define VERTICAL_ALIGN_ITEM_HH
-#include "axis-group-element.hh"
-#include "interval.hh"
-#include "direction.hh"
-#include "axes.hh"
-#include "hash-table.hh"
+#include "score-element.hh"
/**
Order elements top to bottom/left to right/right to left etc..
*/
-class Align_element : public virtual Axis_group_element {
+class Align_element : public virtual Score_element {
public:
Axis axis () const;
+ Align_element ();
void set_axis (Axis);
int get_count (Score_element*)const;
void add_element (Score_element *);
+++ /dev/null
-/*
- axis-group-element.hh -- declare Axis_group_element
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef AXIS_GROUP_ELEMENT_HH
-#define AXIS_GROUP_ELEMENT_HH
-
-#include "score-element.hh"
-
-
-/**
- Treat a group of elements a unity in either or both axis sense .
- This is a wrapper around Axis_group_administration
-
- FIXME: remove this class, and make interface of it, so we can remove multiple inheritance.
-*/
-class Axis_group_element : public virtual Score_element
-{
-protected:
- virtual Link_array<Score_element> elem_l_arr() const;
- static Interval extent_callback (Dimension_cache const*);
-
-public:
- void add_element (Score_element*);
- bool axis_b (Axis) const;
- Axis_group_element ();
- void set_axes (Axis,Axis);
-
- Link_array<Score_element> get_children ();
-};
-
-#endif // AXIS_GROUP_ELEMENT_HH
--- /dev/null
+/*
+ axis-group-interface.hh -- declare Axis_group_interface
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef AXIS_GROUP_INTERFACE_HH
+#define AXIS_GROUP_INTERFACE_HH
+
+#include "group-interface.hh"
+
+struct Axis_group_interface : Group_interface
+{
+ Axis_group_interface (Score_element*);
+ static Interval group_extent_callback (Dimension_cache const*);
+ void add_element (Score_element*);
+ void set_axes (Axis,Axis);
+ bool axis_b (Axis)const;
+ Link_array<Score_element> get_children ();
+ bool has_interface_b ();
+ void set_interface ();
+};
+
+Axis_group_interface
+axis_group (Score_element*);
+
+#endif /* AXIS_GROUP_INTERFACE_HH */
+
#ifndef AXIS_ITEM_HH
#define AXIS_ITEM_HH
-#include "axis-group-element.hh"
#include "item.hh"
-/**
- A grouping item. Its special support is in do_breakable_col_processing().
- */
-class Axis_group_item : public virtual Axis_group_element, public virtual Item
+class Axis_group_item : public virtual Item
{
public:
+ Axis_group_item ();
VIRTUAL_COPY_CONS(Score_element);
};
#define AXIS_GROUP_SPANNER_HH
#include "spanner.hh"
-#include "axis-group-element.hh"
/**
An element which groups a line in a certain direction. The most
useful example of this is the Vertical_group_spanner
*/
-class Axis_group_spanner : public virtual Axis_group_element,
- public virtual Spanner
+class Axis_group_spanner : public virtual Spanner
{
public:
+ Axis_group_spanner ();
VIRTUAL_COPY_CONS(Score_element);
};
*/
class Music:public Input {
public:
-
-
virtual Musical_pitch to_relative_octave (Musical_pitch);
/// The duration of this piece of music
#ifndef PAPER_DEF_HH
#define PAPER_DEF_HH
+
+#include <map>
+
#include "lily-proto.hh"
#include "lily-guile.hh"
#include "real.hh"
*/
class Paper_def : public Music_output_def
{
- Hash_table<int, Lookup *> *lookup_p_tab_p_;
+ map<int, Lookup *> *lookup_p_tab_p_;
static int default_count_i_;
protected:
#include "debug.hh"
#include "line-group-group-engraver.hh"
#include "paper-column.hh"
+#include "axis-group-interface.hh"
+
Line_group_engraver_group::Line_group_engraver_group()
{
Line_group_engraver_group::typeset_element (Score_element *elem)
{
if (!elem->parent_l (Y_AXIS))
- staffline_p_->add_element (elem);
+ axis_group (staffline_p_).add_element (elem);
Engraver_group_engraver::typeset_element (elem);
}
Line_group_engraver_group::create_line_spanner ()
{
staffline_p_ = new Axis_group_spanner ;
- staffline_p_->set_axes (Y_AXIS,Y_AXIS);
+ axis_group (staffline_p_).set_axes (Y_AXIS,Y_AXIS);
}
#include "warn.hh"
#include "main.hh"
#include "debug.hh"
+#include "axis-group-interface.hh"
+
Line_of_score::Line_of_score()
{
set_elt_property ("columns", SCM_EOL);
- set_axes (Y_AXIS,X_AXIS);
+ axis_group (this).set_axes (Y_AXIS,X_AXIS);
}
{
set_elt_property ("columns",
gh_cons (p->self_scm_, get_elt_property ("columns")));
- add_element (p);
+ axis_group (this).add_element (p);
}
void
*/
#include <math.h> // ceil
-
+#include "axis-group-interface.hh"
#include "dot-column.hh"
#include "note-column.hh"
#include "beam.hh"
{
set_elt_property ("rests", SCM_EOL);
set_elt_property ("note-heads", SCM_EOL);
- set_axes (X_AXIS, Y_AXIS);
+ axis_group (this).set_axes (X_AXIS, Y_AXIS);
}
Stem *
set_elt_property ("stem", stem_l->self_scm_);
add_dependency (stem_l);
- add_element (stem_l);
+ axis_group (this).add_element (stem_l);
}
Group_interface gi (this, "note-heads");
gi.add_element (nh);
}
- add_element (h);
+ axis_group (this).add_element (h);
}
/**
void
Note_column::set_dotcol (Dot_column *d)
{
- add_element (d);
+ axis_group (this).add_element (d);
}
/*
#include "paper-column.hh"
#include "paper-score.hh"
#include "debug.hh"
+#include "axis-group-interface.hh"
void
Paper_column::add_rod (Paper_column * p, Real d)
scm_unprotect_object (when);
set_elt_property ("when", when);
- set_axes (X_AXIS, X_AXIS);
+ axis_group (this).set_axes (X_AXIS, X_AXIS);
line_l_=0;
rank_i_ = -1;
*/
#include <math.h>
+
#include "all-font-metrics.hh"
#include "string.hh"
#include "misc.hh"
Paper_def::Paper_def ()
{
- lookup_p_tab_p_ = new Hash_table<int, Lookup*>;
- lookup_p_tab_p_->hash_func_ = int_hash;
+ lookup_p_tab_p_ = new map<int, Lookup*>;
}
Paper_def::~Paper_def ()
{
- for (Hash_table_iter<int, Lookup*> ai(*lookup_p_tab_p_); ai.ok (); ai++)
+ for (map<int,Lookup*>::const_iterator ai = lookup_p_tab_p_->begin();
+ ai != lookup_p_tab_p_->end (); ai++)
{
- delete ai.val ();
+ delete (*ai).second;
}
delete lookup_p_tab_p_;
: Music_output_def (s)
{
shape_int_a_ = s.shape_int_a_;
- lookup_p_tab_p_ = new Hash_table<int, Lookup*>;
- lookup_p_tab_p_->hash_func_ = int_hash;
+ lookup_p_tab_p_ = new map<int, Lookup*>;
- for (Hash_table_iter<int, Lookup*> ai(*s.lookup_p_tab_p_); ai.ok (); ai++)
+ for (map<int,Lookup*>::const_iterator ai = s.lookup_p_tab_p_->begin();
+ ai != s.lookup_p_tab_p_->end (); ai++)
{
- Lookup * l = new Lookup (*ai.val ());
- set_lookup (ai.key(), l);
+ Lookup * l = new Lookup (* (*ai).second);
+ set_lookup ((*ai).first, l);
}
}
void
Paper_def::set_lookup (int i, Lookup*l)
{
- if (lookup_p_tab_p_->elem_b (i))
+ map<int,Lookup*> :: const_iterator it (lookup_p_tab_p_->find (i));
+ if (it != lookup_p_tab_p_->end ())
{
- delete lookup_p_tab_p_->elem (i);
+ delete (*it).second;
}
(*lookup_p_tab_p_)[i] = l;
}
#ifndef NPRINT
Music_output_def::print ();
DEBUG_OUT << "Paper {";
- for (Hash_table_iter<int, Lookup*> ai(*lookup_p_tab_p_); ai.ok (); ai++)
+ for (map<int,Lookup*>::const_iterator ai = lookup_p_tab_p_->begin();
+ ai != lookup_p_tab_p_->end (); ai++)
{
- DEBUG_OUT << "Lookup: " << ai.key () << " = " << ai.val ()->font_name_ << '\n';
+ DEBUG_OUT << "Lookup: " << (*ai).first
+ << " = " << (*ai).second->font_name_ << '\n';
}
DEBUG_OUT << "}\n";
#endif
#include "lookup.hh"
#include "rest.hh"
#include "dots.hh"
-#include "axis-group-element.hh"
#include "paper-score.hh"
#include "staff-symbol-referencer.hh"
#include "lookup.hh"
#include "rest.hh"
#include "dots.hh"
-#include "axis-group-element.hh"
#include "paper-score.hh"
#include "stem.hh"
#include "staff-symbol-referencer.hh"
#include "hash-table-iter.hh"
-#ifdef usestl
-
-
Scheme_hash_table::Scheme_hash_table ()
{
self_scm_ = SCM_EOL;
IMPLEMENT_UNSMOB(Scheme_hash_table,scheme_hash);
IMPLEMENT_SMOBS(Scheme_hash_table);
-#else
-Scheme_hash_table::Scheme_hash_table ()
-{
- hash_func_ = ly_scm_hash;
- self_scm_ = SCM_EOL;
- smobify_self ();
-}
-
-void
-Scheme_hash_table::operator =(Scheme_hash_table const & src)
-{
- Hash_table<SCM,SCM>::operator = (src);
-
- // we do not copy the self_scm_ field!
-}
-
-void
-Scheme_hash_table::do_smobify_self ()
-{
-}
-
-SCM
-Scheme_hash_table::mark_smob (SCM s)
-{
- /*
- can't typecheck naively, since GC bit lives in CAR of S
- */
- //assert (SMOB_IS_TYPE_B (Scheme_hash_table, s));
-
- Scheme_hash_table *me = SMOB_TO_TYPE(Scheme_hash_table,s);
- for (Hash_table_iter<SCM,SCM> i (*me); i.ok(); i++)
- {
- scm_gc_mark (i.key());
- scm_gc_mark (i.val ());
- }
- return SCM_EOL;
-}
-
-
-Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
- : Hash_table<SCM,SCM> (src)
-{
- hash_func_ = src.hash_func_;
- self_scm_ = SCM_EOL;
- smobify_self ();
-}
-
-int
-Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state*)
-{
- assert (SMOB_IS_TYPE_B (Scheme_hash_table, s));
- char str[1000];
- sprintf (str, "#<Scheme_hash_table 0x%0x ", s);
- scm_puts (str, p);
- Scheme_hash_table *me = SMOB_TO_TYPE(Scheme_hash_table,s);
- for (Hash_table_iter<SCM,SCM> i (*me); i.ok(); i++)
- {
- scm_display (i.key(), p);
- scm_puts (" = ",p);
- scm_display (i.val (), p);
- scm_puts ("\n",p);
- }
- scm_puts ("> ",p);
- return 1;
-}
-
-
-void
-Scheme_hash_table::set (SCM k, SCM v)
-{
- elem (k ) = v;
- scm_unprotect_object (v);
-}
-
-SCM
-Scheme_hash_table::get (SCM k)const
-{
- return const_elem (k);
-}
-
-
-Scheme_hash_table::~Scheme_hash_table( )
-{
- unsmobify_self ();
-}
-
-SCM
-Scheme_hash_table::to_alist () const
-{
- SCM l = SCM_EOL;
- for (Hash_table_iter<SCM,SCM> i (*this); i.ok(); i++)
- l = gh_cons (gh_cons (i.key (), i.val()), l);
- return l;
-}
-
-
-#include "ly-smobs.icc"
-IMPLEMENT_UNSMOB(Scheme_hash_table,scheme_hash);
-IMPLEMENT_SMOBS(Scheme_hash_table);
-#endif
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+
#include "debug.hh"
#include "dimension-cache.hh"
#include "line-of-score.hh"
#include "paper-column.hh"
#include "command-request.hh"
#include "paper-def.hh"
+#include "axis-group-interface.hh"
Score_engraver::Score_engraver()
{
if (!elem_p->parent_l (X_AXIS))
{
bool br = to_boolean (elem_p->remove_elt_property ("breakable"));
- if (br)
- command_column_l_->add_element(elem_p);
- else
- musical_column_l_->add_element(elem_p);
+ Axis_group_interface gi ((br) ? command_column_l_ : musical_column_l_) ;
+ gi.add_element(elem_p);
}
}
if (!elem_p->parent_l(Y_AXIS))
- scoreline_l_->add_element (elem_p);
+ axis_group (scoreline_l_).add_element (elem_p);
}
elem_p_arr_.clear();
}
if (r->style_str_.length_i ())
text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
- SCM empty = get_property ("textEmptyDimension");
- if (to_boolean (empty))
- {
- text->set_empty (X_AXIS);
- }
+ SCM empty = get_property ("textNonEmpty");
+ if (!to_boolean (empty))
+ text->set_empty (X_AXIS);
announce_element (Score_element_info (text, r));
texts_.push (text);
#include "axis-align-spanner.hh"
#include "axis-group-spanner.hh"
#include "span-bar.hh"
+#include "axis-group-interface.hh"
Vertical_align_engraver::Vertical_align_engraver()
{
{
int sz = i.origin_trans_l_arr ((Translator*)this).size() ;
- Axis_group_element * elt = dynamic_cast<Axis_group_element *> (i.elem_l_);
- return sz > 1 && elt && !elt->parent_l (Y_AXIS) && elt->axis_b (Y_AXIS);
+ Axis_group_interface agi(i.elem_l_);
+
+ return sz > 1 && agi.has_interface_b ()
+ && !i.elem_l_->parent_l (Y_AXIS) && agi.axis_b (Y_AXIS);
}
void
Begin3
Title: LilyPond
-Version: 1.3.35
-Entered-date: 16MAR00
+Version: 1.3.36
+Entered-date: 17MAR00
Description:
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.35.tar.gz
+ 1000k lilypond-1.3.36.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.35.tar.gz
+ 1000k lilypond-1.3.36.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.35
+Version: 1.3.36
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.35.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.36.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# get Packager from (undocumented?) ~/.rpmmacros!
conversions.append ((1,3,18), conv, 'staffLineLeading -> staffSpace')
+if 1:
+ def conv (str):
+ str = re.sub ('textEmptyDimension *= *##t',
+ 'textNonEmpty = ##f',
+ str)
+ str = re.sub ('textEmptyDimension *= *##f',
+ 'textNonEmpty = ##t',
+ str)
+ return str
+
+ conversions.append ((1,3,35), conv, 'textEmptyDimension -> textNonEmpty')
+
############################