Skip to main content

Topic: Will there be a "isVisible()" API function? (Read 826 times) previous topic - next topic

Will there be a "isVisible()" API function?
Hi -

after having written my first plugins, I think that I would like a function that says whether an item's visibility would make it visible in the current print (depending on whether a single staff/multiple staffs are printed, or it is the top staff).
Is there any chance that such a function would be added in the future?


Re: Will there be a "isVisible()" API function?
Reply #1
There is this API function:
{drawpos}:isHidden(), returns Boolean

This indicates if the current drawpos object is hidden and will not be shown on the printed copy of the work.
I don't know whether it will handle the cases you mention, however.

Re: Will there be a "isVisible()" API function?
Reply #2
Ah - thanks - I have missed this while scanning up and down the function lists. I'll try whether it does what I need!

// Edit:
I think you thought a little more ahead than I did - isHidden() does not do what I want for boundaries: A boundary (that sets sizes) will influence the height of all following printed staffs if it is visible at the point where it is defined - therefore, ConnectBarlines.hmm scans the whole score back to the beginning to find previous boundary objects. But isHidden() - being defined in drawpos - works only for the current printed staff ...

I learned something; but my original question still stands ...

  • Last Edit: 2017-09-21 06:56 am by hmmueller