understanding libmscore
There used to be a Readme about the way libmscore worked. I saw it when musescore was on its way to 3.0.
Is there any newer version?
Else, is there anyone that would take the time to kindly explain it to me?
I was starting to dig through it to fix #215016: Allow measure numbers to appear below the staff, and couldn't quite get how it works. How do I add properties? Where are generic properties, like the placement (above or below staff), and their logic coded?
Thanks
Comments
Can you be more specific about what kind of info you are looking for? Something about how it is built, something about the rationale behind splitting the source into libmscore and mscore, something about the coding style guidelines, or something about the representation of a score? I'm guessing the latter, so maybe you are thinking of https://musescore.org/en/developers-handbook/references/musescore-inter…. It's not totally up to date, but it basically still applies. Doesn't have details like how properties work, though.
So to answer that a bit more specifically, for properties, you are looking for code involving the "Pid" type, in particular ::PLACEMENT". You'll see there is handling for properties in each element type. But really, maybe you want to start by adding a style setting, which is "Sid", and here is there is a different one for each element type - Sid::hairpinPlacement, Sid::lyricsPlacement. So you need to add a "measureNumberPlacement" to style.h and style.cpp. Properties are used if you want to provide a per-element override, and then you add it to the ElementStyle for the element type (looks like this is currently empty for measure numbers, in measurenumber.cpp). Beyond that, then it's just a matter of looking to see how the style and property are handled for similar element types.
For further questions, best to join the chat on Telgram - https://t.me/musescoreeditorchat