|
MUSX Document Model
|
Assigns a TextExpressionDef or ShapeExpressionDef to a measure. More...
#include <Others.h>
Inheritance diagram for musx::dom::others::MeasureExprAssign:Public Types | |
| enum class | ChannelSwitchTarget { Current , ToLayer1 , ToLayer2 , ToLayer3 , ToLayer4 , ToChord , ToExpression } |
| The values for "On Playback Affect". The target channels are specified in the Score Manager dropdown for staves. More... | |
| enum class | PlaybackStart { BeginningOfMeasure , AlignmentPoint , PositionInMeasure } |
| The choice where to start playback. More... | |
| enum class | ShowStaffList { ScoreAndPart , ScoreOnly , PartOnly } |
| Where to show the assignment. (Used both for staff list and singleton assignments.) More... | |
Public Types inherited from musx::dom::EnigmaBase | |
| 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 | |
| MeasureExprAssign (const DocumentWeakPtr &document, Cmper ID, ShareMode shareMode, Cmper cmper, Inci inci) | |
| Constructor function. | |
| bool | calcIsPseudoTie (utils::PseudoTieMode mode, const EntryInfoPtr &forStartEntry) const |
| Returns true if this shape expression is likely acting as a pseudo tie for the specified mode. | |
| MusxInstance< TextExpressionDef > | getTextExpression () const |
| Gets the assigned text expression. | |
| MusxInstance< ShapeExpressionDef > | getShapeExpression () const |
| Gets the assigned shape expression. | |
| MusxInstance< MarkingCategory > | getMarkingCategory () const |
| Gets the marking category for the assigned text or shape expression. | |
| CategoryStaffListSet | createStaffListSet () const |
| Create a StaffListSet for the given instance. This can be used to interrogate whether a staff appears in the staff set. | |
| bool | calcIsPartOfStaffListAssignment () const |
| Calculates if this assignment participates in a staff-list-based assignment group. | |
| StaffCmper | calcAssignedStaffId (bool forPageView=true) const |
| Calculates the effective staffId for the assignment, returning top or bottom staff if appropriate. | |
| MusxInstance< StaffComposite > | createCurrentStaff (bool forPageView=true) const |
| Creates the current staff for this assignment. | |
| EntryInfoPtr | calcAssociatedEntry () const |
| Calculates the entry associated with the the measure expression. This is the entry that Finale uses for auto-positioning. The entry must match the elapsed position, voice2 setting, and the layer (when specified). No fuzzy search is performed. | |
| bool | calcIsAssignedInRequestedPart () const |
| Calculates if this assignment is assigned in the current part or score, based on the requested part ID of the current instance and showStaffList. | |
| bool | calcAppliesToLayer (LayerIndex layerIndex) const |
| Calculates if this assignment applies to the specified layer. | |
| bool | calcIsHiddenByAlternateNotation () const |
| Calculates if this assignment is hidden by alternate notation. | |
| void | integrityCheck (const std::shared_ptr< EnigmaBase > &ptrToThis) override |
| Performs a final consistency check after population. | |
Public Member Functions inherited from musx::dom::OthersBase | |
| OthersBase (const OthersBase &)=default | |
| explicit default copy constructor | |
| OthersBase (OthersBase &&) noexcept=default | |
| explicit default move constructor | |
| Cmper | getCmper () const |
Gets the cmper key value. | |
| std::optional< Inci > | getInci () const |
Gets the optional array index (inci). | |
| Cmper | getRequestedPartId () const |
| If this instance was retrieved from an object pool, it contains the part ID that was used to retrieve it. If this value is different than getSourcePartId, then this instance is a copy of the pool instance. | |
Public Member Functions inherited from musx::dom::EnigmaBase | |
| Cmper | getSourcePartId () const |
| Gets the source partId for this instance. If an instance is fully shared with the score, the source is SCORE_PARTID. If an instance is partially shared or non shared, the source is the ID of the part that sourced it. | |
| 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 |
| Returns true if all fields are required for valid input. | |
Public Member Functions inherited from musx::dom::DocumentElement | |
| virtual | ~DocumentElement () noexcept(false)=default |
| Virtual destructor for polymorphic behavior. | |
| DocumentPtr | getDocument () const |
| Gets a reference to the Document. | |
| Cmper | getPartId () const |
| Gets the part id associated with this instance. | |
Static Public Member Functions | |
| static const xml::XmlElementArray< MeasureExprAssign > & | xmlMappingArray () |
| Required for musx::factory::FieldPopulator. | |
Public Attributes | |
| Cmper | textExprId {} |
The Cmper of a text expression (xml node is <textExprID>) | |
| Cmper | shapeExprId {} |
The Cmper of a shape expression (xml node is <shapeExprID>) | |
| Evpu | horzEvpuOff {} |
| Horizontal Evpu offset from the default position. | |
| Edu | eduPosition {} |
Horizontal Edu position in staff edu (xml node is <horzEduOff>) | |
| Evpu | vertEvpuOff {} |
Vertical Evpu offset from the default position (xml node is <vertOff>) | |
| StaffCmper | staffAssign {} |
| The staff to which this expression is assigned, or -1 if it is assigned to top staff and -2 if assigned to bottom staff. | |
| int | layer {} |
| The 1-based layer number (1..4) to which this expression is assigned. (0 = all layers.) | |
| bool | voice2 {} |
| ChannelSwitchTarget | channelSwitch {} |
| "On Playback Affect" value. | |
| bool | dontScaleWithEntry {} |
| Inverse of "Scale Expression with Attached Note". | |
| PlaybackStart | playbackStart {} |
| Where to start playback. | |
| ShowStaffList | showStaffList {} |
| "Show On Score and Part(s)|Score Only|Part(s) Only". | |
| bool | createdByHp {} |
| This assignment was created by Finale's smart playback engine. | |
| bool | hidden {} |
| True if the expression is hidden. | |
| int | staffGroup {} |
| Assignment is part of a group of assignments associated with a staff list and should be modified as a group. | |
| Cmper | staffList {} |
| unsigned | graceNoteIndex {} |
| 1-based index from leftmost grace note. 0 = main note. | |
| int | rehearsalMarkOffset {} |
| Restarts the rehearsal mark sequence at this 1-based sequence value. If this is zero, the sequence continues normally. | |
Static Public Attributes | |
| static constexpr std::string_view | XmlNodeName = "measExprAssign" |
| The XML node name for this type. | |
Additional Inherited Members | |
Protected Member Functions inherited from musx::dom::OthersBase | |
| OthersBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, std::optional< Inci > inci=std::nullopt) | |
| Constructs an OthersBase object. | |
| OthersBase & | operator= (const OthersBase &other) |
| Assignment operator delegates to base, preserving OthersBase state. | |
| OthersBase & | operator= (OthersBase &&other) noexcept |
| Assignment operator delegates to base, preserving OthersBase state. | |
Protected Member Functions inherited from musx::dom::EnigmaBase | |
| EnigmaBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode) | |
| Constructs the base class. | |
| EnigmaBase (const EnigmaBase &)=default | |
| explicit default copy constructor | |
| EnigmaBase (EnigmaBase &&) noexcept=default | |
| explicit default move constructor | |
| EnigmaBase & | operator= (const EnigmaBase &) |
| no-op copy assignment operator allows subclasses to copy their values. | |
| EnigmaBase & | operator= (EnigmaBase &&) noexcept |
| no-op move assignment operator allows subclasses to move their values. | |
Protected Member Functions inherited from musx::dom::DocumentElement | |
| DocumentElement (const DocumentWeakPtr &document, Cmper partId) | |
| Constructs the document element. | |
| DocumentElement (const DocumentElement &)=default | |
| explicit default copy constructor | |
| DocumentElement (DocumentElement &&) noexcept=default | |
| explicit default move constructor | |
| DocumentElement & | operator= (const DocumentElement &) |
| no-op copy assignment operator allows subclasses to copy their values. | |
| DocumentElement & | operator= (DocumentElement &&) noexcept |
| no-op move assignment operator allows subclasses to move their values. | |
Assigns a TextExpressionDef or ShapeExpressionDef to a measure.
Only one of textExprId or shapeExprId is non-zero.
The Cmper for a MeasureExprAssign is the Cmper of the Measure to which it is attached.
|
strong |
The values for "On Playback Affect". The target channels are specified in the Score Manager dropdown for staves.
|
strong |
The choice where to start playback.
| Enumerator | |
|---|---|
| BeginningOfMeasure | Start playback at beginning of measure. (Default value may not appear in xml.) |
| AlignmentPoint | Start playback at alignment point as determined by the associated TextExpressionDef or ShapeExpressionDef. (xml value is "attach") |
| PositionInMeasure | Start playback at the Edu position of the assignment. (xml value is "measPos") |
|
strong |
| bool musx::dom::others::MeasureExprAssign::calcAppliesToLayer | ( | LayerIndex | layerIndex | ) | const |
Calculates if this assignment applies to the specified layer.
| layerIndex | The 0-based LayerIndex to check (0..3). |
| StaffCmper musx::dom::others::MeasureExprAssign::calcAssignedStaffId | ( | bool | forPageView = true | ) | const |
Calculates the effective staffId for the assignment, returning top or bottom staff if appropriate.
| forPageView | Return the top/bottom staff in page view (when appropriate). If the staff does not appear in page view, the function falls back to scroll view. |
| EntryInfoPtr musx::dom::others::MeasureExprAssign::calcAssociatedEntry | ( | ) | const |
Calculates the entry associated with the the measure expression. This is the entry that Finale uses for auto-positioning. The entry must match the elapsed position, voice2 setting, and the layer (when specified). No fuzzy search is performed.
| bool musx::dom::others::MeasureExprAssign::calcIsPartOfStaffListAssignment | ( | ) | const |
Calculates if this assignment participates in a staff-list-based assignment group.
This checks the assignment-level grouping fields first, then falls back to the assigned expression category when the category uses staff lists. This works for both text and shape expressions.
| MusxInstance< StaffComposite > musx::dom::others::MeasureExprAssign::createCurrentStaff | ( | bool | forPageView = true | ) | const |
Creates the current staff for this assignment.
| forPageView | If this value is true, calculates the current staff in page view, otherwise is scroll view. |
| CategoryStaffListSet musx::dom::others::MeasureExprAssign::createStaffListSet | ( | ) | const |
Create a StaffListSet for the given instance. This can be used to interrogate whether a staff appears in the staff set.
| MusxInstance< MarkingCategory > musx::dom::others::MeasureExprAssign::getMarkingCategory | ( | ) | const |
Gets the marking category for the assigned text or shape expression.
| MusxInstance< ShapeExpressionDef > musx::dom::others::MeasureExprAssign::getShapeExpression | ( | ) | const |
Gets the assigned shape expression.
| MusxInstance< TextExpressionDef > musx::dom::others::MeasureExprAssign::getTextExpression | ( | ) | const |
Gets the assigned text expression.
|
inlineoverridevirtual |
Performs a final consistency check after population.
Reimplemented from musx::dom::EnigmaBase.
| Cmper musx::dom::others::MeasureExprAssign::staffList {} |
The cmper of the marking category staff list that is controlling this assignment (if any). There will be a separate MeasureExprAssign instance for every staff in the staff list.
| bool musx::dom::others::MeasureExprAssign::voice2 {} |
If true, positioning is relative to a voice2 entry. This setting is a legacy setting that Finale sets when it upgrades a pre-Finale 2009 file. It is not available in the UI. However, an expression does not recognize entry positioning for a voice2 entry unless this value is true. And if it is true, entry-positioning ignores voice 1 entries. (xml node is <v2>)