ly:music-name anywhere. Fixes <<\\>> notation.
* lily/pango-font.cc (pango_item_string_stencil): bugfix: don't
crash if psname is null.
* lily/pango-font.cc (physical_font_tab): new member. Store PSname
-> font_filename mapping.
2005-02-04 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/*: add space after ,
+
* scm/music-functions.scm (has-request-chord): don't use
ly:music-name anywhere. Fixes <<\\>> notation.
#include "note-collision.hh"
#include "accidental-interface.hh"
-MAKE_SCHEME_CALLBACK (Accidental_placement,alignment_callback, 2);
+MAKE_SCHEME_CALLBACK (Accidental_placement, alignment_callback, 2);
SCM
Accidental_placement::alignment_callback (SCM s, SCM )
{
head_ape-> left_skyline_ = head_skyline;
head_ape->offset_ = 0.0;
- Real padding = robust_scm2double (me->get_property ("padding"),0.2);
+ Real padding = robust_scm2double (me->get_property ("padding"), 0.2);
Array<Skyline_entry> left_skyline = head_ape->left_skyline_;
heighten_skyline (&left_skyline,
Stencil open = Font_interface::get_default_font (me)->find_by_name ("accidentals.leftparen");
Stencil close = Font_interface::get_default_font (me)->find_by_name ("accidentals.rightparen");
- m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0,0);
- m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0,0);
+ m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0, 0);
+ m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0, 0);
return m;
}
-MAKE_SCHEME_CALLBACK (Accidental_interface,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Accidental_interface, after_line_breaking, 1);
SCM
Accidental_interface::after_line_breaking (SCM smob)
{
return style + to_string (alteration);
}
-MAKE_SCHEME_CALLBACK (Accidental_interface,print,1);
+MAKE_SCHEME_CALLBACK (Accidental_interface, print, 1);
SCM
Accidental_interface::print (SCM smob)
{
}
else
{
- mol.add_at_edge (X_AXIS, RIGHT, acc, 0.1,0);
+ mol.add_at_edge (X_AXIS, RIGHT, acc, 0.1, 0);
}
}
int
Adobe_font_metric::name_to_index (String name) const
{
- std::map<String,int>::const_iterator ai = name_to_metric_dict_.find (name);
+ std::map<String, int>::const_iterator ai = name_to_metric_dict_.find (name);
if (ai == name_to_metric_dict_.end ())
return -1;
return (*ai).second;
#include "hara-kiri-group-spanner.hh"
#include "output-def.hh"
-MAKE_SCHEME_CALLBACK (Align_interface,alignment_callback,2);
+MAKE_SCHEME_CALLBACK (Align_interface, alignment_callback, 2);
SCM
Align_interface::alignment_callback (SCM element_smob, SCM axis)
{
return scm_make_real (0.0);
}
-MAKE_SCHEME_CALLBACK (Align_interface,fixed_distance_alignment_callback,2);
+MAKE_SCHEME_CALLBACK (Align_interface, fixed_distance_alignment_callback, 2);
SCM
Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
{
if (!stacking_dir)
stacking_dir = DOWN;
- Real dy = robust_scm2double (me->get_property ("forced-distance"),0.0);
+ Real dy = robust_scm2double (me->get_property ("forced-distance"), 0.0);
Link_array<Grob> elems
= Pointer_group_interface__extract_grobs (me, (Grob*) 0, "elements");
}
/*
- TODO: support self-alignment-{Y,X}
+ TODO: support self-alignment-{Y, X}
*/
for (int i = 0; i < translates.size (); i++)
{
}
void
-Align_interface::add_element (Grob*me,Grob* s, SCM cb)
+Align_interface::add_element (Grob*me, Grob* s, SCM cb)
{
s->add_offset_callback (cb, Align_interface::axis (me));
Axis_group_interface::add_element (me, s);
}
void
-Align_interface::set_axis (Grob*me,Axis a)
+Align_interface::set_axis (Grob*me, Axis a)
{
- Axis_group_interface::set_axes (me, a,a);
+ Axis_group_interface::set_axes (me, a, a);
}
void
Ambitus_engraver::create_ambitus ()
{
- ambitus_ = make_item ("AmbitusLine",SCM_EOL);
- group_ = make_item ("Ambitus",SCM_EOL);
+ ambitus_ = make_item ("AmbitusLine", SCM_EOL);
+ group_ = make_item ("Ambitus", SCM_EOL);
Direction d = DOWN;
do
{
#include "lookup.hh"
#include "group-interface.hh"
-MAKE_SCHEME_CALLBACK (Ambitus,print,1);
+MAKE_SCHEME_CALLBACK (Ambitus, print, 1);
SCM
Ambitus::print (SCM smob)
{
&& heads.size() > 1)
{
Grob *common
- = common_refpoint_of_array (heads.slice (0,2), me, Y_AXIS);
+ = common_refpoint_of_array (heads.slice (0, 2), me, Y_AXIS);
Grob *minh = heads[0];
Grob *maxh = heads[1];
Real linethickness = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"))
* robust_scm2double (me->get_property ("thickness"), 1.0);
Real blotdiameter = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
- Interval x_extent = 0.5 * linethickness *Interval (-1,1);
+ Interval x_extent = 0.5 * linethickness *Interval (-1, 1);
Interval y_extent = Interval (pmin, pmax);
Box line_box (x_extent, y_extent);
{
if (arpeggio_req_)
{
- arpeggio_ = make_item ("Arpeggio",arpeggio_req_->self_scm ());
+ arpeggio_ = make_item ("Arpeggio", arpeggio_req_->self_scm ());
}
}
for (Real y = heads[LEFT] ; y < heads[RIGHT];
y+= squiggle. extent (Y_AXIS).length ())
- mol.add_at_edge (Y_AXIS, UP,squiggle, 0.0, 0);
+ mol.add_at_edge (Y_AXIS, UP, squiggle, 0.0, 0);
mol.translate_axis (heads[LEFT], Y_AXIS);
if (dir)
- mol.add_at_edge (Y_AXIS, dir,arrow, 0,0);
+ mol.add_at_edge (Y_AXIS, dir, arrow, 0, 0);
return mol.smobbed_copy () ;
}
We have to do a callback, because print () triggers a
vertical alignment if it is cross-staff.
*/
-MAKE_SCHEME_CALLBACK (Arpeggio, width_callback,2);
+MAKE_SCHEME_CALLBACK (Arpeggio, width_callback, 2);
SCM
Arpeggio::width_callback (SCM smob, SCM axis)
{
else
function = scm_list_n (ly_symbol2scm ("end"), SCM_UNDEFINED);
- Moment beat_length (1,4);
+ Moment beat_length (1, 4);
if (Moment * m = unsmob_moment (get_property ("beatLength")))
{
beat_length = *m;
}
- Moment measure_length (1,1);
+ Moment measure_length (1, 1);
int num = 4;
if (Moment* m = unsmob_moment (get_property ("measureLength")))
{
beam_start_location_ =
robust_scm2moment (get_property ("measurePosition"), Moment(0));
subdivide_beams_ = ly_scm2bool (get_property ("subdivideBeams"));
- beat_length_ = robust_scm2moment (get_property ("beatLength"), Moment(1,4));
+ beat_length_ = robust_scm2moment (get_property ("beatLength"), Moment(1, 4));
}
void
{
staffline_ = get_spanner ();
Grob * it = unsmob_grob (get_property ("currentCommandColumn"));
- staffline_->set_bound (LEFT,it);
+ staffline_->set_bound (LEFT, it);
}
}
Grob * it = unsmob_grob (get_property ("currentCommandColumn"));
- staffline_->set_bound (RIGHT,it);
+ staffline_->set_bound (RIGHT, it);
staffline_ = 0;
}
#include "hara-kiri-group-spanner.hh"
void
-Axis_group_interface::add_element (Grob*me,Grob *e)
+Axis_group_interface::add_element (Grob*me, Grob *e)
{
for (SCM ax = me->get_property ("axes"); ax != SCM_EOL ; ax = scm_cdr (ax))
{
}
bool
-Axis_group_interface::has_axis (Grob*me,Axis a)
+Axis_group_interface::has_axis (Grob*me, Axis a)
{
/*
urg. FIXME, check for Hara_kiri_group_spanner shouldn't be necessary?
return r;
}
-MAKE_SCHEME_CALLBACK (Axis_group_interface,group_extent_callback,2);
+MAKE_SCHEME_CALLBACK (Axis_group_interface, group_extent_callback, 2);
SCM
Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
{
}
void
-Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2)
+Axis_group_interface::set_axes (Grob*me, Axis a1, Axis a2)
{
SCM sa1= scm_int2num (a1);
SCM sa2 = scm_int2num (a2);
why so convoluted ? (fixme/documentme?)
*/
if (me->has_extent_callback (Grob::stencil_extent_proc, a1))
- me->set_extent (Axis_group_interface::group_extent_callback_proc,a1);
+ me->set_extent (Axis_group_interface::group_extent_callback_proc, a1);
if (me->has_extent_callback (Grob::stencil_extent_proc, a2))
- me->set_extent (Axis_group_interface::group_extent_callback_proc,a2);
+ me->set_extent (Axis_group_interface::group_extent_callback_proc, a2);
}
Link_array<Grob>
return fr.smobbed_copy ();
}
-ADD_INTERFACE (Balloon_interface,"text-balloon-interface",
+ADD_INTERFACE (Balloon_interface, "text-balloon-interface",
"A collection of routines to put text balloons around an object.",
"balloon-padding balloon-text-props balloon-text-offset balloon-text balloon-original-callback");
#include "all-font-metrics.hh"
#include "staff-symbol-referencer.hh"
-MAKE_SCHEME_CALLBACK (Bar_line,print,1);
+MAKE_SCHEME_CALLBACK (Bar_line, print, 1);
SCM
Bar_line::print (SCM smob)
? 1
: (staff_space < 2 ? 2 : .5) ) * staff_space;
Stencil colon (dot);
- colon.translate_axis (dist,Y_AXIS);
+ colon.translate_axis (dist, Y_AXIS);
colon.add_stencil (dot);
- colon.translate_axis (-dist/2,Y_AXIS);
+ colon.translate_axis (-dist/2, Y_AXIS);
Stencil m;
if (str == "||:")
else if (str == "|." || (h == 0 && str == ":|"))
{
m.add_at_edge (X_AXIS, LEFT, thick, 0, 0);
- m.add_at_edge (X_AXIS, LEFT, thin, kern,0 );
+ m.add_at_edge (X_AXIS, LEFT, thin, kern, 0 );
}
else if (str == ".|" || (h == 0 && str == "|:"))
{
Real y = (- (c-1.0) / 2 + 0.5 + i * staff_space);
Stencil d (dot);
- d. translate_axis (y,Y_AXIS);
+ d. translate_axis (y, Y_AXIS);
m.add_stencil (d);
}
}
{
Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
- return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)), blot);
+ return Lookup::round_filled_box (Box (Interval (0, w), Interval (-h/2, h/2)), blot);
}
-MAKE_SCHEME_CALLBACK (Bar_line,before_line_breaking ,1);
+MAKE_SCHEME_CALLBACK (Bar_line, before_line_breaking , 1);
SCM
Bar_line::before_line_breaking (SCM smob)
-MAKE_SCHEME_CALLBACK (Bar_line,get_staff_bar_size,1);
+MAKE_SCHEME_CALLBACK (Bar_line, get_staff_bar_size, 1);
SCM
Bar_line::get_staff_bar_size (SCM smob)
{
"Print a special bar symbol. It replaces the \n"
"regular bar symbol with a special\n"
"symbol. The argument @var{bartype} is a string which specifies the\n"
-"kind of bar to print. Options are @code{:|},\n"
+"kind of bar to print. Options are @code{:|}, \n"
"@code{|:}, @code{:|:},\n"
"@code{||}, @code{|.},\n"
"@code{.|}, and @code{.|.}. \n"
if (scm_is_string (wb))
{
- Moment mp (robust_scm2moment (get_property ("measurePosition"),Moment (0)));
+ Moment mp (robust_scm2moment (get_property ("measurePosition"), Moment (0)));
if (mp.main_part_ == Rational (0))
{
SCM bn = get_property ("currentBarNumber");
return;
text_ = make_item ("BarNumber", SCM_EOL);
- Side_position_interface::set_axis (text_,Y_AXIS);
+ Side_position_interface::set_axis (text_, Y_AXIS);
}
ADD_TRANSLATOR (Bar_number_engraver,
set_melisma (true);
subdivide_beams_ = to_boolean (get_property ("subdivideBeams"));
- beat_length_ = robust_scm2moment (get_property ("beatLength"), Moment (1,4));
+ beat_length_ = robust_scm2moment (get_property ("beatLength"), Moment (1, 4));
}
}
return false;
}
-ADD_TRANSLATOR (Beam_performer,"","",
- "beam-event","","","");
+ADD_TRANSLATOR (Beam_performer, "", "",
+ "beam-event", "", "", "");
Array<Real> base_lengths;
Array<Real> stem_xposns;
- Drul_array<bool> dirs_found (0,0);
+ Drul_array<bool> dirs_found (0, 0);
Grob *common[2];
for (int a = 2; a--;)
common[a] = common_refpoint_of_array (stems, me, Axis (a));
&& s != lvs && s != fvs;
base_lengths.push (calc_stem_y (me, s, common, xl, xr,
- Interval (0,0), f) / ss);
+ Interval (0, 0), f) / ss);
stem_xposns.push (s->relative_coordinate (common[X_AXIS], X_AXIS));
}
qscores[i].demerits += d;
#if DEBUG_QUANTING
- qscores[i].score_card_ += to_string ("S%.2f",d);
+ qscores[i].score_card_ += to_string ("S%.2f", d);
#endif
}
Direction ldir, Direction rdir)
{
Real dy = yr - yl;
- Drul_array<Real> y (yl,yr);
- Drul_array<Direction> dirs (ldir,rdir);
+ Drul_array<Real> y (yl, yr);
+ Drul_array<Direction> dirs (ldir, rdir);
Real extra_demerit = SECONDARY_BEAM_DEMERIT / (beam_counts[LEFT] >? beam_counts[RIGHT]);
/*
The 2.2 factor is to provide a little leniency for
borderline cases. If we do 2.0, then the upper outer line
- will be in the gap of the (2,sit) quant, leading to a
+ will be in the gap of the (2, sit) quant, leading to a
false demerit.
*/
Real gap1 = y[d] - stem_dir * ((j-1) * beam_translation + thickness / 2 - slt/2.2 );
if (!is_number_pair (posns))
{
programming_error ("No beam posns");
- pos = Interval (0,0);
+ pos = Interval (0, 0);
}
else
pos = ly_scm2realdrul (posns);
dy = slope * dx;
- set_minimum_dy (me,&dy);
+ set_minimum_dy (me, &dy);
me->set_property ("least-squares-dy", scm_make_real (dy));
pos = Interval (y, (y+dy));
}
const int at_beat = 1<<15;
int
-Beaming_info_list::best_splitpoint_index (Moment &beat_length,bool subdivide) const
+Beaming_info_list::best_splitpoint_index (Moment &beat_length, bool subdivide) const
{
int minden = infinity_i;
int minidx = -1;
}
void
-Beaming_info_list::beamify (Moment &beat_length,bool subdivide)
+Beaming_info_list::beamify (Moment &beat_length, bool subdivide)
{
if (infos_.size () <= 1)
return;
Drul_array<Beaming_info_list> splits;
- int m = best_splitpoint_index (beat_length,subdivide);
+ int m = best_splitpoint_index (beat_length, subdivide);
bool split = subdivide && (m & at_beat); m = m & ~at_beat;
- splits[LEFT].infos_ = infos_.slice (0,m);
+ splits[LEFT].infos_ = infos_.slice (0, m);
splits[RIGHT].infos_ = infos_.slice (m, infos_.size ());
Direction d = LEFT;
do
{
- splits[d].beamify (beat_length,subdivide);
+ splits[d].beamify (beat_length, subdivide);
}
while (flip (&d) != LEFT);
for (int j = 0 ; j < 4; j++)
{
o += control_[j] * binomial_coefficient (3, j)
- * pow (t,j) * pow (1-t, 3-j);
+ * pow (t, j) * pow (1-t, 3-j);
tj *= t;
if (1-t)
}
/**
- Remove all numbers outside [0,1] from SOL
+ Remove all numbers outside [0, 1] from SOL
*/
Array<Real>
filter_solutions (Array<Real> sol)
for (int i = sols.size (); i--;)
{
Offset o (curve_point (sols[i]));
- iv.unite (Interval (o[a],o[a]));
+ iv.unite (Interval (o[a], o[a]));
}
return iv;
}
SCM column_alist_;
Item *left_edge_;
- void add_to_group (SCM,Item*);
+ void add_to_group (SCM, Item*);
protected:
virtual void acknowledge_grob (Grob_info i);
virtual void stop_translation_timestep ();
Break_align_engraver::add_column (SCM smob)
{
Grob * e = unsmob_grob (smob);
- Break_align_interface::add_element (align_,e);
+ Break_align_interface::add_element (align_, e);
}
Gregorian chant divisio minima. (Actually, this was the original
breathing sign by Michael. -- jr)
*/
-MAKE_SCHEME_CALLBACK (Breathing_sign,divisio_minima,1);
+MAKE_SCHEME_CALLBACK (Breathing_sign, divisio_minima, 1);
SCM
Breathing_sign::divisio_minima (SCM smob)
{
/*
Gregorian chant divisio maior.
*/
-MAKE_SCHEME_CALLBACK (Breathing_sign,divisio_maior,1);
+MAKE_SCHEME_CALLBACK (Breathing_sign, divisio_maior, 1);
SCM
Breathing_sign::divisio_maior (SCM smob)
{
/*
Gregorian chant divisio maxima.
*/
-MAKE_SCHEME_CALLBACK (Breathing_sign,divisio_maxima,1);
+MAKE_SCHEME_CALLBACK (Breathing_sign, divisio_maxima, 1);
SCM
Breathing_sign::divisio_maxima (SCM smob)
{
/*
Gregorian chant finalis.
*/
-MAKE_SCHEME_CALLBACK (Breathing_sign,finalis,1);
+MAKE_SCHEME_CALLBACK (Breathing_sign, finalis, 1);
SCM
Breathing_sign::finalis (SCM smob)
{
return line1.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Breathing_sign,offset_callback,2);
+MAKE_SCHEME_CALLBACK (Breathing_sign, offset_callback, 2);
SCM
Breathing_sign::offset_callback (SCM element_smob, SCM)
{
{
Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
int octavation = scm_to_int (oct);
- Pitch orig = p->transposed (Pitch (-octavation, 0,0));
+ Pitch orig = p->transposed (Pitch (-octavation, 0, 0));
pitches = scm_cons (orig.smobbed_copy (), pitches);
}
*/
SCM chord_as_scm = scm_cons (pitches, scm_cons (bass, inversion));
- chord_name_ = make_item ("ChordName",notes_[0]->self_scm ());
+ chord_name_ = make_item ("ChordName", notes_[0]->self_scm ());
chord_name_->set_property ("text", markup);
SCM s = get_property ("chordChanges");
Chord_tremolo_iterator::derived_substitute (Context *f, Context *t)
{
if (child_iter_)
- child_iter_->substitute_outlet (f,t);
+ child_iter_->substitute_outlet (f, t);
}
void
g->set_property ("text",
scm_list_n (ly_lily_module_constant ("vcenter-markup"),
txt, SCM_UNDEFINED));
- Side_position_interface::add_support (g,clef_);
+ Side_position_interface::add_support (g, clef_);
g->set_parent (clef_, Y_AXIS);
g->set_parent (clef_, X_AXIS);
return out;
}
-MAKE_SCHEME_CALLBACK (Cluster,print,1);
+MAKE_SCHEME_CALLBACK (Cluster, print, 1);
SCM
Cluster::print (SCM smob)
{
Interval v = col->extent (next_commony, Y_AXIS);
Real x = right_bound->relative_coordinate (commonx, X_AXIS) - left_coord;
- bottom_points.insert (Offset (x, v[DOWN]),0);
- top_points.insert (Offset (x, v[UP]),0);
+ bottom_points.insert (Offset (x, v[DOWN]), 0);
+ top_points.insert (Offset (x, v[UP]), 0);
}
}
}
return out.smobbed_copy ();
}
-ADD_INTERFACE (Cluster,"cluster-interface",
+ADD_INTERFACE (Cluster, "cluster-interface",
"A graphically drawn musical cluster. "
"\n\n"
"@code{padding} adds to the vertical extent of the shape (top and "
static bool has_interface (Grob *);
};
-MAKE_SCHEME_CALLBACK (Cluster_beacon,height,2);
+MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 2);
SCM
Cluster_beacon::height (SCM g, SCM)
{
Grob *me = unsmob_grob (g);
Interval v = robust_scm2interval (me->get_property ("positions"),
- Interval (0,0));
+ Interval (0, 0));
return ly_interval2scm (Staff_symbol_referencer::staff_space (me) * 0.5 * v);
}
}
for (int i = 0; i< note_columns_.size (); i++)
- Note_collision_interface::add_column (col_,note_columns_[i]);
+ Note_collision_interface::add_column (col_, note_columns_[i]);
}
void
if (now_mom ().grace_part_)
{
musiclen.grace_part_ = musiclen.main_part_ ;
- musiclen.main_part_ = Rational (0,1);
+ musiclen.main_part_ = Rational (0, 1);
}
note_end_mom_ = note_end_mom_ >? (now + musiclen);
- do_nothing_until_ = Rational (0,0);
+ do_nothing_until_ = Rational (0, 0);
return true;
}
if (!e || !l)
{
programming_error ("No timing props set?");
- return Moment (1,1);
+ return Moment (1, 1);
}
return (*l - *e);
{
int log_limit = 6;
- Duration d (0,0);
+ Duration d (0, 0);
/*
this could surely be done more efficient. Left to the reader as an
{
req = scratch_note_reqs_[i];
SCM pits = note_reqs_[i]->get_property ("pitch");
- req->set_property ("pitch",pits);
+ req->set_property ("pitch", pits);
}
req->set_property ("duration", note_dur.smobbed_copy ());
if (orig
&& now_mom ().grace_part_ )
{
- left_to_do_ = Rational (0,0);
+ left_to_do_ = Rational (0, 0);
}
}
= g->path_to_acceptable_context (type_sym, odef);
if (result.size () && result.size () < best_depth)
{
- result.insert (g,0);
+ result.insert (g, 0);
best_result = result;
/* this following line was added in 1.9.3, but hsould've been
class Context_specced_music_iterator : public Music_wrapper_iterator
{
public:
- DECLARE_SCHEME_CALLBACK (constructor,());
+ DECLARE_SCHEME_CALLBACK (constructor, ());
virtual void construct_children ();
};
IMPLEMENT_SMOBS (Context);
IMPLEMENT_DEFAULT_EQUAL_P (Context);
-IMPLEMENT_TYPE_P (Context,"ly:context?");
+IMPLEMENT_TYPE_P (Context, "ly:context?");
bool
Context::try_music (Music* m)
#include "item.hh"
#include "font-interface.hh"
-MAKE_SCHEME_CALLBACK (Custos,print,1);
+MAKE_SCHEME_CALLBACK (Custos, print, 1);
SCM
Custos::print (SCM smob)
{
TODO: let Dot_column communicate with stem via Note_column.
*/
-MAKE_SCHEME_CALLBACK (Dot_column,force_shift_callback,2);
+MAKE_SCHEME_CALLBACK (Dot_column, force_shift_callback, 2);
SCM
Dot_column::force_shift_callback (SCM element_smob, SCM axis)
{
return scm_make_real (0.0);
}
-MAKE_SCHEME_CALLBACK (Dot_column,side_position, 2);
+MAKE_SCHEME_CALLBACK (Dot_column, side_position, 2);
SCM
Dot_column::side_position (SCM element_smob, SCM axis)
{
Grob * d = unsmob_grob (rh->get_property ("dot"));
if (d)
{
- Side_position_interface::add_support (me,rh);
+ Side_position_interface::add_support (me, rh);
Pointer_group_interface::add_grob (me, ly_symbol2scm ("dots"), d);
d->add_offset_callback (Dot_column::force_shift_callback_proc , Y_AXIS);
#include "staff-symbol-referencer.hh"
#include "directional-element-interface.hh"
-MAKE_SCHEME_CALLBACK (Dots,print,1);
+MAKE_SCHEME_CALLBACK (Dots, print, 1);
SCM
Dots::print (SCM d)
{
/*
TODO: this should be handled by side-position padding.
*/
- mol = Lookup::blank (Box (Interval (0,0),
- Interval (0,0)));
+ mol = Lookup::blank (Box (Interval (0, 0),
+ Interval (0, 0)));
for (int i = scm_to_int (c); i--;)
{
- d.translate_axis (2*dw,X_AXIS);
+ d.translate_axis (2*dw, X_AXIS);
mol.add_at_edge (X_AXIS, RIGHT, d, dw, 0);
}
}
}
ADD_TRANSLATOR (Drum_note_performer,
- "Play drum notes.","",
- "note-event busy-playing-event","","","");
+ "Play drum notes.", "",
+ "note-event busy-playing-event", "", "", "");
Drum_note_performer::Drum_note_performer ()
{
/* Don't refill killed spanner */
&& line_spanner_->is_live ())
{
- Side_position_interface::add_support (line_spanner_,info.grob_);
- add_bound_item (line_spanner_,dynamic_cast<Item*> (info.grob_));
+ Side_position_interface::add_support (line_spanner_, info.grob_);
+ add_bound_item (line_spanner_, dynamic_cast<Item*> (info.grob_));
}
if (script_ && !script_->get_parent (X_AXIS))
Interval ext = b->extent (common, X_AXIS);
span_points[d] = -d * pad
- + robust_relative_extent (b,common, X_AXIS)
+ + robust_relative_extent (b, common, X_AXIS)
.linear_combination (encl);
}
}
#include "event.hh"
#include "warn.hh"
-MAKE_SCHEME_CALLBACK(Event,length_callback,1);
+MAKE_SCHEME_CALLBACK(Event, length_callback, 1);
SCM
Event::length_callback (SCM m)
{
for (int i = 0; i < fingerings_.size (); i++)
{
Grob*t = fingerings_[i];
- Side_position_interface::add_support (t,inf.grob_);
+ Side_position_interface::add_support (t, inf.grob_);
if (!t->get_parent (X_AXIS))
t->set_parent (inf.grob_, X_AXIS);
}
Folded_repeat_iterator::derived_substitute (Context *f, Context *t)
{
if (main_iter_)
- main_iter_->substitute_outlet (f,t);
+ main_iter_->substitute_outlet (f, t);
if (alternative_iter_)
- alternative_iter_->substitute_outlet (f,t);
+ alternative_iter_->substitute_outlet (f, t);
}
IMPLEMENT_CTOR_CALLBACK (Folded_repeat_iterator);
Box
Font_metric::text_dimension (String) const
{
- return Box (Interval (0,0), Interval (0,0));
+ return Box (Interval (0, 0), Interval (0, 0));
}
LY_DEFINE (ly_get_all_function_documentation, "ly:get-all-function-documentation",
- 0,0,0, (),
+ 0, 0, 0, (),
"Get a hash table with all lilypond Scheme extension functions.")
{
return doc_hash_table;
DECLARE_SCHEME_CALLBACK(start_callback, (SCM));
};
-MAKE_SCHEME_CALLBACK(Grace_music,start_callback,1);
+MAKE_SCHEME_CALLBACK(Grace_music, start_callback, 1);
SCM
Grace_music::start_callback (SCM m)
{
Protected_scm all_ifaces;
-LY_DEFINE (ly_add_interface, "ly:add-interface", 3,0,0, (SCM a, SCM b, SCM c),
+LY_DEFINE (ly_add_interface, "ly:add-interface", 3, 0, 0, (SCM a, SCM b, SCM c),
"Add an interface description.")
{
SCM_ASSERT_TYPE (scm_is_symbol (a), a, SCM_ARG1, __FUNCTION__, "symbol");
LY_DEFINE (ly_all_grob_interfaces, "ly:all-grob-interfaces",
- 0,0,0, (),
+ 0, 0, 0, (),
"Get a hash table with all interface descriptions.")
{
return all_ifaces;
SCM d = scm_makfrom0str (descr);
SCM l = parse_symbol_list (vars);
- ly_add_interface (s,d,l);
+ ly_add_interface (s, d, l);
}
int compare (Grob_pitch_tuple const &a, Grob_pitch_tuple const &b)
{
- return Grob_pitch_tuple::time_compare (a,b);
+ return Grob_pitch_tuple::time_compare (a, b);
}
}
LY_DEFINE (ly_grob_pq_less_p, "ly:grob-pq-less?",
- 2, 0 ,0, (SCM a, SCM b),
+ 2, 0 , 0, (SCM a, SCM b),
"Compare 2 grob priority queue entries. Internal")
{
if (Moment::compare (*unsmob_moment (scm_car (a)),
/* descr */ "Administrate when certain grobs (eg. note heads) stop playing; this \
engraver is a sort-of a failure, since it doesn't handle all sorts of \
borderline cases very well. \
-", \
+", \
-/* creats*/ "", \
-/* accepts */ "", \
-/* acks */ "grob-interface", \
-/* reads */ "busyGrobs", \
+/* creats*/ "", \
+/* accepts */ "", \
+/* acks */ "grob-interface", \
+/* reads */ "busyGrobs", \
/* write */ "busyGrobs");
/*
This special add_thing routine is slightly more efficient than
- set_prop (name,cons (thing, get_prop (name)))
+ set_prop (name, cons (thing, get_prop (name)))
since it can reuse the handle returned by scm_assq ().
*/
LY_DEFINE(ly_grob_key, "ly:grob-key",
- 1,0,0,
+ 1, 0, 0,
(SCM grob),
"Return the object-key for @var{grob}."
)
/* TODO:
- - remove dynamic_cast<Spanner,Item> and put this code into respective
+ - remove dynamic_cast<Spanner, Item> and put this code into respective
subclass. */
#define HASH_SIZE 3
{
SCM expr = scm_list_3 (ly_symbol2scm ("grob-cause"), self_scm(),
m->expr ());
- stil = Stencil (m->extent_box (),expr). smobbed_copy ();
+ stil = Stencil (m->extent_box (), expr). smobbed_copy ();
}
}
dim_cache_[a].parent_ = g;
}
-MAKE_SCHEME_CALLBACK (Grob,fixup_refpoint,1);
+MAKE_SCHEME_CALLBACK (Grob, fixup_refpoint, 1);
SCM
Grob::fixup_refpoint (SCM smob)
{
if (broken [d])
{
if (d == LEFT)
- x_points[d] = b->extent (common,X_AXIS)[RIGHT] ;
+ x_points[d] = b->extent (common, X_AXIS)[RIGHT] ;
}
else
{
#include "warn.hh"
#include "item.hh"
-MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner,y_extent,2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, y_extent, 2);
SCM
Hara_kiri_group_spanner::y_extent (SCM element_smob, SCM scm_axis)
{
We can't rely on offsets and dimensions of elements in a hara-kiri
group. Use a callback to make sure that hara-kiri has been done
before asking for offsets. */
-MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner,force_hara_kiri_callback,2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_callback, 2);
SCM
Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
{
}
-MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner,force_hara_kiri_in_parent_callback,2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_in_parent_callback, 2);
SCM
Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (SCM element_smob, SCM axis)
{
void
-Hara_kiri_group_spanner::add_interesting_item (Grob* me,Grob* n)
+Hara_kiri_group_spanner::add_interesting_item (Grob* me, Grob* n)
{
me->add_dependency (n);
- Pointer_group_interface::add_grob (me, ly_symbol2scm ("items-worth-living"),n);
+ Pointer_group_interface::add_grob (me, ly_symbol2scm ("items-worth-living"), n);
}
-ADD_INTERFACE (Hara_kiri_group_spanner,"hara-kiri-group-interface",
+ADD_INTERFACE (Hara_kiri_group_spanner, "hara-kiri-group-interface",
"A group spanner that keeps track of interesting items. If it "
"doesn't contain any after linebreaking, then it "
"will remove itself and all its children."
{
Grob * me = unsmob_grob (smob);
Spanner *sp = dynamic_cast<Spanner*> (me);
- Link_array<Grob> gs = Pointer_group_interface__extract_grobs (me,(Grob*)0, "columns");
+ Link_array<Grob> gs = Pointer_group_interface__extract_grobs (me, (Grob*)0, "columns");
if (!gs.size ())
{
}
Grob * cx = common_refpoint_of_array (gs, me, X_AXIS);
cx = cx->common_refpoint (sp->get_bound (LEFT), X_AXIS);
- cx = cx->common_refpoint (sp->get_bound (RIGHT),X_AXIS);
+ cx = cx->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
Interval ext = gs.top ()->extent (cx, X_AXIS);
ext.unite (gs[0]->extent (cx, X_AXIS));
Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
- Interval (0,0));
+ Interval (0, 0));
Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
- Interval (0,0));
+ Interval (0, 0));
Interval empty;
Stencil b
return b.smobbed_copy ();
}
-ADD_INTERFACE (Horizontal_bracket,"horizontal-bracket-interface",
+ADD_INTERFACE (Horizontal_bracket, "horizontal-bracket-interface",
"A horizontal bracket encompassing notes.",
"columns bracket-flare shorten-pair edge-height");
static bool has_interface (Grob*);
static String get_fontcharname(String style, int alteration);
- static Array<Box> Accidental_interface::accurate_boxes (Grob *me,Grob**common);
+ static Array<Box> Accidental_interface::accurate_boxes (Grob *me, Grob**common);
};
{
public:
DECLARE_SCHEME_CALLBACK (alignment_callback, (SCM element, SCM axis));
- static void add_accidental (Grob *,Grob* );
+ static void add_accidental (Grob *, Grob* );
static Interval get_relevant_accidental_extent (Grob *me,
Item *item_col,
AFM_CharMetricInfo const *find_ascii_metric (int) const;
Array<int> ascii_to_metric_idx_;
- std::map<String,int> name_to_metric_dict_;
+ std::map<String, int> name_to_metric_dict_;
Adobe_font_metric (AFM_Font_info*);
};
struct Align_interface {
DECLARE_SCHEME_CALLBACK (alignment_callback, (SCM element, SCM axis));
DECLARE_SCHEME_CALLBACK (fixed_distance_alignment_callback, (SCM element, SCM axis));
- static void align_to_fixed_distance (Grob*,Axis a);
- static void align_elements_to_extents (Grob*,Axis a);
- static void set_axis (Grob*,Axis);
+ static void align_to_fixed_distance (Grob*, Axis a);
+ static void align_elements_to_extents (Grob*, Axis a);
+ static void set_axis (Grob*, Axis);
static Axis axis (Grob*) ;
- static void add_element (Grob*,Grob*, SCM callback);
- static int get_count (Grob*,Grob*);
+ static void add_element (Grob*, Grob*, SCM callback);
+ static int get_count (Grob*, Grob*);
static bool has_interface (Grob*);
};
public:
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (brew_chord_bracket, (SCM));
- DECLARE_SCHEME_CALLBACK (width_callback, (SCM,SCM));
+ DECLARE_SCHEME_CALLBACK (width_callback, (SCM, SCM));
static bool has_interface (Grob*);
};
static Interval relative_group_extent (Axis, Grob * common, SCM list);
static void add_element (Grob* me, Grob*);
- static void set_axes (Grob*,Axis,Axis);
- static bool has_axis (Grob*,Axis);
+ static void set_axes (Grob*, Axis, Axis);
+ static bool has_axis (Grob*, Axis);
static Link_array<Grob> get_children (Grob*);
static bool has_interface (Grob*);
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (rest_collision_callback, (SCM element, SCM axis));
Beam (SCM);
- static void add_stem (Grob*,Grob*);
+ static void add_stem (Grob*, Grob*);
static bool is_knee (Grob*);
- static void set_beaming (Grob*,Beaming_info_list *);
+ static void set_beaming (Grob*, Beaming_info_list *);
static void set_stemlens (Grob*);
static int get_beam_count (Grob*me);
static void position_beam (Grob* me);
Array<Beaming_info> infos_;
int beam_extend_count (Direction) const;
- int best_splitpoint_index (Moment &beat_length,bool subdivide) const;
- void beamify (Moment &beat_length,bool subdivide);
+ int best_splitpoint_index (Moment &beat_length, bool subdivide) const;
+ void beamify (Moment &beat_length, bool subdivide);
void add_stem (Moment d, int beams);
};
{
public:
void assert_sanity () const;
- void scale (Real x,Real y);
+ void scale (Real x, Real y);
void reverse ();
void rotate (Real);
void translate (Offset);
#include "axes.hh"
-typedef Interval (*Dim_cache_callback) (Grob *,Axis);
-typedef Real (*Offset_callback) (Grob *,Axis);
+typedef Interval (*Dim_cache_callback) (Grob *, Axis);
+typedef Real (*Offset_callback) (Grob *, Axis);
#endif /* DIMENSION_CACHE_CALLBACK_HH */
class Dot_column // interface
{
public:
- static int compare (Grob * const&,Grob * const&);
+ static int compare (Grob * const&, Grob * const&);
static void add_head (Grob * dotcol, Grob* rh );
static bool has_interface (Grob*);
- DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM ,SCM));
- DECLARE_SCHEME_CALLBACK (side_position, (SCM ,SCM));
+ DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM , SCM));
+ DECLARE_SCHEME_CALLBACK (side_position, (SCM , SCM));
static SCM do_shifts (Grob*);
};
#endif // DOT_COLUMN_HH
static int compare (Duration const&, Duration const&);
DECLARE_SCHEME_CALLBACK (less_p, (SCM a, SCM b));
- DECLARE_SIMPLE_SMOBS (Duration,);
+ DECLARE_SIMPLE_SMOBS (Duration, );
private:
/// Logarithm of the base duration.
TRANSLATOR_DECLARATIONS(Engraver);
};
-#define make_item(x,cause) make_item_from_properties (this, ly_symbol2scm (x), cause, x)
-#define make_spanner(x,cause) make_spanner_from_properties (this, ly_symbol2scm (x), cause, x)
+#define make_item(x, cause) make_item_from_properties (this, ly_symbol2scm (x), cause, x)
+#define make_spanner(x, cause) make_spanner_from_properties (this, ly_symbol2scm (x), cause, x)
Item* make_item_from_properties (Engraver * tg, SCM x, SCM cause, const char *name);
Spanner* make_spanner_from_properties (Engraver * tg, SCM x, SCM cause, const char*name);
public:
Event (SCM);
VIRTUAL_COPY_CONSTRUCTOR (Music, Event);
- DECLARE_SCHEME_CALLBACK(length_callback,(SCM));
+ DECLARE_SCHEME_CALLBACK(length_callback, (SCM));
};
virtual Stencil get_ascii_char_stencil (int k) const;
virtual SCM sub_fonts () const;
virtual SCM font_file_name () const;
- DECLARE_SMOBS (Font_metric,);
+ DECLARE_SMOBS (Font_metric, );
private:
/* No copying, no implicit copy constructor. */
#define GLOBAL_CTOR_HH
-#define ADD_GLOBAL_CTOR_WITHNAME(y,x)\
+#define ADD_GLOBAL_CTOR_WITHNAME(y, x)\
class Global_ctor_ ## y \
{\
public: \
} _ ## y ## _ctor_init; \
-#define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME (x,x);
+#define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME (x, x);
typedef void (* Global_ctor ) ();
{
Array<Column_x_positions> do_solve () const;
Gourlay_breaking ();
- Real combine_demerits (Column_x_positions const&,Column_x_positions const&) const;
+ Real combine_demerits (Column_x_positions const&, Column_x_positions const&) const;
};
#endif // GOURLAY_BREAKING_HH
-#define ADD_INTERFACE(cl,a,b,c) \
+#define ADD_INTERFACE(cl, a, b, c) \
bool cl::has_interface(Grob*me)\
{\
return me->internal_has_interface (ly_symbol2scm (a));\
}\
void cl ## _init_ifaces() {\
- add_interface(a,b,c);\
+ add_interface(a, b, c);\
}\
ADD_SCM_INIT_FUNC(cl ## ifaces, cl ## _init_ifaces);\
for administration of what was done already
*/
enum Grob_status {
- ORPHAN = 0, // not yet added to Paper_score
+ ORPHAN = 0, // not yet added to Paper_score
PRECALCING,
- PRECALCED, // calcs before spacing done
- POSTCALCING, // busy calculating. This is used to trap cyclic deps.
- POSTCALCED, // after spacing calcs done
+ PRECALCED, // calcs before spacing done
+ POSTCALCING, // busy calculating. This is used to trap cyclic deps.
+ POSTCALCED, // after spacing calcs done
};
typedef void (Grob::*Grob_method_pointer) (void);
void add_to_list_property (SCM, SCM);
SCM get_property_alist_chain (SCM) const;
- static SCM ly_grob_set_property (SCM, SCM,SCM);
+ static SCM ly_grob_set_property (SCM, SCM, SCM);
static SCM ly_grob_property (SCM, SCM);
void warning (String) const;
inline bool ly_c_boolean_p (SCM x) { return SCM_BOOLP (x); }
#define scm_is_bool(x) ly_c_boolean_p(x)
inline bool ly_c_eq_p (SCM x, SCM y) { return SCM_EQ_P (x, y); }
-#define scm_is_eq(x,y) (SCM_EQ_P ((x), (y)))
+#define scm_is_eq(x, y) (SCM_EQ_P ((x), (y)))
#define scm_c_string_length(x) SCM_STRING_LENGTH (x)
#define scm_is_pair(x) (SCM_CONSP (x))
class Hara_kiri_group_spanner
{
public:
- DECLARE_SCHEME_CALLBACK (force_hara_kiri_callback, (SCM ,SCM));
+ DECLARE_SCHEME_CALLBACK (force_hara_kiri_callback, (SCM , SCM));
DECLARE_SCHEME_CALLBACK (y_extent, (SCM smob, SCM axis));
- DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_parent_callback, (SCM ,SCM));
+ DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_parent_callback, (SCM , SCM));
static void add_element (Grob *me, Grob *e);
static bool has_interface (Grob*);
static void consider_suicide (Grob*me);
void \
INITPREFIX ## init () \
{ \
- FNAME ## _proc = scm_c_define_gsubr (PRIMNAME,REQ, OPT, VAR, \
+ FNAME ## _proc = scm_c_define_gsubr (PRIMNAME, REQ, OPT, VAR, \
(Scheme_function_unknown) FNAME); \
ly_add_function_documentation (FNAME ## _proc, PRIMNAME, #ARGLIST, \
DOCSTRING); \
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 96
typedef SCM (*Scheme_function_0) ();
typedef SCM (*Scheme_function_1) (SCM);
-typedef SCM (*Scheme_function_2) (SCM,SCM);
-typedef SCM (*Scheme_function_3) (SCM,SCM, SCM);
+typedef SCM (*Scheme_function_2) (SCM, SCM);
+typedef SCM (*Scheme_function_3) (SCM, SCM, SCM);
#else
typedef SCM (*Scheme_function_0) (...);
typedef SCM (*Scheme_function_1) (...);
class Lily_lexer : public Includable_lexer
{
- DECLARE_SMOBS(Lily_lexer,);
+ DECLARE_SMOBS(Lily_lexer, );
public:
SCM scopes_;
void add_lexed_char (int);
void prepare_for_next_token ();
- int try_special_identifiers (SCM* ,SCM);
+ int try_special_identifiers (SCM* , SCM);
Input here_input () const;
void add_scope (SCM);
/*
- lilypond-key.hh -- declare Lilypond_{grob,context}_key
+ lilypond-key.hh -- declare Lilypond_{grob, context}_key
source file of the GNU LilyPond music typesetter
*/
class Moment
{
- DECLARE_SIMPLE_SMOBS (Moment,);
+ DECLARE_SIMPLE_SMOBS (Moment, );
public:
Moment ();
Moment (int m);
IMPLEMENT_ARITHMETIC_OPERATOR (Moment, * );
-DECLARE_UNSMOB(Moment,moment);
-int compare (Moment const&,Moment const&);
+DECLARE_UNSMOB(Moment, moment);
+int compare (Moment const&, Moment const&);
INSTANTIATE_COMPARE (Moment const&, Moment::compare);
Moment robust_scm2moment (SCM, Moment);
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (percent, (SCM));
- static void add_column (Grob*,Item*);
+ static void add_column (Grob*, Item*);
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
DECLARE_SCHEME_CALLBACK (centered_stencil, (SCM ));
- static Stencil big_rest (Grob*,Real);
- static Stencil symbol_stencil (Grob*,Real);
- static Stencil church_rest (Grob*, Font_metric*, int,Real);
+ static Stencil big_rest (Grob*, Real);
+ static Stencil symbol_stencil (Grob*, Real);
+ static Stencil church_rest (Grob*, Font_metric*, int, Real);
};
#endif /* MULTI_MEASURE_REST_HH */
Moment music_length_;
Moment start_mom_;
- DECLARE_SMOBS (Music_iterator,dummy);
+ DECLARE_SMOBS (Music_iterator, dummy);
Music_iterator (Music_iterator const&);
public:
bool is_child_context (Context *me, Context *child);
#define IMPLEMENT_CTOR_CALLBACK(Class) \
-LY_DEFINE_MEMBER_FUNCTION(Class,constructor, #Class "::constructor",\
- 0,0,0,\
- (),\
+LY_DEFINE_MEMBER_FUNCTION(Class, constructor, #Class "::constructor", \
+ 0, 0, 0, \
+ (), \
"")\
{ \
SCM val = (new Class)->self_scm(); \
};
SCM ly_transpose_key_alist (SCM l, SCM pit);
-Pitch music_list_to_relative (SCM l,Pitch p, bool ret_first);
+Pitch music_list_to_relative (SCM l, Pitch p, bool ret_first);
void transpose_music_list (SCM , Pitch);
void compress_music_list (SCM, Moment);
public:
Music_wrapper (SCM);
VIRTUAL_COPY_CONSTRUCTOR (Music, Music_wrapper);
- DECLARE_SCHEME_CALLBACK(length_callback,(SCM));
+ DECLARE_SCHEME_CALLBACK(length_callback, (SCM));
DECLARE_SCHEME_CALLBACK(start_callback, (SCM));
Music *element () const;
bool internal_is_music_type (SCM) const;
int duration_log () const;
- DECLARE_SCHEME_CALLBACK(relative_callback,(SCM,SCM));
+ DECLARE_SCHEME_CALLBACK(relative_callback, (SCM, SCM));
Pitch to_relative_octave (Pitch);
Pitch generic_to_relative_octave (Pitch);
String name () const;
void compress (Moment factor);
protected:
- DECLARE_SMOBS (Music,);
+ DECLARE_SMOBS (Music, );
SCM immutable_property_alist_;
SCM mutable_property_alist_;
protected:
};
DECLARE_TYPE_P(Music);
-DECLARE_UNSMOB(Music,music);
+DECLARE_UNSMOB(Music, music);
Music *make_music_by_name (SCM sym);
SCM ly_music_deep_copy (SCM);
static Drul_array< Link_array <Grob> > get_clash_groups (Grob *me);
DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element, SCM axis));
static void do_shifts (Grob*);
- static void add_column (Grob*me,Grob*ncol);
+ static void add_column (Grob*me, Grob*ncol);
static bool has_interface(Grob*);
};
#endif // COLLISION_HH
static Grob * accidentals (Grob*me);
static Slice head_positions_interval (Grob* me);
static Direction static_dir (Grob*);
- static void translate_rests (Grob*me,int dy);
+ static void translate_rests (Grob*me, int dy);
static Grob *first_head (Grob*me);
static Grob *get_rest (Grob*me);
- static void set_stem (Grob*me,Grob*);
- static void set_dotcol (Grob*me,Grob*);
- static void add_head (Grob*me,Grob*);
+ static void set_stem (Grob*me, Grob*);
+ static void set_dotcol (Grob*me, Grob*);
+ static void add_head (Grob*me, Grob*);
static bool has_rests (Grob*me);
static bool has_interface (Grob*);
public:
DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (brew_ez_stencil, (SCM));
- DECLARE_SCHEME_CALLBACK (extent, (SCM,SCM));
+ DECLARE_SCHEME_CALLBACK (extent, (SCM, SCM));
static bool has_interface (Grob*);
static Real stem_attachment_coordinate (Grob *, Axis a);
static int get_balltype (Grob*) ;
SCM key_serial (int);
SCM serialize_key (Object_key const *);
- DECLARE_SMOBS (Object_key_dumper,);
+ DECLARE_SMOBS (Object_key_dumper, );
public:
Object_key_dumper ();
SCM get_file_contents () const;
struct Object_key_undumper
{
- DECLARE_SMOBS(Object_key_undumper,);
+ DECLARE_SMOBS(Object_key_undumper, );
Int_to_key_map keys_;
public:
void parse_contents (SCM);
*/
class Object_key
{
- DECLARE_SMOBS(Object_key,);
+ DECLARE_SMOBS(Object_key, );
protected:
Object_key();
{
public:
VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
- DECLARE_SMOBS (Output_def,);
+ DECLARE_SMOBS (Output_def, );
public:
SCM scope_;
Output_def * parent_;
public:
- DECLARE_SMOBS (Paper_outputter,);
+ DECLARE_SMOBS (Paper_outputter, );
public:
SCM file ();
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (beat_slash, (SCM ));
DECLARE_SCHEME_CALLBACK (double_percent, (SCM ));
- static Stencil x_percent (Grob*,int,Real,Real );
+ static Stencil x_percent (Grob*, int, Real, Real );
static Stencil brew_slash (Grob*);
};
int get_notename () const;
int get_alteration () const;
- Pitch (int octave, int notename,int accidental);
+ Pitch (int octave, int notename, int accidental);
Pitch ();
Pitch transposed (Pitch) const;
Pitch to_relative_octave (Pitch) const;
- static int compare (Pitch const&,Pitch const&);
+ static int compare (Pitch const&, Pitch const&);
int steps () const;
int semitone_pitch () const;
String to_string () const;
DECLARE_SCHEME_CALLBACK (less_p, (SCM a, SCM b));
- DECLARE_SIMPLE_SMOBS (Pitch,);
+ DECLARE_SIMPLE_SMOBS (Pitch, );
};
enum {
SCM ly_pitch_diff (SCM pitch, SCM root);
SCM ly_pitch_transpose (SCM p, SCM delta);
-DECLARE_UNSMOB(Pitch,pitch);
+DECLARE_UNSMOB(Pitch, pitch);
INSTANTIATE_COMPARE (Pitch, Pitch::compare);
/* How often do we repeat? */
static int repeat_count (Music*);
- DECLARE_SCHEME_CALLBACK(relative_callback,(SCM,SCM));
+ DECLARE_SCHEME_CALLBACK(relative_callback, (SCM, SCM));
static Moment body_get_length (Music*);
static Moment alternatives_get_length (Music *, bool fold);
class Rest_collision
{
public:
- static void add_column (Grob*me,Grob*);
+ static void add_column (Grob*me, Grob*);
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element, SCM axis));
static bool has_interface (Grob*);
static String glyph_name (Grob*, int, String, bool);
static SCM brew_internal_stencil (SCM, bool);
- DECLARE_SCHEME_CALLBACK (extent_callback, (SCM,SCM));
- DECLARE_SCHEME_CALLBACK (polyphonic_offset_callback, (SCM,SCM));
+ DECLARE_SCHEME_CALLBACK (extent_callback, (SCM, SCM));
+ DECLARE_SCHEME_CALLBACK (polyphonic_offset_callback, (SCM, SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM ));
};
#endif // REST_HH
{
public:
static int duration_log (Grob*);
- static void set_dots (Grob*,Item *);
+ static void set_dots (Grob*, Item *);
static Item * get_stem (Grob*) ;
static Item * get_dots (Grob*) ;
static int dot_count (Grob*) ;
Paper_score * pscore_;
void make_columns ();
- void set_columns (Paper_column*,Paper_column*);
+ void set_columns (Paper_column*, Paper_column*);
void typeset_all ();
protected:
/* Score_translator */
struct Separation_item
{
static bool has_interface (Grob*);
- static Interval conditional_width (Grob*,Grob*) ;
+ static Interval conditional_width (Grob*, Grob*) ;
static Interval width (Grob*) ;
static Interval relative_width (Grob*, Grob*) ;
- static Grob*extremal_break_aligned_grob (Grob*,Direction, Interval*);
- static void add_item (Grob*,Item*);
- static void add_conditional_item (Grob*,Grob*);
+ static Grob*extremal_break_aligned_grob (Grob*, Direction, Interval*);
+ static void add_item (Grob*, Item*);
+ static void add_conditional_item (Grob*, Grob*);
};
#endif /* SINGLE_MALT_GROUPING_ITEM_HH */
static Axis get_axis (Grob*) ;
static void set_axis (Grob*, Axis) ;
static bool has_interface (Grob*) ;
- static void add_support (Grob*,Grob*);
+ static void add_support (Grob*, Grob*);
static void add_staff_support (Grob*);
static Direction get_direction (Grob*);
};
static void add_extra_encompass (Grob *me, Grob *col);
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
- DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM,SCM));
+ DECLARE_SCHEME_CALLBACK (height, (SCM, SCM));
+ DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM, SCM));
static bool has_interface (Grob *);
static Bezier get_curve (Grob*me);
};
SCM smobbed_copy ().
Simple smobs are created by adding the
- DECLARE_SIMPLE_SMOBS(Classname,) to the declaration
+ DECLARE_SIMPLE_SMOBS(Classname, ) to the declaration
2. Complex smobs are objects that have an identity. These objects
carry this identity in the form of a self_scm () method, which is a
list = scm_cons (p->self_scm (), list);
scm_gc_unprotect_object (p->self_scm ());
- Complex smobs are made with DECLARE_SMOBS (Classname,) in the class
+ Complex smobs are made with DECLARE_SMOBS (Classname, ) in the class
declaration.
CALLING INTERFACE
private:
-#define DECLARE_SMOBS(CL,dummy) \
+#define DECLARE_SMOBS(CL, dummy) \
DECLARE_BASE_SMOBS (CL) \
protected:\
virtual ~CL ();\
SCM self_scm () const { return self_scm_; } \
private:
-#define DECLARE_UNSMOB(CL,name) \
+#define DECLARE_UNSMOB(CL, name) \
inline CL * \
unsmob_ ## name (SCM s) \
{ \
{
/// set a minimum distance
static void add_rod (Grob*me, Grob * to, Real distance);
- static void add_spring (Grob*me,Grob * to, Real dist, Real strength);
+ static void add_spring (Grob*me, Grob * to, Real dist, Real strength);
static bool has_interface (Grob*);
static void remove_interface (Grob*);
static SCM get_minimum_distances (Grob*);
static bool has_interface (Grob*);
static Interval get_spanned_interval (Grob*);
- static void add_bar (Grob*,Grob*);
+ static void add_bar (Grob*, Grob*);
static void evaluate_glyph (Grob*);
static void evaluate_empty (Grob*);
DECLARE_SCHEME_CALLBACK (width_callback, (SCM smob, SCM axis));
void do_break ();
Real spanner_length () const;
- static int compare (Spanner * const &,Spanner * const &);
+ static int compare (Spanner * const &, Spanner * const &);
virtual Grob* find_broken_piece (System*) const;
virtual SCM do_derived_mark () const;
static bool has_interface (Grob*);
bool expand_only_b_;
Real strength_;
- DECLARE_SIMPLE_SMOBS(Spring_smob,dummy);
+ DECLARE_SIMPLE_SMOBS(Spring_smob, dummy);
public:
Spring_smob();
};
static Real next_notes_correction (Grob*, Grob*);
static Real next_note_correction (Grob*, Grob*, Interval);
static bool has_interface (Grob*);
- static void get_spacing_params (Grob*,Real*,Real*);
+ static void get_spacing_params (Grob*, Real*, Real*);
static Interval bar_y_positions (Grob*);
};
public:
static bool has_interface (Grob*);
static bool ugly_hack (Grob*);
- static void set_position (Grob*,Real);
+ static void set_position (Grob*, Real);
DECLARE_SCHEME_CALLBACK (callback, (SCM element, SCM axis));
/**
static Real staff_space (Grob*);
static Grob *get_staff_symbol (Grob*);
static bool on_staffline (Grob*);
- static bool on_staffline (Grob*,int);
+ static bool on_staffline (Grob*, int);
static int line_count (Grob*);
static Real get_position (Grob*);
static Real staff_radius (Grob*);
static int get_rounded_position (Grob*);
};
-int compare_position (Grob *const&,Grob *const&);
+int compare_position (Grob *const&, Grob *const&);
#endif /* STAFF_SYMBOL_REFERENCER_HH */
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
DECLARE_SCHEME_CALLBACK (print, (SCM ));
- DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
+ DECLARE_SCHEME_CALLBACK (height, (SCM, SCM));
static Stencil raw_stencil (Grob*);
};
static Stem_info get_stem_info (Grob *);
static Real chord_start_y (Grob *);
static Direction get_direction (Grob *);
- static void set_stemend (Grob *,Real);
+ static void set_stemend (Grob *, Real);
static Direction get_default_dir (Grob *);
static Slice Stem::beam_multiplicity (Grob *);
static Real thickness (Grob*);
* Empty stencils have empty dimensions. If add_at_edge is used to
init the stencil, we assume that
- DIMENSIONS = (Interval (0,0),Interval (0,0)
+ DIMENSIONS = (Interval (0, 0), Interval (0, 0)
*/
class Stencil
{
Box dim_;
SCM expr_;
- DECLARE_SIMPLE_SMOBS (Stencil,);
+ DECLARE_SIMPLE_SMOBS (Stencil, );
public:
Stencil (Box, SCM s);
Stencil ();
SCM expr () const;
/**
- Set dimensions to empty, or to (Interval (0,0),Interval (0,0) */
+ Set dimensions to empty, or to (Interval (0, 0), Interval (0, 0) */
void set_empty (bool);
Stencil moved_to_edge (Axis a, Direction d, const Stencil &m, Real padding,
Real minimum) const;
void add_stencil (Stencil const &m);
void translate (Offset);
void align_to (Axis a, Real x);
- void translate_axis (Real,Axis);
+ void translate_axis (Real, Axis);
Interval extent (Axis) const;
Box extent_box () const;
bool is_empty () const;
static SCM ly_get_stencil_extent (SCM mol, SCM axis);
- static SCM ly_set_stencil_extent_x (SCM,SCM,SCM);
- static SCM ly_stencil_combined_at_edge (SCM,SCM,SCM,SCM,SCM);
+ static SCM ly_set_stencil_extent_x (SCM, SCM, SCM);
+ static SCM ly_stencil_combined_at_edge (SCM, SCM, SCM, SCM, SCM);
};
-DECLARE_UNSMOB(Stencil,stencil);
+DECLARE_UNSMOB(Stencil, stencil);
SCM fontify_atom (Font_metric const*, SCM atom);
void interpret_stencil_expression (SCM expr,
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
static void try_collapse (Grob*);
- static Stencil staff_bracket (Grob*,Real) ;
- static Stencil staff_brace (Grob*,Real) ;
- static Stencil simple_bar (Grob*,Real) ;
+ static Stencil staff_bracket (Grob*, Real) ;
+ static Stencil staff_brace (Grob*, Real) ;
+ static Stencil simple_bar (Grob*, Real) ;
};
#endif /* SYSTEM_START_DELIMITER_HH */
{
public:
static bool has_interface (Grob*);
- static void add_tie (Grob*me,Grob*);
+ static void add_tie (Grob*me, Grob*);
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
static void set_directions (Grob*me);
static void old_directions (Grob*me);
class Tie
{
public:
- static void set_head (Grob*,Direction, Grob*head);
+ static void set_head (Grob*, Direction, Grob*head);
static void set_interface (Grob*);
static bool has_interface (Grob*);
static void set_direction (Grob*);
- static Grob * head (Grob*,Direction) ;
+ static Grob * head (Grob*, Direction) ;
static Real get_position (Grob*) ;
DECLARE_SCHEME_CALLBACK (print, (SCM ));
static Direction get_default_dir (Grob*) ;
struct Time_signature
{
static bool has_interface (Grob*);
- static Stencil special_time_signature (Grob*,SCM,int,int) ;
- static Stencil numbered_time_signature (Grob*,int, int);
+ static Stencil special_time_signature (Grob*, SCM, int, int) ;
+ static Stencil numbered_time_signature (Grob*, int, int);
DECLARE_SCHEME_CALLBACK (print, (SCM ));
};
#endif // METER_HH
-#define ADD_TRANSLATOR(classname,desc,grobs,accepted,acked,read,write) \
+#define ADD_TRANSLATOR(classname, desc, grobs, accepted, acked, read, write) \
ADD_THIS_TRANSLATOR (classname);\
SCM \
classname::static_translator_description () const \
{ \
SCM static_properties = SCM_EOL; \
- /* static_properties = acons (name ,gh_str02scm (Translator::name (self_scm ())), \
+ /* static_properties = acons (name , gh_str02scm (Translator::name (self_scm ())), \
static_properties_); \
*/ \
- static_properties = scm_acons (ly_symbol2scm ("grobs-created"), \
+ static_properties = scm_acons (ly_symbol2scm ("grobs-created"), \
parse_symbol_list (grobs), static_properties); \
\
- static_properties = scm_acons (ly_symbol2scm ("description"), \
+ static_properties = scm_acons (ly_symbol2scm ("description"), \
scm_makfrom0str (desc), static_properties); \
\
- static_properties = scm_acons (ly_symbol2scm ("interfaces-acked"), \
+ static_properties = scm_acons (ly_symbol2scm ("interfaces-acked"), \
parse_symbol_list (acked), static_properties); \
- static_properties = scm_acons (ly_symbol2scm ("events-accepted"), \
+ static_properties = scm_acons (ly_symbol2scm ("events-accepted"), \
parse_symbol_list (accepted), static_properties); \
\
- static_properties = scm_acons (ly_symbol2scm ("properties-read"), \
+ static_properties = scm_acons (ly_symbol2scm ("properties-read"), \
parse_symbol_list (read), static_properties); \
\
- static_properties = scm_acons (ly_symbol2scm ("properties-written"), \
+ static_properties = scm_acons (ly_symbol2scm ("properties-written"), \
parse_symbol_list (write), static_properties); \
\
return static_properties; \
void add_translator (Translator*trans);
Translator*get_translator (SCM s);
-DECLARE_UNSMOB(Translator,translator);
+DECLARE_UNSMOB(Translator, translator);
#endif // TRANSLATOR_HH
DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
- static void add_column (Grob*me,Item*);
- static void add_beam (Grob*me,Grob*);
+ static void add_column (Grob*me, Item*);
+ static void add_beam (Grob*me, Grob*);
static Grob *parallel_beam (Grob *me, Link_array<Grob> const&cols, bool *equally_long);
- static void calc_position_and_height (Grob*,Real*,Real *dy);
+ static void calc_position_and_height (Grob*, Real*, Real *dy);
static Stencil make_bracket (Grob *me, Axis protusion_axis,
Offset dz, Drul_array<Real> height,
Interval gap, Drul_array<Real> widen,
Tweak_map tweaks_;
Object_key_undumper *undumper_;
- DECLARE_SMOBS(Tweak_registry,);
+ DECLARE_SMOBS(Tweak_registry, );
public:
Object_key_undumper *undumper() const;
TYPE ## _swallow_translator :: TYPE ## _swallow_translator() {\
swallow_string_ = #TYPE; \
} \
-ADD_TRANSLATOR(TYPE ## _swallow_translator, \
- "Swallow events of " #TYPE " type.", \
- "", \
- "general-music",\
- "", \
- "", \
+ADD_TRANSLATOR(TYPE ## _swallow_translator, \
+ "Swallow events of " #TYPE " type.", \
+ "", \
+ "general-music", \
+ "", \
+ "", \
"");
#endif // TYPESWALLOW_GRAV_HH
&& !scm_is_eq (last, key))
{
cancellation_ = make_item ("KeyCancellation", key_ev_ ? key_ev_->self_scm () : SCM_EOL);
- cancellation_->set_property ("old-accidentals",last);
+ cancellation_->set_property ("old-accidentals", last);
cancellation_->set_property ("c0-position",
get_property ("middleCPosition"));
{
SCM vis = get_property ("explicitKeySignatureVisibility");
if (ly_c_procedure_p (vis))
- item_->set_property ("break-visibility",vis);
+ item_->set_property ("break-visibility", vis);
}
}
context ()->set_property ("keySignature", SCM_EOL);
context ()->set_property ("lastKeySignature", SCM_EOL);
- Pitch p (0,0,0);
+ Pitch p (0, 0, 0);
context ()->set_property ("tonic", p.smobbed_copy ());
}
}
ADD_TRANSLATOR (Key_performer,
- "","",
+ "", "",
"key-change-event",
- "","","");
+ "", "", "");
/*
FIXME: too much hardcoding here.
*/
-const int FLAT_TOP_PITCH =2; /* fes,ges,as and bes typeset in lower octave */
+const int FLAT_TOP_PITCH =2; /* fes, ges, as and bes typeset in lower octave */
const int SHARP_TOP_PITCH =4; /* ais and bis typeset in lower octave */
/*
TODO
- space the `natural' signs wider
*/
-MAKE_SCHEME_CALLBACK (Key_signature_interface,print,1);
+MAKE_SCHEME_CALLBACK (Key_signature_interface, print, 1);
SCM
Key_signature_interface::print (SCM smob)
{
LY_DEFINE (ly_find_file, "ly:find-file",
1, 0, 0, (SCM name),
- "Return the absolute file name of @var{name},"
+ "Return the absolute file name of @var{name}, "
"or @code{#f} if not found.")
{
SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
LY_DEFINE (ly_kpathsea_find_file, "ly:kpathsea-find-file",
1, 0, 0, (SCM name),
- "Return the absolute file name of @var{name},"
+ "Return the absolute file name of @var{name}, "
"or @code{#f} if not found.")
{
SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
Ledger_line_engraver::finalize ()
{
if (span_)
- span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+ span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
}
TODO: ledger share a lot of info. Lots of room to optimize away common
use of objects/variables.
*/
-MAKE_SCHEME_CALLBACK (Ledger_line_spanner,print,1);
+MAKE_SCHEME_CALLBACK (Ledger_line_spanner, print, 1);
SCM
Ledger_line_spanner::print (SCM smob)
{
Interval accidental_size = g->extent (common[X_AXIS], X_AXIS);
Real d =
linear_combination (Drul_array<Real> (accidental_size[RIGHT],
- head_size[LEFT]),
+ head_size[LEFT]),
0.0);
left_shorten = (-ledger_size[LEFT] + d) >? 0 ;
{"drummode", DRUMMODE},
{"drums", DRUMS},
{"description", DESCRIPTION},
- {"figures",FIGURES},
- {"figuremode",FIGUREMODE},
+ {"figures", FIGURES},
+ {"figuremode", FIGUREMODE},
{"grobdescriptions", GROBDESCRIPTIONS},
{"header", HEADER},
{"key", KEY},
LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click",
1, 0, 0, (SCM what),
"Set the options for Point-and-click source specials output. The\n"
-"argument is a symbol. Possible options are @code{none} (no source specials),\n"
+"argument is a symbol. Possible options are @code{none} (no source specials), \n"
"@code{line} and @code{line-column}")
{
/* UGH. */
/*
- lilypond-key.cc -- implement Lilypond_{grob,context}_key
+ lilypond-key.cc -- implement Lilypond_{grob, context}_key
source file of the GNU LilyPond music typesetter
SCM_UNDEFINED);
Box box;
- box.add_point (Offset (0,0));
+ box.add_point (Offset (0, 0));
box.add_point (to - from);
box[X_AXIS].widen (thick/2);
Line_interface::line (Grob *me, Offset from, Offset to)
{
Real thick = Staff_symbol_referencer::line_thickness (me)
- * robust_scm2double (me->get_property ("thickness"),1);
+ * robust_scm2double (me->get_property ("thickness"), 1);
SCM type = me->get_property ("style");
}
ADD_INTERFACE (Line_interface, "line-interface",
- "Generic line objects. Any object using lines supports this. Normally,"
+ "Generic line objects. Any object using lines supports this. Normally, "
"you get a straight line. If @code{dash-period} is defined, a dashed line is "
"produced; the length of the dashes is tuned with "
"@code{dash-fraction}. If the latter is set to 0, a dotted line is "
scm_make_real (dy),
SCM_UNDEFINED);
Box b;
- b.add_point (Offset (0,0));
+ b.add_point (Offset (0, 0));
b.add_point (dz);
b[X_AXIS].widen (thick/2);
b[Y_AXIS].widen (thick/2);
Stencil mol;
do
- mol.add_at_edge (X_AXIS, RIGHT, m, 0,0);
+ mol.add_at_edge (X_AXIS, RIGHT, m, 0, 0);
while (m.extent (X_AXIS).length ()
&& mol.extent (X_AXIS).length ()
+ m.extent (X_AXIS).length () < dz[X_AXIS]);
ofxy = dxy * (off/dxy.length ());
dxy -= 2*ofxy;
- Stencil line = line_stencil (me, Offset (0,0),dxy);
+ Stencil line = line_stencil (me, Offset (0, 0), dxy);
line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length ()/2, X_AXIS);
line.translate (ofxy - my_off + his_off);
* / | v
* | /
* | /
- * (0,0) x /slope = dy/dx
+ * (0, 0)x /slope = dy/dx
* | /
* |/
*
ly_quote_scm (l),
SCM_UNDEFINED));
- Box box (Interval (0,0),Interval (0,0));
+ Box box (Interval (0, 0), Interval (0, 0));
return Stencil (box, at);
}
Box box ;
box[X_AXIS] = w;
- box[Y_AXIS] = Interval (-th/2,th/2);
+ box[Y_AXIS] = Interval (-th/2, th/2);
return Stencil (box, at);
}
{
SCM at = (scm_list_n (ly_symbol2scm ("filledbox"),
scm_make_real (-b[X_AXIS][LEFT]),
- scm_make_real (b[X_AXIS][RIGHT]),
+ scm_make_real (b[X_AXIS][RIGHT]),
scm_make_real (-b[Y_AXIS][DOWN]),
- scm_make_real (b[Y_AXIS][UP]),
+ scm_make_real (b[Y_AXIS][UP]),
SCM_UNDEFINED));
- return Stencil (b,at);
+ return Stencil (b, at);
}
/*
* | | | | |
* | | |
* x\_____/______________\_____/|_____v
- * |(0,0) |
+ * |(0, 0) |
* | |
* | |
* |<-------------------------->|
scm_make_real (blotdiameter),
SCM_UNDEFINED));
- return Stencil (b,at);
+ return Stencil (b, at);
}
b[other] = oi;
m.add_stencil (round_filled_box (b, blot));
b[a] = Interval (iv[DOWN], iv[DOWN] + thick);
- m.add_stencil (round_filled_box (b,blot));
+ m.add_stencil (round_filled_box (b, blot));
return m;
}
virtual bool ok () const;
virtual void derived_mark () const;
- virtual void derived_substitute (Context *,Context *) ;
+ virtual void derived_substitute (Context *, Context *) ;
private:
bool get_busy_status ()const ;
bool melisma_busy ();
}
void
-Lyric_combine_music_iterator::derived_substitute (Context *f,Context * t)
+Lyric_combine_music_iterator::derived_substitute (Context *f, Context * t)
{
if (music_iter_)
- music_iter_->substitute_outlet (f,t);
+ music_iter_->substitute_outlet (f, t);
if (lyric_iter_)
- lyric_iter_->substitute_outlet (f,t);
+ lyric_iter_->substitute_outlet (f, t);
}
Music*
struct Lyric_combine_music
{
public:
- DECLARE_SCHEME_CALLBACK(length_callback,(SCM));
+ DECLARE_SCHEME_CALLBACK(length_callback, (SCM));
};
-MAKE_SCHEME_CALLBACK(Lyric_combine_music,length_callback,1);
+MAKE_SCHEME_CALLBACK(Lyric_combine_music, length_callback, 1);
SCM
Lyric_combine_music::length_callback (SCM m)
{
}
-ADD_INTERFACE (Lyric_extender,"lyric-extender-interface",
+ADD_INTERFACE (Lyric_extender, "lyric-extender-interface",
"The extender is a simple line at the baseline of the lyric "
"that helps show the length of a melissima (tied/slurred note).",
"next thickness heads");
#include "paper-column.hh"
#include "moment.hh"
-MAKE_SCHEME_CALLBACK (Hyphen_spanner,print,1)
+MAKE_SCHEME_CALLBACK (Hyphen_spanner, print, 1)
SCM
Hyphen_spanner::print (SCM smob)
{
space_left = space_left >? 0.0;
- Box b (Interval (0, dl), Interval (h,h+th));
+ Box b (Interval (0, dl), Interval (h, h+th));
Stencil dash_mol (Lookup::round_filled_box (b, 0.8 * lt));
Stencil total;
}
-MAKE_SCHEME_CALLBACK (Hyphen_spanner,set_spacing_rods,1);
+MAKE_SCHEME_CALLBACK (Hyphen_spanner, set_spacing_rods, 1);
SCM
Hyphen_spanner::set_spacing_rods (SCM smob)
{
return false;
}
-ADD_TRANSLATOR (Lyric_performer,"","","lyric-event","","","");
+ADD_TRANSLATOR (Lyric_performer, "", "", "lyric-event", "", "", "");
{0, "version", 'v', _i ("print version number")},
{0, "verbose", 'V', _i ("be verbose")},
{0, "warranty", 'w', _i ("show warranty and copyright")},
- {0,0,0,0}
+ {0, 0, 0, 0}
};
static void
add_output_format (String format)
{
if (output_format_global != "")
- output_format_global += ",";
+ output_format_global += ", ";
output_format_global += format;
}
return m.smobbed_copy ();
}
-ADD_INTERFACE (Measure_grouping,"measure-grouping-interface",
+ADD_INTERFACE (Measure_grouping, "measure-grouping-interface",
"This object indicates groups of beats. "
"Valid choices for @code{style} are @code{bracket} and @code{triangle}.",
"thickness style height");
if (ydims.is_empty ())
ydims = Interval (0, 0);
- b = Box(Interval(0,w), ydims);
+ b = Box(Interval(0, w), ydims);
return b;
}
"\n"
"\n"
"Moment is a point in musical time. "
- "It is consists of a pair of rationals (@var{m},@var{g}), "
+ "It is consists of a pair of rationals (@var{m}, @var{g}), "
"where @var{m} is the timing for the main\n"
"notes, and @var{g} the timing for grace notes. "
"In absence of grace notes, @var{g} is zero.\n")
return (*ma + *mb).smobbed_copy ();
}
-LY_DEFINE (ly_mul_moment,"ly:mul-moment",
+LY_DEFINE (ly_mul_moment, "ly:mul-moment",
2, 0, 0, (SCM a, SCM b),
"Multiply two moments.")
{
return (*ma * *mb).smobbed_copy ();
}
-LY_DEFINE (ly_div_moment,"ly:div-moment",
+LY_DEFINE (ly_div_moment, "ly:div-moment",
2, 0, 0, (SCM a, SCM b),
"Divide two moments.")
{
return (*ma / *mb).smobbed_copy ();
}
-LY_DEFINE (ly_moment_main_numerator,"ly:moment-main-numerator",
+LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator",
1, 0, 0, (SCM mom),
"Extract numerator from main timing.")
{
return scm_from_int (ma->main_part_.numerator ());
}
-LY_DEFINE (ly_moment_main_denominator,"ly:moment-main-denominator",
+LY_DEFINE (ly_moment_main_denominator, "ly:moment-main-denominator",
1, 0, 0, (SCM mom),
"Extract denominator from main timing.")
{
return scm_from_int (ma->main_part_.denominator ());
}
-LY_DEFINE (ly_moment_less_p,"ly:moment<?",
+LY_DEFINE (ly_moment_less_p, "ly:moment<?",
2, 0, 0, (SCM a, SCM b),
"Compare two moments.")
{
int
compare (Moment const &a, Moment const &b)
{
- return Moment::compare (a,b);
+ return Moment::compare (a, b);
}
int
Moment::compare (Moment const &a, Moment const &b)
{
- int c = Rational::compare (a.main_part_,b.main_part_);
+ int c = Rational::compare (a.main_part_, b.main_part_);
if (c)
return c;
= make_spanner ("MultiMeasureRestText", e->self_scm () );
SCM t = e->get_property ("text");
SCM dir = e->get_property ("direction");
- sp->set_property ("text",t);
+ sp->set_property ("text", t);
if (is_direction (dir))
- sp->set_property ("direction",dir);
+ sp->set_property ("direction", dir);
numbers_.push (sp);
}
#include "lookup.hh"
#include "separation-item.hh"
-MAKE_SCHEME_CALLBACK (Multi_measure_rest,percent,1);
+MAKE_SCHEME_CALLBACK (Multi_measure_rest, percent, 1);
SCM
Multi_measure_rest::percent (SCM smob)
{
*/
x_off += sp_iv.length ()/ 2;
- r.translate_axis (x_off,X_AXIS);
+ r.translate_axis (x_off, X_AXIS);
return r.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Multi_measure_rest,print,1);
+MAKE_SCHEME_CALLBACK (Multi_measure_rest, print, 1);
SCM
Multi_measure_rest::print (SCM smob)
{
Item *lb = li->find_prebroken_piece (RIGHT);
Item *rb = ri->find_prebroken_piece (LEFT);
- Item *combinations[4][2] = {{li,ri},
- {lb,ri},
- {li,rb},
- {lb,rb}};
+ Item *combinations[4][2] = {{li, ri},
+ {lb, ri},
+ {li, rb},
+ {lb, rb}};
Real sym_width = symbol_stencil (me, 0.0).extent (X_AXIS).length ();
return SCM_UNSPECIFIED;
}
-ADD_INTERFACE (Multi_measure_rest,"multi-measure-rest-interface",
+ADD_INTERFACE (Multi_measure_rest, "multi-measure-rest-interface",
"A rest that spans a whole number of measures.",
"expand-limit measure-count hair-thickness thick-thickness use-breve-rest minimum-length");
#include "warn.hh"
-static std::map<String,Music_ctor> *ctors_map_;
+static std::map<String, Music_ctor> *ctors_map_;
void
add_music_ctor (String s, Music_ctor c)
{
if (get_outlet () == f)
set_context (t);
- derived_substitute (f,t);
+ derived_substitute (f, t);
}
void
-Music_iterator::derived_substitute (Context *,Context *)
+Music_iterator::derived_substitute (Context *, Context *)
{
}
"Return the name of @var{music}.")
{
Music *m = unsmob_music (mus);
- SCM_ASSERT_TYPE (m, mus, SCM_ARG1, __FUNCTION__ ,"music");
+ SCM_ASSERT_TYPE (m, mus, SCM_ARG1, __FUNCTION__ , "music");
char const *nm = classname (m);
return scm_makfrom0str (nm);
return m->get_property_alist (true);
}
-LY_DEFINE (ly_music_list_p,"ly:music-list?",
+LY_DEFINE (ly_music_list_p, "ly:music-list?",
1, 0, 0, (SCM lst),
"Type predicate: return true if @var{lst} is a list "
"of music objects.")
return sc->self_scm ();
}
-LY_DEFINE (ly_music_duration_length, "ly:music-duration-length", 1, 0,0,
+LY_DEFINE (ly_music_duration_length, "ly:music-duration-length", 1, 0, 0,
(SCM mus),
"Extract the duration field from @var{mus}, and return the length.")
{
}
-LY_DEFINE (ly_music_duration_compress, "ly:music-duration-compress", 2, 0,0,
+LY_DEFINE (ly_music_duration_compress, "ly:music-duration-compress", 2, 0, 0,
(SCM mus, SCM fact),
"Compress @var{mus} by factor @var{fact}, which is a @code{Moment}.")
{
return dur;
}
-MAKE_SCHEME_CALLBACK(Music_sequence,maximum_length_callback,1);
+MAKE_SCHEME_CALLBACK(Music_sequence, maximum_length_callback, 1);
SCM
Music_sequence::maximum_length_callback (SCM m)
{
return maximum_length (me->get_property ("elements")).smobbed_copy();
}
-MAKE_SCHEME_CALLBACK(Music_sequence,cumulative_length_callback,1);
+MAKE_SCHEME_CALLBACK(Music_sequence, cumulative_length_callback, 1);
SCM
Music_sequence::cumulative_length_callback (SCM m)
{
}
-MAKE_SCHEME_CALLBACK(Music_sequence,minimum_start_callback,1);
+MAKE_SCHEME_CALLBACK(Music_sequence, minimum_start_callback, 1);
SCM
Music_sequence::minimum_start_callback (SCM m)
{
return minimum_start (me->get_property ("elements")).smobbed_copy();
}
-MAKE_SCHEME_CALLBACK(Music_sequence,first_start_callback,1);
+MAKE_SCHEME_CALLBACK(Music_sequence, first_start_callback, 1);
SCM
Music_sequence::first_start_callback (SCM m)
{
}
Pitch
-music_list_to_relative (SCM l,Pitch p, bool ret_first)
+music_list_to_relative (SCM l, Pitch p, bool ret_first)
{
Pitch first = p;
int count = 0;
}
-MAKE_SCHEME_CALLBACK(Music_sequence,event_chord_relative_callback,2);
+MAKE_SCHEME_CALLBACK(Music_sequence, event_chord_relative_callback, 2);
SCM
Music_sequence::event_chord_relative_callback (SCM music, SCM pitch)
{
}
void
-Music_wrapper_iterator::derived_substitute (Context *f,Context *t)
+Music_wrapper_iterator::derived_substitute (Context *f, Context *t)
{
if (child_iter_)
- child_iter_->substitute_outlet (f,t);
+ child_iter_->substitute_outlet (f, t);
}
void
start_callback_ = length_callback_proc;
}
-MAKE_SCHEME_CALLBACK(Music_wrapper,start_callback,1);
+MAKE_SCHEME_CALLBACK(Music_wrapper, start_callback, 1);
SCM
Music_wrapper::start_callback (SCM m)
{
return elt->start_mom ().smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK(Music_wrapper,length_callback,1);
+MAKE_SCHEME_CALLBACK(Music_wrapper, length_callback, 1);
SCM
Music_wrapper::length_callback (SCM m)
{
if (scm_is_symbol (nm) || scm_is_string (nm))
scm_display (nm, p);
else
- scm_puts (classname (m),p);
+ scm_puts (classname (m), p);
/* Printing properties takes a lot of time, especially during backtraces.
For inspecting, it is better to explicitly use an inspection
function. */
- scm_puts (">",p);
+ scm_puts (">", p);
return 1;
}
protected:
virtual void stop_translation_timestep ();
virtual void acknowledge_grob (Grob_info);
- void add_fingering (Grob*, Music*,Music*);
- void add_script (Grob*, Music*,Music*);
+ void add_fingering (Grob*, Music*, Music*);
+ void add_script (Grob*, Music*, Music*);
void position_scripts ();
};
else if (up_p && down_p)
{
int center = fingerings_.size () / 2;
- down.concat (fingerings_.slice (0,center));
+ down.concat (fingerings_.slice (0, center));
up.concat (fingerings_.slice (center, fingerings_.size ()));
}
else if (up_p)
virtual bool run_always ()const;
virtual bool ok () const;
virtual void derived_mark () const;
- virtual void derived_substitute (Context *,Context *);
+ virtual void derived_substitute (Context *, Context *);
private:
bool start_new_syllable () ;
void find_voice ();
New_lyric_combine_music_iterator::derived_substitute (Context *f, Context *t)
{
if (lyric_iter_)
- lyric_iter_->substitute_outlet (f,t);
+ lyric_iter_->substitute_outlet (f, t);
if (lyrics_context_ && lyrics_context_ == f)
lyrics_context_ = t;
if (music_context_ && music_context_ == f)
#include "side-position-interface.hh"
#include "dot-column.hh"
-MAKE_SCHEME_CALLBACK (Note_collision_interface,force_shift_callback,2);
+MAKE_SCHEME_CALLBACK (Note_collision_interface, force_shift_callback, 2);
SCM
Note_collision_interface::force_shift_callback (SCM element_smob, SCM axis)
if (cg[d].size ())
{
Grob *h = cg[d][0];
- wid = Note_column::first_head (h)->extent (h,X_AXIS).length () ;
+ wid = Note_column::first_head (h)->extent (h, X_AXIS).length () ;
}
}
while (flip (&d) != UP);
}
void
-Note_collision_interface::add_column (Grob*me,Grob* ncol)
+Note_collision_interface::add_column (Grob*me, Grob* ncol)
{
ncol->add_offset_callback (Note_collision_interface::force_shift_callback_proc, X_AXIS);
Axis_group_interface::add_element (me, ncol);
Grob *se = unsmob_grob (scm_car (h));
int j = Staff_symbol_referencer::get_rounded_position (se);
- iv.unite (Slice (j,j));
+ iv.unite (Slice (j, j));
}
return iv;
}
void
-Note_column::set_stem (Grob*me,Grob * stem)
+Note_column::set_stem (Grob*me, Grob * stem)
{
me->set_property ("stem", stem->self_scm ());
me->add_dependency (stem);
}
void
-Note_column::add_head (Grob*me,Grob *h)
+Note_column::add_head (Grob*me, Grob *h)
{
bool both = false;
if (Rest::has_interface (h))
{
if (unsmob_grob (me->get_property ("rest")))
both = true;
- Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"),h);
+ Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), h);
}
if (both)
void
-Note_column::set_dotcol (Grob*me,Grob *d)
+Note_column::set_dotcol (Grob*me, Grob *d)
{
Axis_group_interface::add_element (me, d);
}
-ADD_INTERFACE (Note_column,"note-column-interface",
+ADD_INTERFACE (Note_column, "note-column-interface",
"Stem and noteheads combined",
"arpeggio note-heads rest-collision rest horizontal-shift stem accidentals force-hshift");
}
-MAKE_SCHEME_CALLBACK (Note_head,print,1);
+MAKE_SCHEME_CALLBACK (Note_head, print, 1);
SCM
Note_head::print (SCM smob)
{
}
-MAKE_SCHEME_CALLBACK (Note_head,brew_ez_stencil,1);
+MAKE_SCHEME_CALLBACK (Note_head, brew_ez_stencil, 1);
SCM
Note_head::brew_ez_stencil (SCM smob)
{
result = (a == X_AXIS) ? scm_car (result) : scm_cdr (result);
- return robust_scm2double (result,0);
+ return robust_scm2double (result, 0);
}
int
return scm_is_number (s) ? scm_to_int (s) <? 2 : 0;
}
-ADD_INTERFACE (Note_head,"note-head-interface",
+ADD_INTERFACE (Note_head, "note-head-interface",
"Note head",
"note-names glyph-name-procedure accidental-grob style stem-attachment-function");
if (scm_is_vector (shape_vector))
{
SCM scm_tonic = get_property ("tonic");
- Pitch tonic (0,0,0);
+ Pitch tonic (0, 0, 0);
if (unsmob_pitch (scm_tonic))
tonic = *unsmob_pitch (scm_tonic);
return false;
}
-ADD_TRANSLATOR (Note_performer,"","",
- "note-event busy-playing-event","","","");
+ADD_TRANSLATOR (Note_performer, "", "",
+ "note-event busy-playing-event", "", "", "");
Note_performer::Note_performer ()
{
}
if (extents[d].is_empty ())
- extents[d] = Interval (0,0);
+ extents[d] = Interval (0, 0);
}
while (flip (&d) != LEFT);
Real increment,
Real * space, Real *fixed)
{
- Drul_array<Direction> stem_dirs (CENTER,CENTER);
+ Drul_array<Direction> stem_dirs (CENTER, CENTER);
Drul_array<Interval> stem_posns;
Drul_array<Interval> head_posns;
Drul_array<SCM> props (me->get_property ("left-items"),
me->get_property ("right-items"));
- Drul_array<Spanner*> beams_drul (0,0);
- Drul_array<Grob*> stems_drul (0,0);
+ Drul_array<Spanner*> beams_drul (0, 0);
+ Drul_array<Grob*> stems_drul (0, 0);
stem_dirs[LEFT] = stem_dirs[RIGHT] = CENTER;
Interval intersect;
-ADD_INTERFACE (Note_spacing,"note-spacing-interface",
+ADD_INTERFACE (Note_spacing, "note-spacing-interface",
"This object calculates spacing wishes for individual voices.",
"left-items right-items stem-spacing-correction knee-spacing-correction");
#include "moment.hh"
LY_DEFINE(ly_make_dumper, "ly:make-dumper",
- 0,0,0,
+ 0, 0, 0,
(),
"Create a key dumper. "
)
}
LY_DEFINE(ly_dumper_definitions, "ly:dumper-definitions",
- 1,0,0,
+ 1, 0, 0,
(SCM dumper),
"Return list of key definitions. "
)
}
LY_DEFINE(ly_dumper_key_serial, "ly:dumper-key-serial",
- 2,0,0,
+ 2, 0, 0,
(SCM dumper, SCM key),
"Return the key serial number @var{key}. "
)
#include "object-key-undumper.hh"
LY_DEFINE(ly_undumper_read_keys, "ly:undumper-read-keys",
- 2,0,0,
+ 2, 0, 0,
(SCM undumper, SCM keys),
"Read serialized @var{keys} into @var{undumper}."
)
}
LY_DEFINE(ly_make_undumper, "ly:make-undumper",
- 0, 0,0,
+ 0, 0, 0,
(),
"Create a key undumper. "
)
LY_DEFINE(ly_undumper_lookup, "ly:undumper-lookup",
- 2,0,0,
+ 2, 0, 0,
(SCM undumper, SCM serial),
"Return the object key for number @var{serial}. "
)
{GENERAL_KEY, Lilypond_general_key::from_scheme},
{GROB_KEY, Lilypond_grob_key::from_scheme},
{CONTEXT_KEY, Lilypond_context_key::from_scheme},
- {KEY_COUNT,0},
+ {KEY_COUNT, 0},
};
Object_key *
Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
- Interval (0,0));
+ Interval (0, 0));
/*
Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
- Interval (0,0));
+ Interval (0, 0));
*/
b = Stencil (Box (b.extent (X_AXIS),
- Interval (0.1,0.1)),
+ Interval (0.1, 0.1)),
b.expr ());
b.translate_axis (bracket_span_points[LEFT], X_AXIS);
#include "pango-font.hh"
LY_DEFINE(ly_make_pango_description_string, "ly:make-pango-description-string",
- 2,0,0, (SCM chain, SCM size),
+ 2, 0, 0, (SCM chain, SCM size),
"Make a PangoFontDescription string for the property alist @var{chain} at size @var{size}.")
{
SCM_ASSERT_TYPE(scm_is_number (size), size, SCM_ARG1, __FUNCTION__, "number");
Print a vertical line and the rank number, to aid debugging.
*/
-MAKE_SCHEME_CALLBACK (Paper_column,print,1);
+MAKE_SCHEME_CALLBACK (Paper_column, print, 1);
SCM
Paper_column::print (SCM p)
{
THIS IS BROKEN KLUDGE. WE SHOULD INVENT SOMETHING BETTER.
*/
-MAKE_SCHEME_CALLBACK (Paper_column,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Paper_column, before_line_breaking, 1);
SCM
Paper_column::before_line_breaking (SCM grob)
{
Paper_outputter::output_stencil (Stencil stil)
{
interpret_stencil_expression (stil.expr (), paper_outputter_dump,
- (void*) this, Offset (0,0));
+ (void*) this, Offset (0, 0));
}
void
break_before_penalty_ = 0;
smobify_self ();
stencil_ = s;
- staff_refpoints_ = Interval(0,0);
+ staff_refpoints_ = Interval(0, 0);
}
Paper_system::~Paper_system ()
/* creats*/ "CombineTextScript",
/* accepts */ "part-combine-event",
/* acks */ "multi-measure-rest-interface "
-"slur-interface stem-interface note-head-interface"
-,/* reads */ "printPartCombineTexts",
+"slur-interface stem-interface note-head-interface",
+/* reads */ "printPartCombineTexts",
/* write */ "");
Context *t)
{
if (first_iter_)
- first_iter_->substitute_outlet (f,t);
+ first_iter_->substitute_outlet (f, t);
}
Part_combine_iterator::substitute_both (Context * to1,
Context * to2)
{
- Context *tos[] = {to1,to2};
+ Context *tos[] = {to1, to2};
Music_iterator *mis[] = {first_iter_, second_iter_};
Interpretation_context_handle *hs[] = {
&null_,
Context *tr
= get_outlet ()->find_create_context (ly_symbol2scm ("Voice"),
- "shared",props);
+ "shared", props);
shared_.set_context (tr);
Context *solo_tr
= get_outlet ()->find_create_context (ly_symbol2scm ("Voice"),
- "solo",props);
+ "solo", props);
solo_ .set_context (solo_tr);
for (int i = count; i--;)
{
- m.add_at_edge (X_AXIS, RIGHT, s, -slash_neg_kern,0);
+ m.add_at_edge (X_AXIS, RIGHT, s, -slash_neg_kern, 0);
}
Stencil d1 = Font_interface::get_default_font (me)->find_by_name ("dots.dot");
Stencil d2 = d1;
d1.translate_axis (0.5, Y_AXIS );
d2.translate_axis (-0.5, Y_AXIS);
- m.add_at_edge (X_AXIS, LEFT, d1, -dot_neg_kern,0);
- m.add_at_edge (X_AXIS, RIGHT, d2, -dot_neg_kern,0);
+ m.add_at_edge (X_AXIS, LEFT, d1, -dot_neg_kern, 0);
+ m.add_at_edge (X_AXIS, RIGHT, d2, -dot_neg_kern, 0);
return m;
}
-MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface,double_percent,1);
+MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface, double_percent, 1);
SCM
Percent_repeat_item_interface::double_percent (SCM grob)
{
return m.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface,beat_slash,1);
+MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface, beat_slash, 1);
SCM
Percent_repeat_item_interface::beat_slash (SCM grob)
{
return m.smobbed_copy ();
}
-ADD_INTERFACE (Percent_repeat_item_interface,"percent-repeat-interface",
+ADD_INTERFACE (Percent_repeat_item_interface, "percent-repeat-interface",
"Repeats that look like percent signs",
"slope thickness");
}
void
-Percent_repeat_iterator::derived_substitute (Context *f,Context *t )
+Percent_repeat_iterator::derived_substitute (Context *f, Context *t )
{
if (child_iter_)
- child_iter_->substitute_outlet (f,t);
+ child_iter_->substitute_outlet (f, t);
}
}
LY_DEFINE(ly_pfb_to_pfa, "ly:pfb->pfa",
- 1,0,0, (SCM pfb_path),
+ 1, 0, 0, (SCM pfb_path),
"Convert the contents of a PFB file to PFA."
)
{
struct Piano_pedal_bracket
{
- DECLARE_SCHEME_CALLBACK (print,(SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
static bool has_interface (Grob*);
};
-MAKE_SCHEME_CALLBACK (Piano_pedal_bracket,print,1);
+MAKE_SCHEME_CALLBACK (Piano_pedal_bracket, print, 1);
SCM
Piano_pedal_bracket::print (SCM smob)
{
Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (smob));
Spanner *orig = dynamic_cast<Spanner*> (me->original_);
- Drul_array<bool> broken (false,false);
+ Drul_array<bool> broken (false, false);
Drul_array<Real> height = robust_scm2drul
- (me->get_property ("edge-height"), Interval (0,0));
+ (me->get_property ("edge-height"), Interval (0, 0));
Drul_array<Real> shorten = robust_scm2drul
- (me->get_property ("shorten-pair"), Interval (0,0));
+ (me->get_property ("shorten-pair"), Interval (0, 0));
Drul_array<Real> flare = robust_scm2drul
- (me->get_property ("bracket-flare"), Interval (0,0));
+ (me->get_property ("bracket-flare"), Interval (0, 0));
Grob *common = me->get_bound (LEFT)
->common_refpoint (me->get_bound (RIGHT), X_AXIS);
if (textbit)
common = common->common_refpoint (textbit, X_AXIS);
- Interval span_points (0,0);
+ Interval span_points (0, 0);
Direction d = LEFT;
do
{
-ADD_INTERFACE (Piano_pedal_bracket,"piano-pedal-bracket-interface",
+ADD_INTERFACE (Piano_pedal_bracket, "piano-pedal-bracket-interface",
"The bracket of the piano pedal. It can be tuned through the regular "
"bracket properties.",
"bound-padding edge-height shorten-pair bracket-flare pedal-text");
if (p->line_spanner_)
{
Side_position_interface::add_support (p->line_spanner_, info.grob_);
- add_bound_item (p->line_spanner_,info.grob_);
+ add_bound_item (p->line_spanner_, info.grob_);
}
if (p->bracket_)
- add_bound_item (p->bracket_,info.grob_);
+ add_bound_item (p->bracket_, info.grob_);
if (p->finished_bracket_)
- add_bound_item (p->finished_bracket_,info.grob_);
+ add_bound_item (p->finished_bracket_, info.grob_);
}
}
}
if (!p->finished_bracket_)
{
SCM flare = p->bracket_->get_property ("bracket-flare");
- p->bracket_->set_property ("bracket-flare", scm_cons (scm_make_real (0),scm_cdr (flare)));
+ p->bracket_->set_property ("bracket-flare", scm_cons (scm_make_real (0), scm_cdr (flare)));
}
return false;
}
-ADD_TRANSLATOR (Piano_pedal_performer, "","",
+ADD_TRANSLATOR (Piano_pedal_performer, "", "",
"pedal-event",
- "","","" );
+ "", "", "" );
Pitch_interval::Pitch_interval ()
{
- elem_ref(LEFT) = Pitch (100,0,0);
- elem_ref(RIGHT) = Pitch (-100,0,0);
+ elem_ref(LEFT) = Pitch (100, 0, 0);
+ elem_ref(RIGHT) = Pitch (-100, 0, 0);
}
}
LY_DEFINE (ly_pitch_diff, "ly:pitch-diff",
- 2 ,0, 0, (SCM pitch, SCM root),
+ 2 , 0, 0, (SCM pitch, SCM root),
"Return pitch @var{delta} such that @code{pitch} transposed by "
"@var{delta} equals @var{root}" )
{
to.get_alteration () - from.get_alteration ());
- return pt.transposed (Pitch (0,0,sound - pt.quartertone_pitch ()));
+ return pt.transposed (Pitch (0, 0, sound - pt.quartertone_pitch ()));
}
{
int o = (-octave_) - 1;
while (o--)
- s += ::to_string (',');
+ s += ::to_string (', ');
}
return s;
Simple_music_iterator::process (m);
}
-MAKE_SCHEME_CALLBACK (Property_iterator,once_finalization, 2);
+MAKE_SCHEME_CALLBACK (Property_iterator, once_finalization, 2);
SCM
Property_iterator::once_finalization (SCM translator, SCM music )
{
Simple_music_iterator::process (m);
}
-MAKE_SCHEME_CALLBACK (Push_property_iterator,once_finalization, 2);
+MAKE_SCHEME_CALLBACK (Push_property_iterator, once_finalization, 2);
SCM
Push_property_iterator::once_finalization (SCM trans, SCM music)
{
int
-binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a,SCM b))
+binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a, SCM b))
{
int lo = 0;
int hi = scm_c_vector_length (vec);
class Relative_octave_check
{
public:
- DECLARE_SCHEME_CALLBACK(relative_callback,(SCM,SCM));
+ DECLARE_SCHEME_CALLBACK(relative_callback, (SCM, SCM));
};
class Relative_octave_music
{
public:
- DECLARE_SCHEME_CALLBACK(relative_callback,(SCM,SCM));
- DECLARE_SCHEME_CALLBACK(no_relative_callback,(SCM,SCM));
+ DECLARE_SCHEME_CALLBACK(relative_callback, (SCM, SCM));
+ DECLARE_SCHEME_CALLBACK(no_relative_callback, (SCM, SCM));
};
-MAKE_SCHEME_CALLBACK(Relative_octave_music,no_relative_callback,2)
+MAKE_SCHEME_CALLBACK(Relative_octave_music, no_relative_callback, 2)
SCM
Relative_octave_music::no_relative_callback (SCM music, SCM pitch)
{
return pitch;
}
-MAKE_SCHEME_CALLBACK(Relative_octave_music,relative_callback,2)
+MAKE_SCHEME_CALLBACK(Relative_octave_music, relative_callback, 2)
SCM
Relative_octave_music::relative_callback (SCM music, SCM pitch)
{
return me->get_property ("elements");
}
-MAKE_SCHEME_CALLBACK(Repeated_music,relative_callback, 2);
+MAKE_SCHEME_CALLBACK(Repeated_music, relative_callback, 2);
SCM
Repeated_music::relative_callback (SCM music, SCM pitch)
{
}
-MAKE_SCHEME_CALLBACK (Repeated_music,unfolded_music_length, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music, unfolded_music_length, 1);
SCM
Repeated_music::unfolded_music_length (SCM m)
return l.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Repeated_music,folded_music_length, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music, folded_music_length, 1);
SCM
Repeated_music::folded_music_length (SCM m)
{
return scm_to_int (me->get_property ("repeat-count"));
}
-MAKE_SCHEME_CALLBACK (Repeated_music,volta_music_length, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music, volta_music_length, 1);
SCM
Repeated_music::volta_music_length (SCM m)
{
return l.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Repeated_music,minimum_start, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music, minimum_start, 1);
SCM
Repeated_music::minimum_start (SCM m)
{
}
}
-MAKE_SCHEME_CALLBACK (Repeated_music,first_start, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music, first_start, 1);
SCM
Repeated_music::first_start (SCM m)
{
for (int i = 0; i < note_columns_.size (); i++)
- Rest_collision::add_column (rest_collision_,note_columns_[i]);
+ Rest_collision::add_column (rest_collision_, note_columns_[i]);
}
void
#include "duration.hh"
#include "directional-element-interface.hh"
-MAKE_SCHEME_CALLBACK (Rest_collision,force_shift_callback,2);
+MAKE_SCHEME_CALLBACK (Rest_collision, force_shift_callback, 2);
SCM
Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
{
void
-Rest_collision::add_column (Grob*me,Grob *p)
+Rest_collision::add_column (Grob*me, Grob *p)
{
me->add_dependency (p);
Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), p);
Real diff = d * ((last_y - y) /staff_space);
if (diff > 0)
- Note_column::translate_rests (ordered_rests[d][i],d * (int) ceil (diff) * 2);
+ Note_column::translate_rests (ordered_rests[d][i], d * (int) ceil (diff) * 2);
}
} while (flip (&d) != LEFT);
}
if (discrete_dist < stafflines+1)
discrete_dist = int (ceil (discrete_dist / 2.0)* 2.0);
- Note_column::translate_rests (rcol,dir * discrete_dist);
+ Note_column::translate_rests (rcol, dir * discrete_dist);
}
return SCM_UNSPECIFIED;
}
-ADD_INTERFACE (Rest_collision,"rest-collision-interface",
+ADD_INTERFACE (Rest_collision, "rest-collision-interface",
"Move around ordinary rests (not multi-measure-rests) to avoid "
"conflicts.",
"minimum-distance positioning-done elements");
#include "directional-element-interface.hh"
// -> offset callback
-MAKE_SCHEME_CALLBACK (Rest,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Rest, after_line_breaking, 1);
SCM
Rest::after_line_breaking (SCM smob)
{
}
-MAKE_SCHEME_CALLBACK (Rest,print,1);
+MAKE_SCHEME_CALLBACK (Rest, print, 1);
SCM
Rest::brew_internal_stencil (SCM smob, bool ledgered)
{
return brew_internal_stencil (smob, true);
}
-MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
+MAKE_SCHEME_CALLBACK (Rest, extent_callback, 2);
/*
We need the callback. The real stencil has ledgers depending on
Y-position. The Y-position is known only after line breaking. */
return ly_interval2scm (unsmob_stencil (m)->extent (a));
}
-MAKE_SCHEME_CALLBACK (Rest,polyphonic_offset_callback,2);
+MAKE_SCHEME_CALLBACK (Rest, polyphonic_offset_callback, 2);
SCM
Rest::polyphonic_offset_callback (SCM smob, SCM)
{
return scm_make_real (off);
}
-ADD_INTERFACE (Rest,"rest-interface",
+ADD_INTERFACE (Rest, "rest-interface",
"A rest symbol.",
"style direction minimum-distance");
{
if (!note_column_)
{
- note_column_ = make_item ("NoteColumn",rheads_[0]->self_scm ());
+ note_column_ = make_item ("NoteColumn", rheads_[0]->self_scm ());
spacing_ = make_item ("NoteSpacing", SCM_EOL);
spacing_->set_property ("left-items", scm_cons (note_column_->self_scm (), SCM_EOL));
}
void
-Rhythmic_head::set_dots (Grob*me,Item *dot)
+Rhythmic_head::set_dots (Grob*me, Item *dot)
{
me->set_property ("dot", dot->self_scm ());
}
return scm_is_number (s) ? scm_to_int (s) : 0;
}
-ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
+ADD_INTERFACE (Rhythmic_head, "rhythmic-head-interface",
"Note head or rest",
"dot stem duration-log");
sprintf (str, "#<Scheme_hash_table 0x%0lx ", SCM_UNPACK (s));
Scheme_hash_table *me = (Scheme_hash_table*) SCM_CELL_WORD_1 (s);
scm_display (me->hash_tab_, p);
- scm_puts ("> ",p);
+ scm_puts ("> ", p);
return 1;
}
/* Add these as well:
-@item -T,--no-timestamps
+@item -T, --no-timestamps
don't timestamp the output
-@item -t,--test
+@item -t, --test
Switch on any experimental features. Not for general public use.
*/
e->set_parent (info.grob_, Y_AXIS);
e->add_dependency (info.grob_);
}
- Side_position_interface::add_support (e,info.grob_);
+ Side_position_interface::add_support (e, info.grob_);
}
}
else if (Note_column::has_interface (info.grob_))
static bool has_interface (Grob*);
};
-ADD_INTERFACE (Text_script,"text-script-interface",
+ADD_INTERFACE (Text_script, "text-script-interface",
"An object that is put above or below a note",
"add-stem-support slur script-priority inside-slur");
}
}
-MAKE_SCHEME_CALLBACK (Separating_group_spanner,set_spacing_rods,1);
+MAKE_SCHEME_CALLBACK (Separating_group_spanner, set_spacing_rods, 1);
SCM
Separating_group_spanner::set_spacing_rods (SCM smob)
{
}
void
-Separating_group_spanner::add_spacing_unit (Grob* me ,Item*i)
+Separating_group_spanner::add_spacing_unit (Grob* me , Item*i)
{
Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), i);
me->add_dependency (i);
-ADD_INTERFACE (Separating_group_spanner,"separation-spanner-interface",
+ADD_INTERFACE (Separating_group_spanner, "separation-spanner-interface",
"A spanner that calculates spacing constraints (\"rods\") "
"using the @code{separation-item-interface} grobs in @code{elements}.",
"elements padding");
if (Accidental_placement::has_interface (it))
Separation_item::add_conditional_item (p_ref_, it);
else
- Separation_item::add_item (p_ref_,it);
+ Separation_item::add_item (p_ref_, it);
}
void
#include "accidental-placement.hh"
void
-Separation_item::add_item (Grob*s,Item* i)
+Separation_item::add_item (Grob*s, Item* i)
{
assert (i);
- Pointer_group_interface::add_grob (s, ly_symbol2scm ("elements"),i);
+ Pointer_group_interface::add_grob (s, ly_symbol2scm ("elements"), i);
s->add_dependency (i);
}
-ADD_INTERFACE (Separation_item,"separation-item-interface",
+ADD_INTERFACE (Separation_item, "separation-item-interface",
"Item that computes widths to generate spacing rods. "
"This is done in concert with @ref{separation-spanner-interface}."
}
-MAKE_SCHEME_CALLBACK (Side_position_interface,aligned_on_support_extents, 2);
+MAKE_SCHEME_CALLBACK (Side_position_interface, aligned_on_support_extents, 2);
SCM
Side_position_interface::aligned_on_support_extents (SCM element_smob, SCM axis)
{
else
{
Real x = e->relative_coordinate (common, a);
- dim.unite (Interval (x,x));
+ dim.unite (Interval (x, x));
}
}
/*
Cut & paste (ugh.)
*/
-MAKE_SCHEME_CALLBACK (Side_position_interface,aligned_on_support_refpoints,2);
+MAKE_SCHEME_CALLBACK (Side_position_interface, aligned_on_support_refpoints, 2);
SCM
Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
{
Only rounds when we're inside the staff, as determined by
Staff_symbol_referencer::staff_radius () */
-MAKE_SCHEME_CALLBACK (Side_position_interface,quantised_position,2);
+MAKE_SCHEME_CALLBACK (Side_position_interface, quantised_position, 2);
SCM
Side_position_interface::quantised_position (SCM element_smob, SCM)
{
Grob *head = me->get_parent (X_AXIS);
- if (Staff_symbol_referencer::on_staffline (me,ip)
+ if (Staff_symbol_referencer::on_staffline (me, ip)
&& ((abs (ip) <= rad)
|| (Note_head::has_interface (head)
&& sign (Staff_symbol_referencer::get_position (head))
/*
Position next to support, taking into account my own dimensions and padding.
*/
-MAKE_SCHEME_CALLBACK (Side_position_interface,aligned_side,2);
+MAKE_SCHEME_CALLBACK (Side_position_interface, aligned_side, 2);
SCM
Side_position_interface::aligned_side (SCM element_smob, SCM axis)
{
Direction d = Side_position_interface::get_direction (me);
- Real o = scm_to_double (aligned_on_support_extents (element_smob,axis));
+ Real o = scm_to_double (aligned_on_support_extents (element_smob, axis));
Interval iv = me->extent (me, a);
}
-ADD_INTERFACE (Side_position_interface,"side-position-interface",
+ADD_INTERFACE (Side_position_interface, "side-position-interface",
"Position a victim object (this one) next to other objects (the "
"support). The property @code{direction} signifies where to put the "
"victim object relative to the support (left or right, up or down?)\n\n "
return;
}
- Real c = range_stiffness (l,r);
+ Real c = range_stiffness (l, r);
if (isinf (c))
{
/*
return;
}
- Real d = range_ideal_len (l,r);
+ Real d = range_ideal_len (l, r);
Real block_stretch = dist - d;
Real block_force = c * block_stretch;
}
void
-Simultaneous_music_iterator::derived_substitute (Context *f,Context *t)
+Simultaneous_music_iterator::derived_substitute (Context *f, Context *t)
{
for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s))
- unsmob_iterator (scm_car (s))-> substitute_outlet (f,t);
+ unsmob_iterator (scm_car (s))-> substitute_outlet (f, t);
}
void
Moment meas_len = robust_scm2moment (m->get_property ("measureLength"), Moment (0));
if (body_length_ < meas_len
&& meas_len.main_part_.mod_rat (body_length_.main_part_)
- == Moment (Rational (0,0)))
+ == Moment (Rational (0, 0)))
{
repeat_ = m;
}
avoid_staff_line (Slur_score_state const &state,
Bezier bez)
{
- Offset horiz (1,0);
+ Offset horiz (1, 0);
Array<Real> ts = bez.solve_derivative (horiz);
/* TODO: handle case of broken slur. */
return false;
}
-ADD_TRANSLATOR (Slur_performer,"","",
- "slur-event","","","");
+ADD_TRANSLATOR (Slur_performer, "", "",
+ "slur-event", "", "", "");
/*
Ugh should have dash-length + dash-period
*/
-MAKE_SCHEME_CALLBACK (Slur, print,1);
+MAKE_SCHEME_CALLBACK (Slur, print, 1);
SCM
Slur::print (SCM smob)
{
}
-MAKE_SCHEME_CALLBACK (Slur, after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Slur, after_line_breaking, 1);
SCM
Slur::after_line_breaking (SCM smob)
{
Source_file::line_slice (char const* pos_str0) const
{
if (!contains (pos_str0))
- return Slice (0,0);
+ return Slice (0, 0);
char const* data_str0 = to_str0 ();
char const * eof_C_ = data_str0 + length ();
-ADD_INTERFACE (Spaceable_grob,"spaceable-grob-interface",
+ADD_INTERFACE (Spaceable_grob, "spaceable-grob-interface",
"A layout object that takes part in the spacing problem. "
,
"measure-length spacing-wishes penalty minimum-distances ideal-distances "
inline int
compare (Rhythmic_tuple const &a, Rhythmic_tuple const &b)
{
- return Rhythmic_tuple::time_compare (a,b);
+ return Rhythmic_tuple::time_compare (a, b);
}
int
Real * fixed, Real * space, Moment);
- static Real default_bar_spacing (Grob*,Grob*,Grob*,Moment);
- static Real note_spacing (Grob*,Grob*,Grob*,Moment, bool*);
- static Real get_duration_space (Grob*,Moment dur, Rational shortest, bool*);
+ static Real default_bar_spacing (Grob*, Grob*, Grob*, Moment);
+ static Real note_spacing (Grob*, Grob*, Grob*, Moment, bool*);
+ static Real get_duration_space (Grob*, Moment dur, Rational shortest, bool*);
static Rational find_shortest (Grob *, Link_array<Grob> const &);
static void breakable_column_spacing (Grob*, Item* l, Item *r, Moment);
static void find_loose_columns () {}
- static void prune_loose_columns (Grob*,Link_array<Grob> *cols, Rational);
+ static void prune_loose_columns (Grob*, Link_array<Grob> *cols, Rational);
static void find_loose_columns (Link_array<Grob> cols);
static void set_explicit_neighbor_columns (Link_array<Grob> cols);
static void set_implicit_neighbor_columns (Link_array<Grob> cols);
- static void do_measure (Rational, Grob*me,Link_array<Grob> *cols);
- static void musical_column_spacing (Grob*,Item*,Item*, Real, Rational);
+ static void do_measure (Rational, Grob*me, Link_array<Grob> *cols);
+ static void musical_column_spacing (Grob*, Item*, Item*, Real, Rational);
DECLARE_SCHEME_CALLBACK (set_springs, (SCM ));
static bool has_interface (Grob*);
};
between.
*/
void
-Spacing_spanner::prune_loose_columns (Grob*me,Link_array<Grob> *cols, Rational shortest)
+Spacing_spanner::prune_loose_columns (Grob*me, Link_array<Grob> *cols, Rational shortest)
{
Link_array<Grob> newcols;
Real increment = robust_scm2double (me->get_property ("spacing-increment"), 1.2);
next_door[LEFT] = cols->elem (i - 1);
next_door[RIGHT] = cols->elem (i + 1);
Direction d = LEFT;
- Drul_array<Real> dists (0,0);
+ Drul_array<Real> dists (0, 0);
do
{
}
-MAKE_SCHEME_CALLBACK (Spacing_spanner, set_springs,1);
+MAKE_SCHEME_CALLBACK (Spacing_spanner, set_springs, 1);
SCM
Spacing_spanner::set_springs (SCM smob)
{
}
SCM bsd = me->get_property ("base-shortest-duration");
- Rational d = Rational (1,8);
+ Rational d = Rational (1, 8);
if (Moment *m = unsmob_moment (bsd))
d = m->main_part_;
Item *rb = r->find_prebroken_piece (LEFT);
if (lb)
- breakable_column_spacing (me, lb,r, global_shortest);
+ breakable_column_spacing (me, lb, r, global_shortest);
if (rb)
breakable_column_spacing (me, l, rb, global_shortest);
{
*fixed = 0.0;
Direction d = LEFT;
- Drul_array<Item*> cols (l,r);
+ Drul_array<Item*> cols (l, r);
do
{
{
Moment dt = Paper_column::when_mom (r) - Paper_column::when_mom (l);
- if (dt == Moment (0,0))
+ if (dt == Moment (0, 0))
{
/*
In this case, Staff_spacing should handle the job,
Read hints from L and generate springs.
*/
void
-Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shortest)
+Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r, Moment shortest)
{
Real compound_fixed = 0.0;
Real compound_space = 0.0;
Moment dt = Paper_column::when_mom (r) - Paper_column::when_mom (l);
- if (dt == Moment (0,0))
+ if (dt == Moment (0, 0))
{
for (SCM s = l->get_property ("spacing-wishes");
scm_is_pair (s); s = scm_cdr (s))
else
{
/*
- John S. Gourlay. ``Spacing a Line of Music,'' Technical
+ John S. Gourlay. ``Spacing a Line of Music, '' Technical
Report OSU-CISRC-10/87-TR35, Department of Computer and
Information Science, The Ohio State University, 1987.
*/
-ADD_INTERFACE (Spacing_spanner,"spacing-spanner-interface",
+ADD_INTERFACE (Spacing_spanner, "spacing-spanner-interface",
"The space taken by a note is dependent on its duration. Doubling a\n"
"duration adds spacing-increment to the space. The most common shortest\n"
"note gets @code{shortest-duration-space}. Notes that are even shorter are\n"
if (spanbar_)
{
for (int i = 0; i < bars_.size () ; i++)
- Span_bar::add_bar (spanbar_,bars_[i]);
+ Span_bar::add_bar (spanbar_, bars_[i]);
SCM vissym = ly_symbol2scm ("break-visibility");
SCM vis = bars_[0]->internal_get_property (vissym);
me->add_dependency (b);
}
-MAKE_SCHEME_CALLBACK (Span_bar,print,1);
+MAKE_SCHEME_CALLBACK (Span_bar, print, 1);
/* Limitations/Bugs:
return span_bar_mol.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Span_bar,width_callback,2);
+MAKE_SCHEME_CALLBACK (Span_bar, width_callback, 2);
SCM
Span_bar::width_callback (SCM element_smob, SCM scm_axis)
{
return ly_interval2scm (m.extent (X_AXIS));
}
-MAKE_SCHEME_CALLBACK (Span_bar,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Span_bar, before_line_breaking, 1);
SCM
Span_bar::before_line_breaking (SCM smob)
{
return SCM_UNSPECIFIED;
}
-MAKE_SCHEME_CALLBACK (Span_bar,center_on_spanned_callback,2);
+MAKE_SCHEME_CALLBACK (Span_bar, center_on_spanned_callback, 2);
SCM
Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
assert (a == Y_AXIS);
Interval i (get_spanned_interval (me));
- /* Bar_line::print delivers a barline of y-extent (-h/2,h/2), so
+ /* Bar_line::print delivers a barline of y-extent (-h/2, h/2), so
we have to translate ourselves to be in the center of the
interval that we span. */
if (i.is_empty ())
}
-MAKE_SCHEME_CALLBACK (Span_bar,get_bar_size,1);
+MAKE_SCHEME_CALLBACK (Span_bar, get_bar_size, 1);
SCM
Span_bar::get_bar_size (SCM smob)
{
-ADD_INTERFACE (Span_bar,"span-bar-interface",
+ADD_INTERFACE (Span_bar, "span-bar-interface",
"A bar line that spanned between other barlines. This interface is "
" used for bar lines that connect different staves.",
"elements");
}
else
{
- Link_array<Item> break_points = pscore_->system_->broken_col_range (left,right);
+ Link_array<Item> break_points = pscore_->system_->broken_col_range (left, right);
- break_points.insert (left,0);
+ break_points.insert (left, 0);
break_points.push (right);
for (int i =1; i < break_points.size (); i++)
}
Spanner *span = dynamic_cast<Spanner*> (clone (broken_intos_.size ()));
- span->set_bound (LEFT,bounds[LEFT]);
- span->set_bound (RIGHT,bounds[RIGHT]);
+ span->set_bound (LEFT, bounds[LEFT]);
+ span->set_bound (RIGHT, bounds[RIGHT]);
if (!bounds[LEFT]->get_system ()
do
{
if (!spanned_drul_[i]->get_system ())
- set_bound (i,spanned_drul_[i]->find_prebroken_piece ((Direction) -i));
+ set_bound (i, spanned_drul_[i]->find_prebroken_piece ((Direction) -i));
}
while (flip (&i) != LEFT);
}
}
-MAKE_SCHEME_CALLBACK (Spanner,set_spacing_rods,1);
+MAKE_SCHEME_CALLBACK (Spanner, set_spacing_rods, 1);
SCM
Spanner::set_spacing_rods (SCM smob)
{
if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".")
{
SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm ());
- bar_size = Interval (-1,1);
+ bar_size = Interval (-1, 1);
bar_size *= robust_scm2double (sz, 1)
/ Staff_symbol_referencer::staff_space (bar_grob);
}
}
-ADD_INTERFACE (Staff_spacing,"staff-spacing-interface",
+ADD_INTERFACE (Staff_spacing, "staff-spacing-interface",
"This object calculates spacing details from a "
" breakable symbol (left) to another object. For example, it takes care "
" of optical spacing from a bar lines to a note.",
{
if (span_)
{
- span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+ span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
}
span_ = 0;
}
}
LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
- 1, 0,0, (SCM sg),
+ 1, 0, 0, (SCM sg),
"Return the Y-position of @var{sg} relative to the staff.")
{
Grob *g = unsmob_grob (sg);
/* should use offset callback! */
-MAKE_SCHEME_CALLBACK (Staff_symbol_referencer,callback,2);
+MAKE_SCHEME_CALLBACK (Staff_symbol_referencer, callback, 2);
SCM
Staff_symbol_referencer::callback (SCM element_smob, SCM)
{
- Staff_symbol_referencer::get_position ((Grob*) b));
}
-ADD_INTERFACE (Staff_symbol_referencer,"staff-symbol-referencer-interface",
+ADD_INTERFACE (Staff_symbol_referencer, "staff-symbol-referencer-interface",
"An object whose Y position is meant relative to a staff "
"symbol. "
"These usually have @code{Staff_symbol_referencer::callback} "
#include "staff-symbol-referencer.hh"
#include "spanner.hh"
-MAKE_SCHEME_CALLBACK (Staff_symbol,print,1);
+MAKE_SCHEME_CALLBACK (Staff_symbol, print, 1);
SCM
Staff_symbol::print (SCM smob)
Grob * common
= sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
- Interval span_points (0,0);
+ Interval span_points (0, 0);
/*
}
-ADD_INTERFACE (Staff_symbol,"staff-symbol-interface",
+ADD_INTERFACE (Staff_symbol, "staff-symbol-interface",
"This spanner draws the lines of a staff. "
"A staff symbol definines a vertical unit, the staff space. "
"Quantities that go by a half staff space are called positions "
SCM prop = get_property ("stemLeftBeamCount");
if (scm_is_number (prop))
{
- Stem::set_beaming (stem_,scm_to_int (prop),LEFT);
+ Stem::set_beaming (stem_, scm_to_int (prop), LEFT);
context ()->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
}
prop = get_property ("stemRightBeamCount");
if (scm_is_number (prop))
{
- Stem::set_beaming (stem_,scm_to_int (prop), RIGHT);
+ Stem::set_beaming (stem_, scm_to_int (prop), RIGHT);
context ()->unset_property (ly_symbol2scm ("stemRightBeamCount"));
}
stem_ = 0;
dydx = 0.25;
Real ss = Staff_symbol_referencer::staff_space (me);
- Real thick = robust_scm2double (me->get_property ("beam-thickness"),1);
- Real width = robust_scm2double (me->get_property ("beam-width"),1);
+ Real thick = robust_scm2double (me->get_property ("beam-thickness"), 1);
+ Real width = robust_scm2double (me->get_property ("beam-width"), 1);
Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
width *= ss;
return mol;
}
-MAKE_SCHEME_CALLBACK (Stem_tremolo,print,1);
+MAKE_SCHEME_CALLBACK (Stem_tremolo, print, 1);
SCM
Stem_tremolo::print (SCM grob)
{
-ADD_INTERFACE (Stem_tremolo,"stem-tremolo-interface",
+ADD_INTERFACE (Stem_tremolo, "stem-tremolo-interface",
"A beam slashing a stem to indicate a tremolo.",
"stem beam-width beam-thickness flag-count");
SCM sshorten = me->get_property ("stem-shorten");
SCM scm_shorten = scm_is_pair (sshorten) ?
robust_list_ref ((duration_log (me) - 2) >? 0, sshorten): SCM_EOL;
- Real shorten = 2* robust_scm2double (scm_shorten,0);
+ Real shorten = 2* robust_scm2double (scm_shorten, 0);
/* On boundary: shorten only half */
if (abs (head_positions (me)[dir]) <= 1)
}
}
-MAKE_SCHEME_CALLBACK (Stem,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Stem, before_line_breaking, 1);
SCM
Stem::before_line_breaking (SCM smob)
{
return flag;
}
-MAKE_SCHEME_CALLBACK (Stem,width_callback,2);
+MAKE_SCHEME_CALLBACK (Stem, width_callback, 2);
SCM
Stem::width_callback (SCM e, SCM ax)
{
}
else if (unsmob_grob (me->get_property ("beam")) || abs (duration_log (me)) <= 2)
{
- r = Interval (-1,1);
+ r = Interval (-1, 1);
r *= thickness (me)/2;
}
else
+ stemlet_length) / half_space;
}
- Interval stem_y (y1 <? y2,y2 >? y1);
+ Interval stem_y (y1 <? y2, y2 >? y1);
if (Grob *hed = support_head (me))
{
/*
must not take ledgers into account.
*/
- Interval head_height = hed->extent (hed,Y_AXIS);
+ Interval head_height = hed->extent (hed, Y_AXIS);
Real y_attach = Note_head::stem_attachment_coordinate (hed, Y_AXIS);
y_attach = head_height.linear_combination (y_attach);
/* Simple standard stem length */
SCM lengths = me->get_property ("beamed-lengths");
Real ideal_length =
- scm_to_double (robust_list_ref (beam_count - 1,lengths))
+ scm_to_double (robust_list_ref (beam_count - 1, lengths))
* staff_space
/* stem only extends to center of beam
-LY_DEFINE (ly_bracket ,"ly:bracket",
+LY_DEFINE (ly_bracket , "ly:bracket",
4, 0, 0,
(SCM a, SCM iv, SCM t, SCM p),
"Make a bracket in direction @var{a}. The extent of the bracket is "
-LY_DEFINE (ly_filled_box ,"ly:round-filled-box",
+LY_DEFINE (ly_filled_box , "ly:round-filled-box",
3, 0, 0,
(SCM xext, SCM yext, SCM blot),
"Make a @code{Stencil} "
void
Stencil::translate_axis (Real x, Axis a)
{
- Offset o (0,0);
+ Offset o (0, 0);
o[a] = x;
translate (o);
}
}
else
{
- dim_[X_AXIS] = Interval (0,0);
- dim_[Y_AXIS] = Interval (0,0);
+ dim_[X_AXIS] = Interval (0, 0);
+ dim_[Y_AXIS] = Interval (0, 0);
}
}
+ d * padding;
Stencil toadd (s);
- toadd.translate_axis (offset,a);
+ toadd.translate_axis (offset, a);
if (minimum > 0 && d * (-origin ()[a] + toadd.origin ()[a]) < minimum)
toadd.translate_axis ( -toadd.origin ()[a]
fl.fonts_ = SCM_EOL;
interpret_stencil_expression (expr, &find_font_function,
- (void*) &fl, Offset (0,0));
+ (void*) &fl, Offset (0, 0));
return fl.fonts_;
}
};
-MAKE_SCHEME_CALLBACK (Sustain_pedal,print,1);
+MAKE_SCHEME_CALLBACK (Sustain_pedal, print, 1);
SCM
Sustain_pedal::print (SCM smob)
{
if (Staff_symbol::has_interface (inf.grob_))
{
/*
- don't add as Axis_group_interface::add_element (delim_,),
+ don't add as Axis_group_interface::add_element (delim_, ),
because that would set the parent as well */
Pointer_group_interface::add_grob (delim_, ly_symbol2scm ("elements"), inf.grob_);
}
ADD_TRANSLATOR (System_start_delimiter_engraver,
-/* descr */ "Creates a system start delimiter (ie. SystemStart@{Bar,Brace,Bracket@} spanner",
+/* descr */ "Creates a system start delimiter (ie. SystemStart@{Bar, Brace, Bracket@} spanner",
/* creats*/ "SystemStartBar SystemStartBrace SystemStartBracket",
/* accepts */ "",
/* acks */ "system-start-delimiter-interface staff-symbol-interface",
#include "lookup.hh"
Stencil
-System_start_delimiter::staff_bracket (Grob*me,Real height)
+System_start_delimiter::staff_bracket (Grob*me, Real height)
{
Real arc_height = scm_to_double (me->get_property ("arch-height")) ;
Stencil
-System_start_delimiter::simple_bar (Grob*me,Real h)
+System_start_delimiter::simple_bar (Grob*me, Real h)
{
Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness")) ;
Real w = lt * robust_scm2double (me->get_property ("thickness"), 1);
- return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)),
+ return Lookup::round_filled_box (Box (Interval (0, w), Interval (-h/2, h/2)),
lt);
}
-MAKE_SCHEME_CALLBACK (System_start_delimiter,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (System_start_delimiter, after_line_breaking, 1);
SCM
System_start_delimiter::after_line_breaking (SCM smob)
{
Grob * me = unsmob_grob (smob);
SCM gl = me->get_property ("glyph");
- if (ly_c_equal_p (gl,scm_makfrom0str ("bar-line")))
+ if (ly_c_equal_p (gl, scm_makfrom0str ("bar-line")))
{
int count = 0;
}
-ADD_INTERFACE (System_start_delimiter,"system-start-delimiter-interface",
+ADD_INTERFACE (System_start_delimiter, "system-start-delimiter-interface",
"The brace, bracket or bar in front of the system. "
"It is implemented as a spanner."
,
Link_array<Grob> c (breaking[i].cols_);
pscore_->typeset_line (system);
- system->set_bound (LEFT,c[0]);
- system->set_bound (RIGHT,c.top ());
+ system->set_bound (LEFT, c[0]);
+ system->set_bound (RIGHT, c.top ());
for (int j = 0; j < c.size (); j++)
{
c[j]->translate_axis (breaking[i].config_[j], X_AXIS);
Interval x (extent (this, X_AXIS));
Interval y (extent (this, Y_AXIS));
- Stencil sys_stencil (Box (x,y),
+ Stencil sys_stencil (Box (x, y),
scm_cons (ly_symbol2scm ("combine-stencil"),
exprs));
return acs;
}
-ADD_INTERFACE (System,"system-interface",
+ADD_INTERFACE (System, "system-interface",
"This is the toplevel object: each object in a score "
"ultimately has a System object as its X and Y parent. ",
"all-elements spaceable-staves columns")
while (!string_found)
{
int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
- - scm_to_int (scm_list_ref (stringTunings,scm_int2num (tab_string-1)));
+ - scm_to_int (scm_list_ref (stringTunings, scm_int2num (tab_string-1)));
if (fret<min_fret)
tab_string += high_string_one ? 1 : -1;
else
-ADD_TRANSLATOR (Tempo_performer, "","",
+ADD_TRANSLATOR (Tempo_performer, "", "",
"metronome-change-event",
- "","","" );
+ "", "", "" );
for (int i = 0; i < texts_.size (); i++)
{
Grob*t = texts_[i];
- Side_position_interface::add_support (t,inf.grob_);
+ Side_position_interface::add_support (t, inf.grob_);
/*
ugh.
{
for (int i = 0; i < texts_.size (); i++)
{
- Side_position_interface::add_support (texts_[i],inf.grob_);
+ Side_position_interface::add_support (texts_[i], inf.grob_);
}
}
}
}
}
-MAKE_SCHEME_CALLBACK (Text_interface,print,1);
+MAKE_SCHEME_CALLBACK (Text_interface, print, 1);
SCM
Text_interface::print (SCM grob)
{
ly_symbol2scm ("markup-signature"))));
}
-ADD_INTERFACE (Text_interface,"text-interface",
+ADD_INTERFACE (Text_interface, "text-interface",
"A scheme markup text, see @usermanref{Text-markup}.",
"text baseline-skip word-space");
Real dy = - dir * edge_height[d] ;
if (dy)
- edge_line[d] = Line_spanner::line_stencil (me, Offset (0,0), Offset (dx, dy));
+ edge_line[d] = Line_spanner::line_stencil (me, Offset (0, 0), Offset (dx, dy));
}
while (flip (&d) != LEFT);
}
return m.smobbed_copy ();
}
-ADD_INTERFACE (Text_spanner,"text-spanner-interface",
+ADD_INTERFACE (Text_spanner, "text-spanner-interface",
"generic text spanner",
"dash-period dash-fraction edge-height bracket-flare edge-text shorten-pair style thickness enclose-bounds");
TODO: this doesn't follow standard pattern. Regularize.
*/
void
-Tie_column::add_tie (Grob*me,Grob *s)
+Tie_column::add_tie (Grob*me, Grob *s)
{
if (s->get_parent (Y_AXIS)
&& Tie_column::has_interface (s->get_parent (Y_AXIS)))
if (!Pointer_group_interface::count (me, ly_symbol2scm ("ties")))
{
- dynamic_cast<Spanner*> (me)->set_bound (LEFT, Tie::head (s,LEFT));
- dynamic_cast<Spanner*> (me)->set_bound (RIGHT, Tie::head (s,RIGHT));
+ dynamic_cast<Spanner*> (me)->set_bound (LEFT, Tie::head (s, LEFT));
+ dynamic_cast<Spanner*> (me)->set_bound (RIGHT, Tie::head (s, RIGHT));
}
s->set_parent (me, Y_AXIS);
Pointer_group_interface::add_grob (me, ly_symbol2scm ("ties"), s);
if (ties.size () == 1)
{
Grob * t = ties[0];
- set_grob_direction (t,Tie::get_default_dir (t));
+ set_grob_direction (t, Tie::get_default_dir (t));
return;
}
Grob * t = ties[0];
if (t->is_live ()
&& !get_grob_direction (t))
- set_grob_direction (t,Tie::get_default_dir (t));
+ set_grob_direction (t, Tie::get_default_dir (t));
return ;
}
}
-MAKE_SCHEME_CALLBACK (Tie_column,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Tie_column, after_line_breaking, 1);
SCM
Tie_column::after_line_breaking (SCM smob)
{
-ADD_INTERFACE (Tie_column,"tie-column-interface",
+ADD_INTERFACE (Tie_column, "tie-column-interface",
"Object that sets directions of multiple ties in a tied chord",
"direction");
if (tie_column_)
for (int i = ties_.size (); i--;)
- Tie_column::add_tie (tie_column_,ties_ [i]);
+ Tie_column::add_tie (tie_column_, ties_ [i]);
}
}
void
Tie_engraver::typeset_tie (Grob *her)
{
- if (! (Tie::head (her,LEFT) && Tie::head (her,RIGHT)))
+ if (! (Tie::head (her, LEFT) && Tie::head (her, RIGHT)))
warning (_ ("lonely tie"));
Direction d = LEFT;
Drul_array<Grob *> new_head_drul;
- new_head_drul[LEFT] = Tie::head (her,LEFT);
- new_head_drul[RIGHT] = Tie::head (her,RIGHT);
+ new_head_drul[LEFT] = Tie::head (her, LEFT);
+ new_head_drul[RIGHT] = Tie::head (her, RIGHT);
do {
- if (!Tie::head (her,d))
+ if (!Tie::head (her, d))
new_head_drul[d] = Tie::head (her, (Direction)-d);
} while (flip (&d) != LEFT);
void
-Tie::set_head (Grob*me,Direction d, Grob * h)
+Tie::set_head (Grob*me, Direction d, Grob * h)
{
- assert (!head (me,d));
+ assert (!head (me, d));
index_set_cell (me->get_property ("head-pair"), d, h->self_scm ());
dynamic_cast<Spanner*> (me)->set_bound (d, h);
Real
Tie::get_position (Grob*me)
{
- Direction d = head (me,LEFT) ? LEFT:RIGHT;
- return Staff_symbol_referencer::get_position (head (me,d));
+ Direction d = head (me, LEFT) ? LEFT:RIGHT;
+ return Staff_symbol_referencer::get_position (head (me, d));
}
Direction
Tie::get_default_dir (Grob*me)
{
- Item * sl = head (me,LEFT) ? Rhythmic_head::get_stem (head (me,LEFT)) :0;
- Item * sr = head (me,RIGHT) ? Rhythmic_head::get_stem (head (me,RIGHT)) :0;
+ Item * sl = head (me, LEFT) ? Rhythmic_head::get_stem (head (me, LEFT)) :0;
+ Item * sr = head (me, RIGHT) ? Rhythmic_head::get_stem (head (me, RIGHT)) :0;
if (sl && sr)
{
if (get_grob_direction (sl) == UP
{
Spanner*me = unsmob_spanner (smob);
Direction headdir = CENTER;
- if (head (me,LEFT))
+ if (head (me, LEFT))
headdir = LEFT;
- else if (head (me,RIGHT))
+ else if (head (me, RIGHT))
headdir = RIGHT;
else
{
if (Note_head::has_interface (l) && Note_head::has_interface (r))
{
width =
- + r->extent (commonx,X_AXIS)[LEFT]
+ + r->extent (commonx, X_AXIS)[LEFT]
- l->extent (commonx, X_AXIS)[RIGHT]
-2 * x_gap_f;
}
SCM details = me->get_property ("details");
SCM lim // groetjes aan de chirurgendochter.
- = scm_assq (ly_symbol2scm ("height-limit"),details);
+ = scm_assq (ly_symbol2scm ("height-limit"), details);
Real h_inf = scm_to_double (scm_cdr (lim)) * staff_space;
- Real r_0 = scm_to_double (scm_cdr (scm_assq (ly_symbol2scm ("ratio"),details)));
+ Real r_0 = scm_to_double (scm_cdr (scm_assq (ly_symbol2scm ("ratio"), details)));
Bezier b = slur_shape (width, h_inf, r_0);
todo: tie / stem collision
*/
- b = slur_shape (width,h_inf, r_0);
+ b = slur_shape (width, h_inf, r_0);
b.scale (1, dir);
b.translate (Offset (left_x, ypos));
TODO: doesn't work when on staff with even number of lines.
*/
- Array<Real> horizontal (b.solve_derivative (Offset (1,0)));
+ Array<Real> horizontal (b.solve_derivative (Offset (1, 0)));
if (horizontal.size ())
{
/*
}
-MAKE_SCHEME_CALLBACK (Tie,print,1);
+MAKE_SCHEME_CALLBACK (Tie, print, 1);
SCM
Tie::print (SCM smob)
{
-ADD_INTERFACE (Tie,"tie-interface",
+ADD_INTERFACE (Tie, "tie-interface",
"A tie connecting two noteheads.\n"
,
"y-offset staffline-clearance control-points head-pair details thickness x-gap direction minimum-length");
last_time_fraction_ = fr;
- time_signature_ = make_item ("TimeSignature",SCM_EOL);
- time_signature_->set_property ("fraction",fr);
+ time_signature_ = make_item ("TimeSignature", SCM_EOL);
+ time_signature_->set_property ("fraction", fr);
}
}
int b = scm_to_int (scm_car (fr));
int o = scm_to_int (scm_cdr (fr));
- audio_ = new Audio_time_signature (b,o);
+ audio_ = new Audio_time_signature (b, o);
Audio_element_info info (audio_, 0);
announce_element (info);
}
}
-ADD_TRANSLATOR (Time_signature_performer,"","","","","","");
+ADD_TRANSLATOR (Time_signature_performer, "", "", "", "", "", "");
else if (scm_is_symbol (st))
m = special_time_signature (me, st, n, d);
else
- m = numbered_time_signature (me, n,d);
+ m = numbered_time_signature (me, n, d);
if (Staff_symbol_referencer::line_count (me) % 2 == 0)
m.translate_axis (Staff_symbol_referencer::staff_space (me) / 2 , Y_AXIS);
}
Stencil
-Time_signature::numbered_time_signature (Grob*me,int num, int den)
+Time_signature::numbered_time_signature (Grob*me, int num, int den)
{
SCM chain = me->get_property_alist_chain (Font_interface::text_font_alist_chain (me));
chain = scm_cons (scm_list_1 (scm_cons (ly_symbol2scm ("font-encoding"),
if (den)
{
m.add_at_edge (Y_AXIS, UP, n, 0.0, 0);
- m.add_at_edge (Y_AXIS, DOWN, d, 0.0,0);
+ m.add_at_edge (Y_AXIS, DOWN, d, 0.0, 0);
}
else
{
context.
*/
context ()->set_property ("measureLength", Moment (Rational (1)).smobbed_copy ());
- context ()->set_property ("beatLength", Moment (Rational (1,4)).smobbed_copy ());
+ context ()->set_property ("beatLength", Moment (Rational (1, 4)).smobbed_copy ());
}
Rational
"@code{Timing} to its containing context."
,
- "","","","","");
+ "", "", "", "", "");
Scheme_hash_table *global_translator_dict = 0;
-LY_DEFINE (get_all_translators,"ly:get-all-translators", 0, 0, 0, (),
+LY_DEFINE (get_all_translators, "ly:get-all-translators", 0, 0, 0, (),
"Return a list of all translator objects that may be instantiated. "
)
{
}
LY_DEFINE (ly_translator_description, "ly:translator-description",
- 1,0,0, (SCM me),
+ 1, 0, 0, (SCM me),
"Return an alist of properties of translator @var{me}.")
{
Translator *tr = unsmob_translator (me);
IMPLEMENT_SMOBS (Translator);
IMPLEMENT_DEFAULT_EQUAL_P (Translator);
-IMPLEMENT_TYPE_P (Translator,"ly:translator?");
+IMPLEMENT_TYPE_P (Translator, "ly:translator?");
bool
Translator::must_be_last () const
follow beam precisely for determining tuplet number location.
*/
-MAKE_SCHEME_CALLBACK (Tuplet_bracket,print,1);
+MAKE_SCHEME_CALLBACK (Tuplet_bracket, print, 1);
SCM
Tuplet_bracket::print (SCM smob)
{
else if (numb == ly_symbol2scm ("if-no-beam"))
number_visibility = !par_beam;
- Grob * commonx = columns[0]->common_refpoint (columns.top (),X_AXIS);
+ Grob * commonx = columns[0]->common_refpoint (columns.top (), X_AXIS);
/*
Tuplet brackets are normally not broken, but we shouldn't crash if
}
mol.translate_axis (ly, Y_AXIS);
- mol.translate_axis (x0 - sp->get_bound (LEFT)->relative_coordinate (commonx,X_AXIS),X_AXIS);
+ mol.translate_axis (x0 - sp->get_bound (LEFT)->relative_coordinate (commonx, X_AXIS), X_AXIS);
return mol.smobbed_copy ();
}
brackets.
*/
Stencil
-Tuplet_bracket::make_bracket (Grob *me, // for line properties.
+Tuplet_bracket::make_bracket (Grob *me, // for line properties.
Axis protusion_axis,
Offset dz,
Drul_array<Real> height,
Drul_array<Real> flare,
Drul_array<Real> shorten)
{
- Drul_array<Offset> corners (Offset (0,0), dz);
+ Drul_array<Offset> corners (Offset (0, 0), dz);
Real length = dz.length ();
Drul_array<Offset> gap_corners;
if (gap.is_empty())
- gap = Interval (0,0);
+ gap = Interval (0, 0);
do {
gap_corners[d] = (dz * 0.5) + gap[d] / length * dz;
} while (flip (&d) != LEFT);
/*
We depend on the beams if there are any.
*/
-MAKE_SCHEME_CALLBACK (Tuplet_bracket,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Tuplet_bracket, before_line_breaking, 1);
SCM
Tuplet_bracket::before_line_breaking (SCM smob)
{
return SCM_UNSPECIFIED;
}
-MAKE_SCHEME_CALLBACK (Tuplet_bracket,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Tuplet_bracket, after_line_breaking, 1);
SCM
Tuplet_bracket::after_line_breaking (SCM smob)
if (!par_beam
|| get_grob_direction (par_beam) != dir)
{
- calc_position_and_height (me,&offset,&dy);
+ calc_position_and_height (me, &offset, &dy);
}
else
{
Direction
Tuplet_bracket::get_default_dir (Grob*me)
{
- Drul_array<int> dirs (0,0);
+ Drul_array<int> dirs (0, 0);
for (SCM s = me->get_property ("note-columns"); scm_is_pair (s); s = scm_cdr (s))
{
Grob * nc = unsmob_grob (scm_car (s));
#include "object-key-undumper.hh"
LY_DEFINE(ly_clear_tweak_registry, "ly:tweak-clear-registry",
- 0,0,0,(),
+ 0, 0, 0, (),
"Clear global tweak registry"
)
{
}
LY_DEFINE(ly_insert_tweak, "ly:insert-tweak",
- 2,0,0,
+ 2, 0, 0,
(SCM grob, SCM tweak),
"add new tweak for grob."
)
LY_DEFINE(ly_tweak_read_keys, "ly:tweak-define-keys",
- 1,0,0,(SCM keys),
+ 1, 0, 0, (SCM keys),
"Read keys"
)
{
LY_DEFINE(ly_all_tweaks, "ly:all-tweaks",
- 0,0,0,(),
+ 0, 0, 0, (),
"all tweaks"
)
{
LY_DEFINE(ly_tweak_read_tweaks, "ly:tweak-define-tweaks",
- 1,0,0,(SCM tweaks),
+ 1, 0, 0, (SCM tweaks),
"Read tweaks"
)
{
Real staff_space = Staff_symbol_referencer::staff_space (me);
Real flexa_width = robust_scm2double ( me->get_property ("flexa-width"), 2) *staff_space;
out =
- Lookup::blank (Box (Interval (0, 0.5*flexa_width), Interval (0,0)));
+ Lookup::blank (Box (Interval (0, 0.5*flexa_width), Interval (0, 0)));
}
else if (!String::compare (glyph_name, "flexa"))
{
if (!valign_)
{
valign_ = make_spanner ("VerticalAlignment", SCM_EOL);
- valign_->set_bound (LEFT,unsmob_grob (get_property ("currentCommandColumn")));
+ valign_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
}
}
{
if (valign_)
{
- valign_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+ valign_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
valign_ = 0;
}
}
{
if (qualifies (i))
{
- Align_interface::add_element (valign_,i.grob_, get_property ("verticalAlignmentChildCallback"));
+ Align_interface::add_element (valign_, i.grob_, get_property ("verticalAlignmentChildCallback"));
}
}
*/
-MAKE_SCHEME_CALLBACK (Volta_bracket_interface,print,1);
+MAKE_SCHEME_CALLBACK (Volta_bracket_interface, print, 1);
SCM
Volta_bracket_interface::print (SCM smob)
{
const char* cs = str.to_str0 ();
no_vertical_end |=
- (strcmp (cs,":|")!= 0 && strcmp (cs,"|:")!= 0 && strcmp (cs,"|.")!= 0
- && strcmp (cs,":|:")!= 0 && strcmp (cs,".|")!= 0);
+ (strcmp (cs, ":|")!= 0 && strcmp (cs, "|:")!= 0 && strcmp (cs, "|.")!= 0
+ && strcmp (cs, ":|:")!= 0 && strcmp (cs, ".|")!= 0);
Output_def * layout = me->get_layout ();
Real half_space = 0.5;
Real w = dynamic_cast<Spanner*> (me)->spanner_length () - left - half_space;
Real h = robust_scm2double (me->get_property ("height"), 1);
- Stencil start,end ;
+ Stencil start, end ;
if (!no_vertical_start)
- start = Line_interface::line (me, Offset (0,0), Offset (0, h));
+ start = Line_interface::line (me, Offset (0, 0), Offset (0, h));
if (!no_vertical_end)
- end = Line_interface::line (me, Offset (w, 0), Offset (w,h));
+ end = Line_interface::line (me, Offset (w, 0), Offset (w, h));
- Stencil mol = Line_interface::line (me, Offset (0, h), Offset (w,h));
+ Stencil mol = Line_interface::line (me, Offset (0, h), Offset (w, h));
mol.add_stencil (start);
mol.add_stencil (end);
Volta_bracket_interface::add_bar (Grob *me, Item* b)
{
Pointer_group_interface::add_grob (me, ly_symbol2scm ("bars"), b);
- Side_position_interface::add_support (me,b);
+ Side_position_interface::add_support (me, b);
add_bound_item (dynamic_cast<Spanner*> (me), b);
}
void
Volta_bracket_interface::add_column (Grob*me, Grob* c)
{
- Side_position_interface::add_support (me,c);
+ Side_position_interface::add_support (me, c);
}
-ADD_INTERFACE (Volta_bracket_interface,"volta-bracket-interface",
+ADD_INTERFACE (Volta_bracket_interface, "volta-bracket-interface",
"Volta bracket with number",
"bars thickness height");
if (Note_column::has_interface (item))
{
if (volta_span_)
- Volta_bracket_interface::add_column (volta_span_,item);
+ Volta_bracket_interface::add_column (volta_span_, item);
}
if (Bar_line::has_interface (item))
{
(let ((es (ly:music-property m 'elements))
(e (ly:music-property m 'element)))
- (display (ly:music-property m 'name))
-
(if (pair? es)
(set! (ly:music-property m 'elements) (map voicify-music es)))
(if (ly:music? e)