summaryrefslogtreecommitdiff
path: root/lily/spanner.cc
Commit message (Collapse)AuthorAgeFilesLines
* Issue 4512: Remove redundant occurences of this->David Kastrup2015-07-271-1/+1
|
* Issue 4365: non-member unsmob<T> replaces T::unsmob and T::is_smobDan Eble2015-05-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Hide Smob_base<>::is_smob() to prevent the misleading situation of D::is_smob(S) returning true when S represents an ancestor of D rather than a D. This issue was previously worked around by overriding is_smob in several derived smob classes; that is no longer needed. LY_ASSERT_SMOB() now returns a smob pointer. This is not used yet, but is available for future use to avoid unsmobbing twice. Smob_base<>::smob_p() is hidden because there doesn't seem to be a need for it to be public. Files in lily/include were edited by hand. Files in lily itself were processed with the following sed script. s/\([A-Za-z_]\+\)::derived_unsmob/unsmob<\1>/g s/derived_unsmob *<\([A-Za-z_]\+\)>/unsmob<\1>/g s/\([A-Za-z_]\+\)::unsmob/unsmob<\1>/g s/\([A-Za-z_]\+\)::is_smob/unsmob<\1>/g s/Input \*\([A-Za-z_]\+\) = unsmob /Input *\1 = unsmob<Input> /g s/LY_ASSERT_SMOB (\([^)]*\))$/LY_ASSERT_SMOB (\1);/g
* Replace C++ (in)equality checks with proper SCM syntaxValentin Villenave2015-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the most straightforward situations where two SCM objects are compared. Here are the basic replacements used: x == y -------> scm_is_eq (x,y) x == SCM_BOOL_T -------> to_boolean (x) x == SCM_BOOL_F -------> scm_is_false (x) x != SCM_BOOL_T -------> scm_is_true (x) x == SCM_UNDEFINED -------> SCM_UNBNDP (x) x == SCM_EOL -------> scm_is_null (x) (scm_exact_p (x) == SCM_BOOL_T) -------> ly_is_rational (x) (scm_integer_p (x) == SCM_BOOL_T) -------> scm_is_integer (x) (scm_list_p (x) == SCM_BOOL_T) -------> ly_is_list (x) (scm_port_p (x) == SCM_BOOL_T) -------> ly_is_port (x) (scm_equal_p (x, y) == SCM_BOOL_T) -------> ly_is_equal (x,y) Finally, I replaced (!cached) with (!SCM_UNPACK (cached)) in lily-guile-macros.hh, as has been suggested once by David. Please note that this commit does not handle some situations I’m less comfortable with (namely those involving scm_c_memq, scm_assq or scm_hashq_get_handle), and some scm_*_p checks for which there isn’t a ly_is_* replacement yet (to wit, scm_hash_table_p, scm_promise_p, and scm_variable_bound_p). Those should be dealt with later (another patch is in the works).
* Allow independent adjustment of minimum length for spanner siblingsDavid Nalesnik2015-02-141-2/+18
| | | | | | | | | | | | The property minimum-length does not allow independent adjustment of the siblings of broken spanners. This patch adds a property, minimum-length-after-break, which, if set, behaves similarly to minimum-length, but only affects siblings starting a line. If minimum-length-after-break is unset, minimum-length still controls all lengths. A regtest demonstrates usage of the new property with a number of spanners. Another regtest demonstrates usage and compatibility of minimum-distance and minimum-distance-after-break.
* Run grand replace for 2015.Werner Lemberg2015-01-041-1/+1
|
* Issue 4141/1: Define inline members unsmob and is_smob for several derived ↵David Kastrup2014-10-061-6/+0
| | | | classes
* Replace remaining uses of unsmob_xxx with Xxx::unsmobDavid Kastrup2014-08-021-4/+4
| | | | | | | | This runs sed -i 's/unsmob_\(engraver\|global_context\|input\|item\|music\|paper_score\|performance\|performer\|spanner\|stream_event\)\b/\u\1::unsmob/g' $(git grep -l unsmob_ lily) as the mechanical part of the conversion. A separate commit provides the required definitions.
* unsmob_pitch -> Pitch::unsmob and relatedDavid Kastrup2014-08-021-2/+2
| | | | | | | | | | | | | | This is part of moving away from implementing LilyPond infrastructure via the C preprocessor rather than C++ features since C++ features tend to be more transparent to IDEs, debuggers, editors, and newcomers. sed -i "$(git grep -h DECLARE_UNSMOB|sed 's/.*(\(.*\), \(.*\)).*/s\/unsmob_\2\\b\/\1::unsmob\/g/')" $(git grep -l unsmob_) sed -i '/^DECLARE_UNSMOB/d' `git grep -l DECLARE_UNSMOB` git checkout Documentation/misc/CHANGES-1.3 (the changes to the CHANGES file are not useful). The definition of DECLARE_UNSMOB is removed in a separate commit.
* use X-parents to align MMRNumbers, MMRTexts and PercentRepeatCountersJanek Warchoł2014-06-281-1/+12
| | | | | | | | | | It makes more sense to use X-parents than Y-parents for horizontal alignment. To be able to do this, we have to ensure that X-parents of MultiMeasureRestNumber, MultiMeasureRestText and PercentRepeatCounter won't be overwritten by set_bound (these grobs are spanners). We can do this because parents of these grobs are spanners as well. Expected changes in output: none.
* Run grand-replace (issue 3765)Carl Sorensen2014-01-111-1/+1
| | | | Run make grand-replace to update all coopyright statements
* Revert "Break slurs between alternative endings in repeats; issue 1698."Mike Solomon2013-04-151-1/+0
| | | | | | | | This reverts commit 88d306d9c5666b5ade4a136df29cca19c5ff5ed7. Conflicts: input/regression/repeat-slur.ly
* Hairpin minimum-length has not effect at end of line; issue 2785.Mike Solomon2013-04-061-0/+17
| | | | | | | Fixes the springs and rods callback so that broken left items and center items are used as potential bounds of spanners, which allows both cases to be considered in the simple spacer when scoring line breaking configurations.
* Break slurs between alternative endings in repeats; issue 1698.Mike Solomon2013-04-061-0/+1
| | | | | | | Create new event-types BreakPhrasingSlurEvent BreakSlurEvent, and a music-function \free so that users can create them. Create these event-types in the volta-repeat-iterator to break slurs between alternatives in a \repeat volta structure.
* Run fixcc.py with astyle 2.02.Graham Percival2012-08-101-1/+1
|
* Add some translation markers; normalize whitespace.Werner Lemberg2012-06-281-2/+3
|
* Consistent bounds for slurs; issue 427 and 379Keith OHara2012-06-201-26/+0
|
* Issue 2491: Macro for(UP_and_DOWN) and 3 similar.Łukasz Czerwiński2012-04-301-20/+8
| | | | | | Replaces do{ ... } while(flip (&d) != DOWN/UP/... with a macro for(DOWN_and_UP/UP_and_DOWN/....) { } Signed-off-by: David Kastrup <dak@gnu.org>
* Run grand-replace for 2012Graham Percival2012-01-091-1/+1
|
* Run astyle 2.02.Graham Percival2011-12-121-2/+2
|
* Standardizes X extents of beams across beam calculations.Mike Solomon2011-11-101-7/+24
| | | | | This code makes sure that the same X extent is used for all beam calculations via the X-positions property, including in spanner_length.
* Grand fixcc.py run on all .hh .cc files.Graham Percival2011-08-011-110/+107
| | | | | | | | | | | Apologies for the inconvenience in patch handling, but getting this done at once will cause less long-term problems than trying to do this piecemeal. Note for future git historians: this patch was created by running scripts/auxiliar/fixcc.py \ $(find flower lily -name '*cc' -o -name '*hh' | grep -v /out) with astyle 2.02 installed. No manual changes were made.
* Fix 1259/1433: linebreaks with \breakDynamicSpan or spanners with style=#'noneReinhold Kainhofer2011-07-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way DynamicLineSpanners are handled when \breakDynamicSpan is called or when the DynamicTextSpanner's style=#'none (i.e. no line should be used and thus the spanner should also not unneccessarily shift the dynamic text spanner up/down). So far, this was handled by simply ending the DynamicLineSpanner prematurely, while leaving its children at their full length. As a consequence, the child spanners were no longer fully contained in the DynamicLineSpanner, which caused several problem at line breaks. This patch changes it as follows: -) All spanner breaks are handled by a flag set on the spanner itself -) The breakDynamicSpan events are handled by the dynamic engraver, which will set that flag (no longer handled by the dynamic span engraver!). This allows to obey the order of \breakDynamicSpan and \> (i.e. if the break was before the \< then break the previous spanner, if it was placed afterwards then end the newly created spanner) -) When a DynamicTextSpanner with style=#'none or a \breakDynamicSpan is encountered, I also set that flag immediately after spanner creation -) From then on, no new dynamics are added to the line spanner and no new support points are added that would otherwise shift the spanner if there is a very high/low note or articulation. If the spanner creates a grob (like a hairpin), that grob would still be shifted as a grob to prevent collisions, though. -) When the current child spanner is ended, we also end the DynamicLineSpanner (and store it in a temporary variable so that we can properly end it in stop_translation_timestep). If a new dynamic is encountered, it will then create a completely new DynamicLineSpanner, which provides the independent alignment that we want. This fixes both issues 1259 and 1433.
* Fix issues 75 and 1256: Allow multiple concurrent slursReinhold Kainhofer2011-07-121-0/+1
| | | | | | | | | | | | | | | Rewrite the Slur_engraver and the Phrasing_slur_engraver to support multiple concurrent slurs. The default lilypond syntax using parentheses still supports only one slur at a time, but by adding a spanner-id property to the (Phrasing)SlurEvent music expression, one can create multiple concurrent slurs, each with a different spanner-id. This finally allows appoggiaturas and acciaccaturas (which both create a slur from the grace note the the next note) to be placed inside a slur. If we observe a new slur start while a slur is already present, we now totally ignore the new slur event, so it does not influence the appearance of the existing slur (bug 1256)
* Modifies Spanner::spanner_length to better handle line spanners.Mike Solomon2011-06-161-4/+19
| | | | | With this change, the normalized endpoints should be correct for all spanners with correct bound information.
* Fix 1622 Dynamic spanner not printed under grace notesTrevor Daniels2011-04-191-4/+7
|
* Suppress continuing LyricHyphen under grace note at start of lineTrevor Daniels2011-04-091-11/+11
| | | | | | | | | | | | | | | | | | - improved fix to 688/1590. Simpler and use of callback gives flexibility * lyric-hyphen-grace.ly regression test * lily/spanner.cc exclude grace part from test in kill_zero_spanned_time * scm/define-grobs.scm add kill-zero-spanned-time as after-line-breaking callback to LyricHyphen
* Fixes Issue 1504, allowing feather beam line breaking.Mike Solomon2011-03-161-0/+48
| | | | | | | | | Makes it such that the degree of feathering at the end of a system is preserved at the beginning of the next system. Adds a normalized-endpoints property to Spanner, which calculates the portion of a spanner (normalized from 0 to 1) taken up by any broken child.
* Replaces broken_spanner_index by get_break_index in spanner.ccMike Solomon2011-03-121-12/+1
| | | | Deletes the broken_spanner_index function, which did the same thing.
* Optimizations for pure-height approximations.Joe Neeman2011-02-141-0/+27
| | | | | Since we end up querying the height of each VerticalAxisGroup multiple times for each line, cache the intermediate results.
* Admin: run yearly grand-replace.Graham Percival2011-01-131-1/+1
|
* Run grand-replace for 2010.Neil Puttock2010-01-231-1/+1
|
* Update source file headers. Fixes using standard GNU package conventions.Jan Nieuwenhuizen2009-11-251-3/+14
| | | | | | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl> Signed-off-by: Jan Nieuwenhuizen <janneke@gnu.org> Signed-off-by: John Mandereau <john.mandereau@gmail.com> Signed-off-by: Graham Percival <graham@percival-music.ca> Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com> Signed-off-by: Joe Neeman <joeneeman@gmail.com> Signed-off-by: Heikki Johannes Junes <hjunes@gmail.com> Signed-off-by: Neil Puttock <n.puttock@gmail.com> Signed-off-by: Carl D. Sorensen <c_sorensen@byu.edu> Signed-off-by: Mats Bengtsson <mats.bengtsson@s3.kth.se> Signed-off-by: Werner Lemberg <wl@gnu.org> Signed-off-by: Patrick McCarty <pnorcks@gmail.com> Signed-off-by: Nicolas Sceaux <nicolas.sceaux@free.fr>
* Move left-broken line-spanner check to callback.Neil Puttock2009-04-151-14/+34
| | | | | | | | | | | | | | | | | | | | Currently, left-broken line spanners and hairpins are removed when they end on the first note of the new system. Though this is appropriate for glissandi and voice followers, there is no way to override this default behaviour. This patch allows the user to tweak the appearance by overriding 'after-line-breaking. - removed left-broken check from ly:line-spanner::print to a new after-line-breaking callback, ly:spanner::kill-zero-spanned-time - removed hairpin after-line-breaking callback and associated method consider_suicide () - added new callback to Hairpin, Glissando, TrillSpanner and VoiceFollower - added convert rule for ly:hairpin::after-line-breaking
* Run grand-replace for 2009.Jan Nieuwenhuizen2009-01-061-1/+1
|
* Run `make grand-replace'.Jan Nieuwenhuizen2008-12-011-1/+1
|
* Clean up error messages in case of unattached tuplet bracket.Han-Wen Nienhuys2008-03-171-1/+1
|
* In doc strings, replace trailing spaces with leading ones.Werner Lemberg2008-03-141-6/+6
| | | | Obviously, I can't remember my own formatting rules...
* ADD_INTERFACE: Formatting and fixing typos.Werner Lemberg2008-03-141-6/+8
|
* Fix #527.Han-Wen Nienhuys2007-12-151-4/+7
| | | | Don't generate rods for spanner without bounds.
* fix hairpinToBarlineJoe Neeman2007-07-051-0/+1
|
* Fix #296.Han-Wen Nienhuys2007-02-161-16/+26
| | | | Kill spanners that extend beyond their parent at line breaks.
* rename spanned_rank_iv -> spanned_rank_intervalHan-Wen Nienhuys2007-02-031-2/+2
|
* codingstyle nits: space before ( and after ,Han-Wen Nienhuys2007-01-271-1/+1
|
* Fix #255.Han-Wen Nienhuys2007-01-241-20/+3
| | | | | Require delta-time before breaking out of separation item loop. Add time_spanned_interval(Item*, Item*)
* make spanned_rank_iv() const; add Spanner::spanned_time() methodHan-Wen Nienhuys2007-01-241-1/+27
|
* excise object keys from back-end.Han-Wen Nienhuys2007-01-111-8/+8
|
* add 2007 to (c) year.Han-Wen Nienhuys2007-01-081-1/+1
|
* spanner::bounds-widthHan-Wen Nienhuys2006-12-211-1/+20
|
* really fix #171Han-Wen Nienhuys2006-12-081-4/+4
|
* insert rods between spanner bounds and breakable columns too. Fixes #171.Han-Wen Nienhuys2006-12-081-6/+23
|