[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Objects as links
From: |
SoundsFromSound |
Subject: |
Re: Objects as links |
Date: |
Sun, 30 Dec 2012 08:19:43 -0800 (PST) |
That is awesome!! Damn, how did you get so good at hacking LilyPond? :) I've
read the manual several times and I still can't code like you guys on the
fly! No fair lol
I'm just jealous -
Ben
Thomas Morley wrote
> 2012/12/29 Noeck <
> noeck.marburg@
> >:
>> Hi,
>>
>> is there a way to make objects behave like links? I want an object (like
>> a clef or a beam) to be a link to a website. From the point-and-click
>> functionality it seems to be doable, but I only found the solution for
>> markup (\with-url).
>>
>> If there is a user function or if someone knows how point-and-click
>> works internally, I would be thankful for any help.
>>
>> Cheers,
>> Joram
>>
>> _______________________________________________
>> lilypond-user mailing list
>>
> lilypond-user@
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> Hi,
>
> you could use this markup-command \with-url to add sth to the
> grob-stencil.
>
> It's a hack, but all I can think of.
>
> \version "2.17.9"
>
> #(ly:set-option 'debug-skylines #t)
>
> #(define (add-link strg)
> (lambda (grob)
> (let* ((stil (ly:grob-property grob 'stencil))
> (x-ext (ly:stencil-extent stil X))
> (y-ext (ly:stencil-extent stil Y))
> (link-stil (grob-interpret-markup
> grob
> (markup
> #:with-url strg
> #:with-dimensions x-ext y-ext
> #:null)))
> (new-stil (ly:stencil-add
> stil
> link-stil)))
> (ly:grob-set-property! grob 'stencil new-stil))))
>
>
> \relative c' {
> \override Staff.Clef.after-line-breaking =
> #(add-link
>
> "http://lilypond.org/doc/v2.17/Documentation/notation/writing-pitches")
> \override Staff.TimeSignature.after-line-breaking =
> #(add-link
> "http://lilypond.org/doc/v2.17/Documentation/notation/rhythms")
> \override NoteHead.after-line-breaking =
> #(add-link
> "http://lilypond.org/doc/v2.17/Documentation/notation/note-heads")
> c''
> }
>
> HTH,
> Harm
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@
> https://lists.gnu.org/mailman/listinfo/lilypond-user
-----
composer | sound designer
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Objects-as-links-tp138537p138559.html
Sent from the User mailing list archive at Nabble.com.