Dynamic Directives

We have had a flag (DENEMO_OVERRIDE_DYNAMIC) on directives which can be set to indicate that the directive can be refreshed by executing the action whose name is the tag. Sometimes we need several directives of the same kind (e.g. LilyPond include files) so in this case we need several tags all using the same refresh action. To achieve this a tag can have a postfix starting with a colon “:” and the script DynamicRefresh then uses the string before the colon as the action name and the string after the colon as the parameter to the call. So a tag “LilyPondInclude:book-titling.ily” will be refreshed by executing

(d-LilyPondInclude "book-titling.ily")

See LilyPondInclude for an example of exploiting this – in this case the include path will be refreshed as if the user had asked for the include file “book-titling.ily” and it was being looked up for the first time.

Creating Buttons

An example that creates a button that runs the NewScore command:

(let tag "NewScore"
  (d-DirectivePut-movementcontrol-override tag DENEMO_OVERRIDE_GRAPHIC)
  (d-DirectivePut-movementcontrol-display tag "start new"))
© 2014 Denemo All rights reserved. | Powered by WordPress
Theme created by Shprink.