Creating Buttons

Buttons are best created in palettes – write your script in the View->Scheme window and save it as follows:

  • Right click on any button
  • Choose Duplcate button
  • Right click on the new button
  • Choose Put Script
  • Right click on the new button
  • Choose Edit Label, then Edit Tooltip

Your new button will be saved on exit. The Edit->Activate Palette Button command can be used to operate your new button entirely from the keyboard.

Creating Menu Items

If you have a script (e.g. a sequence of commands recorded in the View->Scheme window you can
create a new menu item for it which can then be used as any other menu item. In particular, it will appear in the Command Center and can have a shortcut given to it.

  • Right click on any menu item in the menu you want to use
  • Choose Save as New Menu Item
  • Follow the dialogs – choose a unique name for your new command
  • The command is immediately available

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.

© 2014 Denemo All rights reserved. | Powered by WordPress
Theme created by Shprink.