]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/self-alignment-interface.hh
dd69f8663000e1a2aaf9d3e985451fbedce01b9e
[lilypond.git] / lily / include / self-alignment-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 SELF_ALIGNMENT_INTERFACE_HH
21 #define SELF_ALIGNMENT_INTERFACE_HH
22
23 #include "lily-proto.hh"
24 #include "grob-interface.hh"
25
26 struct Self_alignment_interface
27 {
28   DECLARE_GROB_INTERFACE ();
29
30   static SCM aligned_on_self (Grob *me, Axis a, bool pure, int start, int end);
31   static SCM centered_on_object (Grob *me, Axis a);
32   static SCM aligned_on_parent (Grob *me, Axis a);
33   static void set_center_parent (Grob *me, Axis a);
34   static void set_align_self (Grob *me, Axis a);
35
36   DECLARE_SCHEME_CALLBACK (x_aligned_on_self, (SCM element));
37   DECLARE_SCHEME_CALLBACK (y_aligned_on_self, (SCM element));
38
39   DECLARE_SCHEME_CALLBACK (pure_y_aligned_on_self, (SCM element, SCM start, SCM end));
40
41   DECLARE_SCHEME_CALLBACK (centered_on_note_columns, (SCM element));
42   DECLARE_SCHEME_CALLBACK (centered_on_x_parent, (SCM element));
43   DECLARE_SCHEME_CALLBACK (centered_on_y_parent, (SCM element));
44   DECLARE_SCHEME_CALLBACK (x_centered_on_y_parent, (SCM element));
45   DECLARE_SCHEME_CALLBACK (aligned_on_x_parent, (SCM element));
46   DECLARE_SCHEME_CALLBACK (aligned_on_y_parent, (SCM element));
47 };
48 #endif