source file of the GNU LilyPond music typesetter
- (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include <math.h>
}
return Molecule ();
}
-
+
+
+MAKE_SCHEME_CALLBACK(Text_item,text_to_molecule,3);
+SCM
+Text_item::text_to_molecule (SCM grob, SCM props, SCM markup)
+{
+ Grob *me = unsmob_grob (grob);
+
+ return Text_item::text2molecule (me, markup, props).smobbed_copy();
+}
+
+
Molecule
Text_item::string2molecule (Grob *me, SCM text, SCM alist_chain)
{
Molecule m;
m.set_empty (false);
mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (space)
- * Staff_symbol_referencer::staff_space (me));
+ * Staff_symbol_referencer::staff_space (me), 0);
}
return mol.smobbed_copy ();
}
ADD_INTERFACE (Text_item,"text-interface",
- "A scheme markup text",
- "text axis baseline-skip extent lookup raise kern word-space");
+ "A scheme markup text, see @ref{Markup functions}.",
+ "text baseline-skip word-space");
+
+
+/*
+ Ugh. Duplicated from Scheme.
+ */
+bool
+new_markup_p (SCM x)
+{
+ return
+ gh_string_p (x) ||
+ (gh_pair_p (x)
+ && SCM_BOOL_F != scm_object_property (gh_car (x), ly_symbol2scm ("markup-signature")));
+}
+
+SCM
+new_markup_brewer ()
+{
+ static SCM proc ;
+
+ if (!proc)
+ proc = scm_c_eval_string ("brew-new-markup-molecule");
+
+ return proc;
+}