24#include "musx/util/Logger.h"
25#include "musx/util/Fraction.h"
27#include "BaseClasses.h"
28#include "CommonClasses.h"
55 std::string_view xmlTag()
const override {
return XmlNodeName; }
76 :
OthersBase(document, partId, shareMode, cmper)
243 std::optional<KnownShapeDefType>
recognize()
const;
299 :
OthersBase(document, partId, shareMode, cmper)
ShareMode
Describes how this instance is shared between part and score.
Definition BaseClasses.h:91
Template pattern for OthersBase items consisting of an array of a single item.
Definition BaseClasses.h:353
OthersArray(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor function.
Definition BaseClasses.h:359
Base class for all "others" types.
Definition BaseClasses.h:283
Represents the attributes of a TGF entry frame.
Definition Others.h:585
Represents the data for instruction associated with a ShapeDef.
Definition ShapeDesigner.h:54
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition ShapeDesigner.h:60
static const xml::XmlElementArray< ShapeData > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
Represents a shape created in Finale's Shape Designer.
Definition ShapeDesigner.h:72
Cmper dataList
Instruction data list Cmper.
Definition ShapeDesigner.h:229
ShapeType
Represents different types of shapes in Finale's Shape Designer.
Definition ShapeDesigner.h:215
@ Executable
Corresponds to "executable" in XML.
@ Clef
Corresponds to "clef" in XML.
@ Other
May Correspond to "other" in XML (but may not appear in XML). All pre-Fin2k shapes use this value.
@ CustomStem
Corresponds to "note" in XML.
@ Expression
Corresponds to "expression" in XML.
@ Articulation
Corresponds to "articulation" in XML.
@ Barline
Corresponds to "barline" in XML.
@ Arrowhead
Corresponds to "arrowhead" in XML.
@ Fretboard
Corresponds to "fretboard" in XML.
ShapeDef(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor function.
Definition ShapeDesigner.h:75
std::optional< KnownShapeDefType > recognize() const
Determine if this is a recognized shape type.
Definition ShapeDesigner.cpp:81
void iterateInstructions(std::function< bool(InstructionType, std::vector< int >)> callback) const
Iterates through the instructions in the shape.
Definition ShapeDesigner.cpp:92
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition ShapeDesigner.h:245
ShapeType shapeType
Shape type (specifies which type of entity this shape pertains to)
Definition ShapeDesigner.h:230
Cmper instructionList
Instruction list Cmper. (xml node is <instList>)
Definition ShapeDesigner.h:228
static const xml::XmlElementArray< ShapeDef > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
InstructionType
Defines the instruction types for Shape Designer shapes.
Definition ShapeDesigner.h:83
@ Undocumented
catch-all for possible undocumented instruction tags.
bool isBlank() const
Returns true if this shape does not draw anything.
Definition ShapeDesigner.h:233
An instruction in the shape.
Definition ShapeDesigner.h:305
int numData
the number of data items consumed by this instruction (See ShapeData.)
Definition ShapeDesigner.h:308
static const xml::XmlElementArray< InstructionInfo > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
ShapeDef::InstructionType type
the type of instruction
Definition ShapeDesigner.h:309
Represents the data for instruction associated with a ShapeDef.
Definition ShapeDesigner.h:295
static constexpr std::string_view XmlNodeName
The XML node name for this type.
Definition ShapeDesigner.h:316
std::vector< std::shared_ptr< InstructionInfo > > instructions
The instructions.
Definition ShapeDesigner.h:314
static const xml::XmlElementArray< ShapeInstructionList > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
ShapeInstructionList(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor function.
Definition ShapeDesigner.h:298
KnownShapeDefType
Enumerates the shape types we can recognize semantically.
Definition ShapeDesigner.h:38
@ TenutoMark
A horizontal tenuto mark, typically used as an articulation symbol.
int32_t Efix
EFIX value (64 per EVPU, 64*288=18432 per inch)
Definition Fundamentals.h:60
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:57
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
@ Blank
Blank clef (invisible, no symbol).
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition BaseClasses.h:57
std::vector< XmlElementDescriptor< T > > XmlElementArray
an array type for XmlElementDescriptor instances.
Definition XmlInterface.h:127
object model for musx file (enigmaxml)
Definition BaseClasses.h:36
Holds the parsed data for a LineWidth instruction.
Definition ShapeDesigner.h:254
Efix efix
The line width in Efix units.
Definition ShapeDesigner.h:255
Holds the parsed data for an RLineTo instruction.
Definition ShapeDesigner.h:259
Evpu dy
The relative Y coordinate delta in Evpu.
Definition ShapeDesigner.h:261
Evpu dx
The relative X coordinate delta in Evpu.
Definition ShapeDesigner.h:260
Helper functions and structs for decoding instruction data vectors in ShapeDef.
Definition ShapeDesigner.h:252
static std::optional< RLineTo > parseRLineTo(ShapeDef::InstructionType type, const std::vector< int > &data)
Attempts to parse an RLineTo instruction.
Definition ShapeDesigner.cpp:123
static std::optional< LineWidth > parseLineWidth(ShapeDef::InstructionType type, const std::vector< int > &data)
Attempts to parse a LineWidth instruction.
Definition ShapeDesigner.cpp:116
static std::optional< FontInfo > parseSetFont(const DocumentWeakPtr &document, ShapeDef::InstructionType type, const std::vector< int > &data)
Attempts to parse a SetFont instruction into a FontInfo object.
Definition ShapeDesigner.cpp:130