2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1999--2012 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/>.
20 #ifndef SIDE_POSITION_INTERFACE_HH
21 #define SIDE_POSITION_INTERFACE_HH
23 #include "grob-interface.hh"
24 #include "lily-proto.hh"
27 TODO: move out unrelated callbacks.
29 TODO: reduce number of methods.
31 struct Side_position_interface
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));
43 static SCM aligned_side (Grob *me, Axis a, bool pure, int start, int end, Real *current_off_ptr);
45 static SCM general_side_position (Grob *, Axis, bool, bool my_extents,
46 bool pure, int start, int end, Real *current_off);
47 static SCM skyline_side_position (Grob *me, Axis a, bool pure, int start, int end, Real *current_offset);
49 static Axis get_axis (Grob *);
50 static void set_axis (Grob *, Axis);
51 DECLARE_GROB_INTERFACE ();
52 static void add_support (Grob *, Grob *);
53 static void add_staff_support (Grob *);
56 #endif /* SIDE_POSITION_INTERFACE_HH */