source file of the GNU LilyPond music typesetter
- (c) 2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2006--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "font-interface.hh"
#include "spanner.hh"
#include "stencil.hh"
+#include "item.hh"
class System_start_text
{
public:
static Stencil get_stencil (Grob *);
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
};
{
Spanner *me = unsmob_spanner (smob);
- extract_grob_set (me, "elements", elts);
+ if (!me->get_bound (LEFT)->break_status_dir ())
+ {
+ me->suicide ();
+ return SCM_EOL;
+ }
+
+ extract_grob_set (me, "elements", all_elts);
+ vector<Grob*> elts;
+ for (vsize i = 0; i < all_elts.size (); i++)
+ if (all_elts[i]->is_live ())
+ elts.push_back (all_elts[i]);
+
+ if (!elts.size ())
+ {
+ me->suicide ();
+ return SCM_EOL;
+ }
+
Grob *common = common_refpoint_of_array (elts, me, Y_AXIS);
Interval ext;
}
Stencil m = get_stencil (me);
- m.translate_axis (ext.center (), Y_AXIS);
+ if (!ext.is_empty ())
+ m.translate_axis (ext.center (), Y_AXIS);
return m.smobbed_copy ();
}
ADD_INTERFACE (System_start_text,
- "system-start-text-interface",
"Text in front of the system.",
/* properties */