/*
- span-bar.hh -- declare Span_bar
+ This file is part of LilyPond, the GNU music typesetter.
- source file of the GNU LilyPond music typesetter
+ Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
#ifndef SPAN_BAR_HH
#define SPAN_BAR_HH
-#include "bar.hh"
+#include "lily-proto.hh"
+#include "grob-interface.hh"
/**
This is a barline that is spanned across other bar lines. This is
the implementation of the long barlines that occur in orchestral
score and other multi-staff music.
-
- TODO: Is this usable for other stuff besides barlines? We only have
- to span a Score_element. Perhaps this can be used for large time
- sigs?
*/
-class Span_bar : public Bar
+class Span_bar
{
- Link_array<Score_element> spanning_l_arr_;
- Interval get_spanned_interval () const;
public:
- Real extra_x_off_;
- bool no_width_b_;
- Span_bar();
-
- VIRTUAL_COPY_CONS(Score_element);
- void add_bar (Score_element*);
- void set_align (Align_element *);
-protected:
- void evaluate_empty ();
- virtual Interval do_width() const;
- virtual void do_pre_processing();
- virtual void do_post_processing();
- virtual Interval do_height () const;
- virtual void do_substitute_element_pointer (Score_element*,Score_element*);
- virtual Molecule * do_brew_molecule_p() const;
+
+ DECLARE_GROB_INTERFACE();
+ static Interval get_spanned_interval (Grob *);
+ static void add_bar (Grob *, Grob *);
+ static void evaluate_glyph (Grob *);
+ DECLARE_SCHEME_CALLBACK (width, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_glyph_name, (SCM));
+ DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
+ DECLARE_SCHEME_CALLBACK (center_on_spanned_callback, (SCM element));
};
#endif // SPAN_BAR_HH