MUSX Document Model
|
Represents a Finale smart shape. More...
#include <SmartShape.h>
Classes | |
class | EndPoint |
Represents an endpoint of the smart shape. More... | |
class | EndPointAdjustment |
Represents the endpoint adjustment of the smart shape. More... | |
class | TerminationSeg |
Represents the termination segment of the smart shape. More... | |
Public Types | |
enum class | ShapeType : int { SlurDown = 0 , SlurUp , Decrescendo , Crescendo , OctaveDown , OctaveUp , DashLineUp , DashLineDown , DashSlurDown , DashSlurUp , DashLine , SolidLine , SolidLineDown , SolidLineUp , Trill , SlurAuto , DashSlurAuto , TrillExtension , SolidLineDownBoth , SolidLineUpBoth , TwoOctaveDown , TwoOctaveUp , DashLineDownBoth , DashLineUpBoth , Glissando = 25 , TabSlide , BendHat , BendCurve , CustomLine , SolidLineUpLeft , SolidLineDownLeft , DashLineUpLeft , DashLineDownLeft , SolidLineUpDown , SolidLineDownUp , DashLineUpDown , DashLineDownUp , Hyphen , WordExtension , DashContourSlurDown , DashContourSlurUp , DashContouSlurAuto } |
All the smart shape types supported by Finale. More... | |
![]() | |
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 | |
SmartShape (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper) | |
Constructor function. | |
bool | calcAppliesTo (const EntryInfoPtr &entryInfo) const |
Calculates if the smart shape applies to the specified entry. | |
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. | |
bool | requireAllFields () const override |
ignore other fields because they are difficult to figure out | |
![]() | |
Cmper | getCmper () const |
Gets the cmper 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. | |
Static Public Member Functions | |
static const xml::XmlElementArray< SmartShape > & | xmlMappingArray () |
Required for musx::factory::FieldPopulator. | |
Public Attributes | |
ShapeType | shapeType {} |
Type of smart shape. | |
bool | entryBased {} |
Whether the shape is entry-based. | |
std::shared_ptr< TerminationSeg > | startTermSeg |
Start termination segment. | |
std::shared_ptr< TerminationSeg > | endTermSeg |
End termination segment. | |
bool | hidden {} |
Inverse of "Show" option. | |
NoteNumber | startNoteId {} |
If non-zero, the specific note with the entry that this shape starts from. (xml node is <startNoteID> ) | |
NoteNumber | endNoteId {} |
If non-zero, the specific note with the entry that this shape ends on. (xml node is <endNoteID> ) | |
Cmper | lineStyleId {} |
If non-zero, the custom line for this shape. Several ShapeType values use it. (xml node is <lineStyleID> ) | |
Static Public Attributes | |
static constexpr std::string_view | XmlNodeName = "smartShape" |
XML node name. | |
Additional Inherited Members | |
![]() | |
OthersBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, std::optional< Inci > inci=std::nullopt) | |
Constructs an OthersBase 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 a Finale smart shape.
This class is identified by the XML node name "smartShape".
|
strong |
All the smart shape types supported by Finale.
The enum values match Finale's internal values. (Note that 24 is skipped.) However, they are saved in the xml as text values. These are camel case and otherwise match the enum names, except as noted.
Enumerator | |
---|---|
SlurDown | Downward Slur (tips point up). This is the default and may not appear in the xml, but the text is in the Finale binary. |
SlurUp | Upward Slur (tips point down). |
Decrescendo | Decrescendo hairpin. (xml value is "decresc") |
Crescendo | Crescendo hairpin. (xml value is "cresc") |
OctaveDown | Ottava bassa. (8vb) |
OctaveUp | Ottava. (8va) |
DashLineUp | Dashed line with upward hook. |
DashLineDown | Dashed line with downward hook. == 7. |
DashSlurDown | Thin line dashed downward slur (tips point up). |
DashSlurUp | Thin line dashed upward slur (tips point down). |
DashLine | Dashed line. |
SolidLine | Solid line. |
SolidLineDown | Solid line with downward right hook. |
SolidLineUp | Solid line with upward right hook. |
Trill | Trill (includes "tr" symbol at the beginning). == 14. |
SlurAuto | Slur with direction automatically determined. |
DashSlurAuto | Thin line dashed slur with direction automatically determined. |
TrillExtension | Trill extension: only the wavy line. (xml value is "trillExt") |
SolidLineDownBoth | Solid line with downward hooks on both ends. (xml value is "solidLineDown2") |
SolidLineUpBoth | Solid line with upward hooks on both ends. (xml value is "solidLineUp2") |
TwoOctaveDown | Quindicesima bassa (15ma bassa) |
TwoOctaveUp | Quindicesima (15ma) == 21. |
DashLineDownBoth | Dashed line with downward hooks on both ends. (xml value is "dashLineDown2") |
DashLineUpBoth | Dashed line with upward hooks on both ends. (xml value is "dashLineUp2") |
Glissando | Glissando (shape is determined by lineStyleId) == 25 (24 has no value) |
TabSlide | Tab slide (a solid line that is often used as a note-attached glissando) |
BendHat | Bend hat (solid up-down line with a corner in the middle) |
BendCurve | Bend curve. |
CustomLine | User-created custom line with shape determined by lineStyleId. (xml value is "smartLine") |
SolidLineUpLeft | Solid line with upward left hook. |
SolidLineDownLeft | Solid line with downward left hook. |
DashLineUpLeft | Dashed line with upward left hook. == 32. |
DashLineDownLeft | Dashed line with downward left hook. |
SolidLineUpDown | Solid line with upward left hook and downward right hook. |
SolidLineDownUp | Solid line with downward left hook and upward right hook. |
DashLineUpDown | Dashed line with upward left hook and downward right hook. |
DashLineDownUp | Dashed line with downward left hook and upward right hook. |
Hyphen | Lyric hyphen, used only with lyric assignments. |
WordExtension | Lyric word extension, used only with lyric assignments. (xml value is "wordExt") |
DashContourSlurDown | Contoured line dashed downward slur (tips point up). |
DashContourSlurUp | Contoured line dashed upward slur (tips point down). |
DashContouSlurAuto | Contoured line dashed slur with direction automatically determined. |
bool musx::dom::others::SmartShape::calcAppliesTo | ( | const EntryInfoPtr & | entryInfo | ) | const |
Calculates if the smart shape applies to the specified entry.
This function is most useful for shape types like ottavas and hairpins. It does not check layers or staves in between start and end staves, so it may be less useful for slurs.
entryInfo | The entry to check |
|
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.
|
inlineoverridevirtual |
ignore other fields because they are difficult to figure out
Reimplemented from musx::dom::Base.