2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
25 A horizontally fixed size element of the score.
27 Item is the datastructure for printables whose width is known
28 before the spacing is calculated
30 class Item : public Grob
32 Drul_array<Item *> broken_to_drul_;
34 DECLARE_CLASSNAME (Item);
39 static Item *unsmob (SCM g) {
40 return dynamic_cast <Item *> (Grob::unsmob (g));
42 static bool is_smob (SCM g) {
43 return Grob::is_smob (g) && unsmob (g);
46 virtual Grob *clone () const;
48 static bool is_non_musical (Grob *);
49 static bool break_visible (Grob *);
51 bool is_broken () const;
52 virtual bool pure_is_visible (int start, int end) const;
54 Direction break_status_dir () const;
56 Item *find_prebroken_piece (Direction) const;
57 Grob *find_broken_piece (System *) const;
58 virtual System *get_system () const;
59 virtual Paper_column *get_column () const;
60 virtual void handle_prebroken_dependencies ();
61 virtual Interval_t<int> spanned_rank_interval () const;
62 virtual Interval pure_height (Grob *ref, int start, int end);
63 virtual void cache_pure_height (Interval height);
64 DECLARE_GROB_INTERFACE ();
66 virtual void discretionary_processing ();
67 void copy_breakable_items ();
68 virtual void derived_mark () const;
70 bool cached_pure_height_valid_;
71 Interval cached_pure_height_;
74 Interval_t<Moment> spanned_time_interval (Item *l, Item *r);