]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/side-position-interface.hh
e7c1637471bdbedf4052acf45f73400d92a2704d
[lilypond.git] / lily / include / side-position-interface.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1999--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
5
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.
10
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.
15
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/>.
18 */
19
20 #ifndef SIDE_POSITION_INTERFACE_HH
21 #define SIDE_POSITION_INTERFACE_HH
22
23 #include "grob-interface.hh"
24 #include "lily-proto.hh"
25
26 /*
27   TODO: move out unrelated callbacks.
28
29   TODO: reduce number of methods.
30 */
31 struct Side_position_interface
32 {
33 public:
34
35   DECLARE_SCHEME_CALLBACK (y_aligned_on_support_refpoints, (SCM element));
36   DECLARE_SCHEME_CALLBACK (pure_y_aligned_on_support_refpoints, (SCM element, SCM start, SCM end));
37   DECLARE_SCHEME_CALLBACK (x_aligned_side, (SCM element, SCM current));
38   DECLARE_SCHEME_CALLBACK (y_aligned_side, (SCM element, SCM current));
39   DECLARE_SCHEME_CALLBACK (pure_y_aligned_side, (SCM element, SCM start, SCM end, SCM current));
40   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM element));
41   DECLARE_SCHEME_CALLBACK (move_to_extremal_staff, (SCM));
42
43   static SCM aligned_side (Grob *me, Axis a, bool pure, int start, int end, Real *current_off_ptr);
44
45   static Axis get_axis (Grob *);
46   static void set_axis (Grob *, Axis);
47   DECLARE_GROB_INTERFACE ();
48   static void add_support (Grob *, Grob *);
49   static void recursive_add_support (Grob *, Grob *);
50   static void add_staff_support (Grob *);
51 };
52
53 #endif /* SIDE_POSITION_INTERFACE_HH */
54