dist.
* lily/tuplet-bracket.cc: check columns of bounds, not bounds
themselves.
+2005-10-14 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * make/lilypond.fedora.spec.in (Group): add lilypond-internals to
+ dist.
+
+ * lily/tuplet-bracket.cc: check columns of bounds, not bounds
+ themselves.
+
+2005-10-12 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * flower/include/virtual-methods.hh (VIRTUAL_COPY_CONSTRUCTOR):
+ add class_name() method.
+
+ * lily/music-scheme.cc: remove ly:music-name.
+
2005-10-11 Jan Nieuwenhuizen <janneke@gnu.org>
* cygwin/postinstall-lilypond.sh: Remove cruft.
2005-10-11 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * ly/titling-init.ly (evenHeaderMarkup): use space in header on
+ even header too.6
+
+ * scm/define-markup-commands.scm (wordwrap-string): bugfix for
+ MacOS 9 users.
+
* lily/hara-kiri-group-spanner.cc (consider_suicide): only
consider break index for broken spanner.
VIRTUAL_COPY_CONSTRUCTOR (Baseclass, Foo);
}; */
+#define DECLARE_CLASSNAME(name) \
+ virtual const char *class_name () const { \
+ return #name; \
+}
+
#define VIRTUAL_COPY_CONSTRUCTOR(Base, name) \
+ DECLARE_CLASSNAME(name);\
virtual Base *clone () const \
{ \
return new name (*this); \
char const *
Audio_element::name () const
{
- return classname (this);
+ return this->class_name ();
}
Context *sc = (Context *) SCM_CELL_WORD_1 (s);
scm_puts ("#<", port);
- scm_puts (classname (sc), port);
+ scm_puts (sc->class_name (), port);
if (Context_def *d = unsmob_context_def (sc->definition_))
{
scm_puts (" ", port);
{
Font_metric *m = unsmob_metrics (s);
scm_puts ("#<", port);
- scm_puts (classname (m), port);
+ scm_puts (m->class_name (), port);
scm_puts (" ", port);
scm_write (m->description_, port);
scm_puts (">", port);
SCM meta = get_property ("meta");
SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
nm = (scm_is_pair (nm)) ? scm_cdr (nm) : SCM_EOL;
- return scm_is_symbol (nm) ? ly_symbol2string (nm) : classname (this);
+ return scm_is_symbol (nm) ? ly_symbol2string (nm) : this->class_name ();
}
void
-
/*
afm.hh -- declare Adobe_font_metric
class Adobe_font_metric : public Simple_font_metric
{
+ DECLARE_CLASSNAME(Adobe_font_metric);
public:
AFM_Font_info *font_info_;
unsigned int checksum_;
public:
Audio_element ();
virtual ~Audio_element ();
+ VIRTUAL_COPY_CONSTRUCTOR(Audio_element,Audio_element);
virtual char const *name () const;
protected:
};
#include "moment.hh"
#include "lily-proto.hh"
+#include "virtual-methods.hh"
class Context
{
Context (Context const &src);
DECLARE_SMOBS (Context, dummy);
-
+ DECLARE_CLASSNAME(Context);
void terminate ();
private:
#include "box.hh"
#include "lily-proto.hh"
#include "smobs.hh"
+#include "virtual-methods.hh"
class Font_metric
{
+ DECLARE_CLASSNAME(Font_metric);
+
public:
SCM description_;
String file_name_;
class Simple_font_metric : public Font_metric
{
+ DECLARE_CLASSNAME(Simple_font_metric);
public:
};
PQueue<Moment> extra_mom_pq_;
Output_def *output_def_;
+ DECLARE_CLASSNAME(Global_context);
+
friend class Output_def;
public:
Global_context (Output_def *, Moment final, Object_key *key);
void substitute_object_links (SCM, SCM);
char status_;
+ DECLARE_CLASSNAME(Grob);
public:
Object_key const *get_key () const;
virtual Grob *clone (int count) const;
DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
-
+
String name () const;
/*
Properties
{
Drul_array<Item *> broken_to_drul_;
+ DECLARE_CLASSNAME(Item);
public:
Item (SCM, Object_key const *);
Item (Item const &, int count);
Index_to_charcode_map index_to_charcode_map_;
Open_type_font (FT_Face);
+ DECLARE_CLASSNAME(Open_type_font);
public:
SCM get_subfonts () const;
SCM get_global_table () const;
Drul_array<Item *> spanned_drul_;
int break_index_;
+ DECLARE_CLASSNAME(Spanner);
+
public:
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
class Tex_font_metric : public Simple_font_metric
{
+ DECLARE_CLASSNAME(Tex_font_metric);
public:
static SCM make_tfm (String file_name);
char const *
Midi_item::name () const
{
- return classname (this);
+ return this->class_name ();
}
char s[1000];
Music_iterator *iter = unsmob_iterator (sm);
- sprintf (s, "#<%s>", classname (iter));
+ sprintf (s, "#<%s>", iter->class_name ());
scm_puts (s, port);
return 1;
}
{
Music_output *sc = (Music_output *) SCM_CELL_WORD_1 (s);
scm_puts ("#<", p);
- scm_puts (classname (sc), p);
+ scm_puts (sc->class_name (), p);
scm_puts (">", p);
return 1;
return SCM_UNSPECIFIED;
}
-LY_DEFINE (ly_music_name, "ly:music-name",
- 1, 0, 0, (SCM mus),
- "Return the name of @var{music}.")
-{
- Music *m = unsmob_music (mus);
- SCM_ASSERT_TYPE (m, mus, SCM_ARG1, __FUNCTION__, "music");
-
- char const *nm = classname (m);
- return scm_makfrom0str (nm);
-}
/* todo: property args */
LY_DEFINE (ly_make_music, "ly:make-music",
if (scm_is_symbol (nm))
return ly_symbol2string (nm);
else
- return classname (this);
+ return "Music";
}
Music::Music (SCM init)
if (scm_is_symbol (nm) || scm_is_string (nm))
scm_display (nm, p);
else
- scm_puts (classname (m), p);
+ scm_puts ("Music", p);
/* Printing properties takes a lot of time, especially during backtraces.
For inspecting, it is better to explicitly use an inspection
{
Output_def * def = unsmob_output_def (s);
scm_puts ("#< ", p);
- scm_puts (classname (def), p);
+ scm_puts (def->class_name (), p);
(void)def;
scm_puts (">", p);
bool accepted = try_music (get_music ());
if (!accepted)
get_music ()->origin ()->warning (_f ("junking event: `%s'",
- classname (get_music ())));
+ get_music (->class_name ())));
}
Simple_music_iterator::process (m);
}
Paper_book *b = (Paper_book *) SCM_CELL_WORD_1 (smob);
scm_puts ("#<", port);
- scm_puts (classname (b), port);
+ scm_puts (b->class_name (), port);
scm_puts (" ", port);
scm_puts (">", port);
return 1;
{
Paper_system *p = (Paper_system *) SCM_CELL_WORD_1 (smob);
scm_puts ("#<", port);
- scm_puts (classname (p), port);
+ scm_puts ("Paper_system", port);
scm_display (p->mutable_property_alist_, port);
scm_display (p->immutable_property_alist_, port);
if (!global_translator_dict)
global_translator_dict = new Scheme_hash_table;
- SCM k = ly_symbol2scm (classname (t));
+ SCM k = ly_symbol2scm (t->class_name ());
global_translator_dict->set (k, t->self_scm ());
t->unprotect ();
{
Translator_group *me = (Translator_group *) SCM_CELL_WORD_1 (s);
scm_puts ("#<Translator_group ", port);
- scm_puts (classname (me), port);
+ scm_puts (me->class_name (), port);
scm_display (me->simple_trans_list_, port);
scm_puts (" >", port);
return 1;
{
Translator *tr = unsmob_translator (trans);
SCM_ASSERT_TYPE (tr, trans, SCM_ARG1, __FUNCTION__, "Translator");
- char const *nm = classname (tr);
+ char const *nm = tr->class_name ();
return ly_symbol2scm (nm);
}
{
Translator *me = (Translator *) SCM_CELL_WORD_1 (s);
scm_puts ("#<Translator ", port);
- scm_puts (classname (me), port);
+ scm_puts (me->class_name (), port);
scm_puts (" >", port);
return 1;
}
|| me->get_bound (RIGHT)->break_status_dir ())
return 0;
- Grob *s1 = Note_column::get_stem (cols[0]);
- Grob *s2 = Note_column::get_stem (cols.top ());
+ Drul_array<Grob*> stems (Note_column::get_stem (cols[0]),
+ Note_column::get_stem (cols.top ()));
- if (s2 != me->get_bound (RIGHT))
+ if (dynamic_cast<Item*> (stems[RIGHT])->get_column ()
+ != me->get_bound (RIGHT)->get_column())
return 0;
- Grob *b1 = s1 ? Stem::get_beam (s1) : 0;
- Grob *b2 = s2 ? Stem::get_beam (s2) : 0;
-
+ Drul_array<Grob*> beams;
+ Direction d = LEFT;
+ do {
+ beams[d] = stems[d] ? Stem::get_beam (stems[d]) : 0;
+ } while (flip (&d) != LEFT);
+
*equally_long = false;
- if (! (b1 && (b1 == b2) && !me->is_broken ()))
+ if (! (beams[LEFT] && (beams[LEFT] == beams[RIGHT]) && !me->is_broken ()))
return 0;
- extract_grob_set (b1, "stems", beam_stems);
+ extract_grob_set (beams[LEFT], "stems", beam_stems);
if (beam_stems.size () == 0)
{
programming_error ("beam under tuplet bracket has no stems");
return 0;
}
- *equally_long = (beam_stems[0] == s1 && beam_stems.top () == s2);
- return b1;
+ *equally_long = (beam_stems[0] == stems[LEFT] && beam_stems.top () == stems[RIGHT]);
+ return beams[LEFT];
}
/*
bool equally_long = false;
Grob *par_beam = parallel_beam (me, columns, &equally_long);
-
Spanner *sp = dynamic_cast<Spanner *> (me);
bool bracket_visibility = !(par_beam && equally_long);
\fill-line {
\on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
\on-the-fly #not-first-page \fromproperty #'header:instrument
- ""
+ " "
}
oddFooterMarkup = \markup {
touch /tmp/.lilypond-install
%if %{info}
-/sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir
-/sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir
+ /sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir
+ /sbin/install-info %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir
+ /sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir
%endif
export PACKAGEDIR=%{_datadir}/lilypond/@TOPLEVEL_VERSION@
%if %{info}
/sbin/install-info --delete %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir
+ /sbin/install-info --delete %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir
/sbin/install-info --delete %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir
%endif
ly:music-length
ly:music-list?
ly:music-mutable-properties
- ly:music-name
ly:music-property
ly:make-score
ly:music-set-property!