MUSX Document Model
|
Represents the attributes of a Finale staff group that brackets staves. More...
#include <Details.h>
Classes | |
class | Bracket |
Embedded class to represent the "bracket" node. More... | |
Public Types | |
enum class | DrawBarlineStyle { OnlyOnStaves , ThroughStaves , Mensurstriche } |
Enum for how to draw group barlines. More... | |
enum class | HideStaves { Normally , AsGroup , None } |
Enum for optimization options. More... | |
enum class | BracketStyle : int { None = 0 , ThickLine = 1 , BracketStraightHooks = 2 , PianoBrace = 3 , Unknown4 , Unknown5 , BracketCurvedHooks = 6 , Unknown7 , DeskBracket = 8 } |
Bracket style enum for StaffGroup. More... | |
using | BarlineType = others::Measure::BarlineType |
Enum for barline justification. | |
using | AlignJustify = others::NamePositioning::AlignJustify |
Enum for horizontal alignment. | |
![]() | |
enum class | ShareMode { All , Partial , None } |
Describes how this instance is shared between part and score. More... | |
using | SharedNodes = std::set< std::string > |
The container type for shared nodes. | |
Public Member Functions | |
StaffGroup (const DocumentWeakPtr &document, Cmper partId, Base::ShareMode shareMode, Cmper cmper1, Cmper cmper2) | |
Constructor. | |
std::string | getFullName (util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const |
Get the full staff name without Enigma tags. | |
std::string | getAbbreviatedName (util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const |
Get the abbreviated staff name without Enigma tags. | |
std::shared_ptr< others::MultiStaffInstrumentGroup > | getMultiStaffInstGroup () const |
Returns the others::MultiStaffInstrumentGroup for this group if it is part of one. Otherwise nullptr. | |
std::string | getFullInstrumentName (util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const |
Returns the full instrument name for this group without Enigma tags and with autonumbering (if any). | |
std::string | getAbbreviatedInstrumentName (util::EnigmaString::AccidentalStyle accidentalStyle=util::EnigmaString::AccidentalStyle::Ascii) const |
Returns the abbreviated instrument name for this group without Enigma tags and with autonumbering (if any) | |
bool | isAllMeasures () const |
Returns true if this group spans all measures. | |
void | integrityCheck () override |
Allows a class to determine if it has been properly contructed by the factory and fix issues that it can, such as creating default instances of contained classes. | |
![]() | |
Cmper | getCmper1 () const |
Gets the cmper1 key value. | |
Cmper | getCmper2 () const |
Gets the cmper2 key value. | |
std::optional< Inci > | getInci () const |
Gets the optional array index (inci ). | |
![]() | |
virtual | ~Base () noexcept(false)=default |
Virtual destructor for polymorphic behavior. | |
DocumentPtr | getDocument () const |
Gets a reference to the Document. | |
Cmper | getPartId () const |
Gets the partId for this instance (or 0 for score) | |
std::shared_ptr< others::PartDefinition > | getPartDefinition () const |
Gets the others::PartDefinition corresponding to getPartId. | |
ShareMode | getShareMode () const |
Gets the sharing mode for this instance. | |
const SharedNodes & | getUnlinkedNodes () const |
Gets the unlinked nodes for this instance. (Only populated for ShareMode::Partial ) | |
void | addUnlinkedNode (const std::string &nodeName) |
Adds a shared node for this instance. | |
virtual bool | requireAllFields () const |
Specifies if the parser should alert (print or throw) when an unknown xml tag is found for this class. | |
Static Public Member Functions | |
static const xml::XmlElementArray< StaffGroup > & | xmlMappingArray () |
Required for musx::factory::FieldPopulator. | |
Public Attributes | |
InstCmper | startInst {} |
Starting staff ID. | |
InstCmper | endInst {} |
Ending staff ID. | |
MeasCmper | startMeas {} |
Starting measure number. | |
MeasCmper | endMeas {} |
Ending measure number. | |
Cmper | fullNameId {} |
Full name TextBlock cmper (xml node is <fullID> ) | |
int | fullNameXadj {} |
Horizontal adjustment for full name (xml node is <fullXadj> ) | |
int | fullNameYadj {} |
Vertical adjustment for full name (xml node is <fullYadj> ) | |
std::shared_ptr< Bracket > | bracket {} |
Bracket Options. The factory guarantees this value to exist. | |
BarlineType | barlineType {} |
Group barline type (xml node is <barline> ) | |
AlignJustify | fullNameJustify {} |
Full name justification (xml node is <fullJustify> ) | |
AlignJustify | abbrvNameJustify {} |
Abbreviated name justification (xml node is <abbrvJustify> ) | |
DrawBarlineStyle | drawBarlines |
"Draw Barlines" option (xml node is <groupBarlineStyle> ) | |
bool | ownBarline {} |
"Use Alternate Group Barline" | |
bool | fullNameIndivPos {} |
Indicates if full name has individual position (xml node is <fullIndivPos> ) | |
bool | abbrvNameIndivPos {} |
Indicates if abbreviated name has individual position (xml node is <abbrvIndivPos> ) | |
bool | hideName {} |
Inverse of "Show Group Name". | |
Cmper | abbrvNameId {} |
Abbreviated name TextBlock cmper (xml node is <abbrvID> ) | |
int | abbrvNameXadj {} |
Horizontal adjustment for abbreviated name (xml node is <abbrvXadj> ) | |
int | abbrvNameYadj {} |
Vertical adjustment for abbreviated name (xml node is <abbrvYadj> ) | |
AlignJustify | fullNameAlign {} |
Full name horizontal alignment (xml node is <fullHAlign> ) | |
AlignJustify | abbrvNameAlign {} |
Abbreviated name horizontal alignment (xml node is <abbrvHAlign> ) | |
bool | fullNameExpand {} |
"Expand Single Word" for full name (xml node is <fullExpand> ) | |
bool | abbrvNameExpand {} |
"Expand Single Word" for abbreviated name (xml node is <abbrvExpand> ) | |
HideStaves | hideStaves {} |
"When Hiding Empty Staves" option (xml node is <optimize> ) | |
Cmper | multiStaffGroupId {} |
std::unordered_set< InstCmper > | staves |
Calculated list of staves in the group. | |
Static Public Attributes | |
static constexpr std::string_view | XmlNodeName = "staffGroup" |
XML node name for this type. | |
Additional Inherited Members | |
![]() | |
DetailsBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2, std::optional< Inci > inci=std::nullopt) | |
Constructs a DetailsBase object. | |
![]() | |
Base (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode) | |
Constructs the base class and enforces the static constexpr XmlNodeName. | |
Base & | operator= (const Base &) |
assignment constructor: m_unlinkedNodes is intentionally omitted | |
Represents the attributes of a Finale staff group that brackets staves.
This class is identified by the XML node name "staffGroup".
|
strong |
Bracket style enum for StaffGroup.
|
strong |
|
strong |
Enum for optimization options.
Enumerator | |
---|---|
Normally | Hide staves as if there were no StaffGroup (this is the default and may not appear in the xml) |
AsGroup | Hide staves only if all staves are empty. |
None | Never hide the staves in this StaffGroup. |
|
inline |
Constructor.
document | The document owner of this instance |
partId | The part that owns this staff group |
shareMode | The sharing mode deduced from xml attributes |
cmper1 | In modern Finale files, all groups have 0 for cmper1. In legacy files this was a cmper for an others::InstrumentUsed list. |
cmper2 | The identifier for the StaffGroup. |
std::string musx::dom::details::StaffGroup::getAbbreviatedInstrumentName | ( | util::EnigmaString::AccidentalStyle | accidentalStyle = util::EnigmaString::AccidentalStyle::Ascii | ) | const |
Returns the abbreviated instrument name for this group without Enigma tags and with autonumbering (if any)
accidentalStyle | The style for accidental subsitution in names like "Clarinet in Bb". |
std::string musx::dom::details::StaffGroup::getAbbreviatedName | ( | util::EnigmaString::AccidentalStyle | accidentalStyle = util::EnigmaString::AccidentalStyle::Ascii | ) | const |
Get the abbreviated staff name without Enigma tags.
accidentalStyle | The style for accidental subsitution in names like "Clarinet in Bb". |
std::string musx::dom::details::StaffGroup::getFullInstrumentName | ( | util::EnigmaString::AccidentalStyle | accidentalStyle = util::EnigmaString::AccidentalStyle::Ascii | ) | const |
Returns the full instrument name for this group without Enigma tags and with autonumbering (if any).
accidentalStyle | The style for accidental subsitution in names like "Clarinet in Bb". |
std::string musx::dom::details::StaffGroup::getFullName | ( | util::EnigmaString::AccidentalStyle | accidentalStyle = util::EnigmaString::AccidentalStyle::Ascii | ) | const |
Get the full staff name without Enigma tags.
accidentalStyle | The style for accidental subsitution in names like "Clarinet in Bb". |
|
inlineoverridevirtual |
Allows a class to determine if it has been properly contructed by the factory and fix issues that it can, such as creating default instances of contained classes.
The default implementation should always be called inside an overridden implementation.
musx::dom::integrity_error | if there is a problem. |
Reimplemented from musx::dom::Base.
Cmper musx::dom::details::StaffGroup::multiStaffGroupId {} |
Calculated cmper for others::MultiStaffGroupId, if any. This value is not in the xml. It is set by the factory with the Resolver function for others::MultiStaffGroupId.