Fix type predicates/docstrings for two music properties.
[lilypond/mpolesky.git] / lily / include / item.hh
blob8f5dd180f09e2fea4a725206114e6d2c47249272
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2010 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/>.
19 #ifndef ITEM_HH
20 #define ITEM_HH
22 #include "grob.hh"
24 /**
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);
35 public:
36 Item (SCM);
37 Item (Item const &);
39 virtual Grob *clone () const;
41 static bool is_non_musical (Grob *);
42 static bool break_visible(Grob *);
43 static bool less (Grob * const&, Grob * const&);
44 bool is_broken () const;
45 bool pure_is_visible (int start, int end) const;
47 Direction break_status_dir () const;
49 Item *find_prebroken_piece (Direction) const;
50 Grob *find_broken_piece (System *) const;
51 virtual System *get_system () const;
52 virtual Paper_column *get_column () const;
53 virtual void handle_prebroken_dependencies ();
54 virtual Interval_t<int> spanned_rank_interval () const;
55 virtual Interval pure_height (Grob *ref, int start, int end);
56 DECLARE_GROB_INTERFACE();
57 protected:
58 virtual void discretionary_processing ();
59 void copy_breakable_items ();
60 virtual void derived_mark () const;
62 bool cached_pure_height_valid_;
63 Interval cached_pure_height_;
66 Interval_t<Moment> spanned_time_interval (Item *l, Item *r);
68 #endif