--- /dev/null
+\version "2.13.7"
+
+\header {
+ texidoc = "Rehearsal marks with direction DOWN get placed at
+the bottom of the score."
+}
+
+\new StaffGroup <<
+ \new Staff { g'1 }
+ \new Staff {
+ c'1
+ \once \override Score . RehearsalMark #'break-visibility = #begin-of-line-invisible
+ \once \override Score . RehearsalMark #'direction = #DOWN
+ \mark \markup \italic "Fine."
+ }
+ >>
{
public:
static Stencil get_stencil (Grob *, Direction d);
+ static Direction get_direction (Grob *);
+
DECLARE_GROB_INTERFACE();
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
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 */
return SCM_BOOL_T;
}
+Direction
+Script_interface::get_direction (Grob *me)
+{
+ Direction relative_dir = Direction (1);
+ SCM reldir = me->get_property ("side-relative-direction");
+ if (is_direction (reldir))
+ relative_dir = to_dir (reldir);
+
+ SCM other_elt = me->get_object ("direction-source");
+ Grob *e = unsmob_grob (other_elt);
+ if (e)
+ return (Direction) (relative_dir * get_grob_direction (e));
+
+ return CENTER;
+}
+
MAKE_SCHEME_CALLBACK (Script_interface, calc_direction, 1);
SCM
Script_interface::calc_direction (SCM smob)
{
Grob *me = unsmob_grob (smob);
- Direction d = Side_position_interface::get_direction (me);
+ Direction d = Script_interface::get_direction (me);
if (!d)
{
/* properties */
"add-stem-support "
"avoid-slur "
+ "direction-source "
"positioning-done "
"script-priority "
"script-stencil "
- "toward-stem-shift "
+ "side-relative-direction "
"slur "
"slur-padding "
+ "toward-stem-shift "
);
Pointer_group_interface::add_unordered_grob (me, ly_symbol2scm ("side-support-elements"), e);
}
-Direction
-Side_position_interface::get_direction (Grob *me)
-{
- Direction relative_dir = Direction (1);
- SCM reldir = me->get_property ("side-relative-direction");
- if (is_direction (reldir))
- relative_dir = to_dir (reldir);
-
- SCM other_elt = me->get_object ("direction-source");
- Grob *e = unsmob_grob (other_elt);
- if (e)
- return (Direction) (relative_dir * get_grob_direction (e));
-
- return CENTER;
-}
-
/* Put the element next to the support, optionally taking in
account the extent of the support.
{
Grob *me = unsmob_grob (smob);
System *sys = dynamic_cast<System*> (me->get_system ());
- Direction dir = Side_position_interface::get_direction (me);
+ Direction dir = get_grob_direction (me);
if (dir != DOWN)
dir = UP;
/* properties */
"direction "
- "direction-source "
"minimum-space "
"padding "
"quantize-position "
"side-axis "
- "side-relative-direction "
"side-support-elements "
"slur-padding "
"staff-padding "