X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fside-position-interface.hh;h=c706e7e6ad8e0d8c35e55a930ddd5cd44c5820b5;hb=157d98c1870868bf59c1691577444e3c3d533bc4;hp=12495db3afc9d2ca9dedfac0b62ec4c9c2c8faaa;hpb=c735173d0ec717e9743a5032ac6a43bbba0da39f;p=lilypond.git diff --git a/lily/include/side-position-interface.hh b/lily/include/side-position-interface.hh index 12495db3af..c706e7e6ad 100644 --- a/lily/include/side-position-interface.hh +++ b/lily/include/side-position-interface.hh @@ -1,44 +1,44 @@ -/* +/* side-position-interface.hh -- declare Side_position_interface - + source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ + + (c) 1999--2007 Han-Wen Nienhuys +*/ #ifndef SIDE_POSITION_INTERFACE_HH #define SIDE_POSITION_INTERFACE_HH -#include "spanner.hh" -#include "item.hh" +#include "grob-interface.hh" +#include "lily-proto.hh" +/* + TODO: move out unrelated callbacks. + + TODO: reduce number of methods. +*/ struct Side_position_interface { - Score_element * elt_l_; public: - Side_position_interface (Score_element const*); - static Real side_position (Dimension_cache const *); - static Real aligned_on_self (Dimension_cache const *); - static Real aligned_side (Dimension_cache const *); - static Real quantised_position (Dimension_cache const*); - static Real centered_on_parent (Dimension_cache const*); - void set_axis (Axis); - void set_minimum_space (Real); - void set_padding (Real); - void set_quantised (Axis); - Axis get_axis () const; - - bool supported_b () const; - bool has_interface_b () const; - void add_support (Score_element*); - - void add_staff_support (); - Direction get_direction () const; - void set_direction (Direction); -}; -Side_position_interface side_position (Score_element*); + DECLARE_SCHEME_CALLBACK (y_aligned_on_support_refpoints, (SCM element)); + DECLARE_SCHEME_CALLBACK (pure_y_aligned_on_support_refpoints, (SCM element, SCM start, SCM end)); + DECLARE_SCHEME_CALLBACK (x_aligned_side, (SCM element, SCM current)); + DECLARE_SCHEME_CALLBACK (y_aligned_side, (SCM element, SCM current)); + DECLARE_SCHEME_CALLBACK (pure_y_aligned_side, (SCM element, SCM start, SCM end, SCM current)); + DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM element)); + + static SCM aligned_side (Grob*me, Axis a, bool pure, int start, int end, Real *current_off_ptr); + + static SCM general_side_position (Grob *, Axis, bool, bool my_extents, + bool pure, int start, int end, Real *current_off); + static Axis get_axis (Grob *); + static void set_axis (Grob *, Axis); + DECLARE_GROB_INTERFACE(); + static void add_support (Grob *, Grob *); + static void add_staff_support (Grob *); + static Direction get_direction (Grob *); +}; #endif /* SIDE_POSITION_INTERFACE_HH */